/systemd-251/src/shared/ |
D | json.h | 47 typedef struct JsonVariant JsonVariant; typedef 63 int json_variant_new_stringn(JsonVariant **ret, const char *s, size_t n); 64 int json_variant_new_base64(JsonVariant **ret, const void *p, size_t n); 65 int json_variant_new_hex(JsonVariant **ret, const void *p, size_t n); 66 int json_variant_new_integer(JsonVariant **ret, int64_t i); 67 int json_variant_new_unsigned(JsonVariant **ret, uint64_t u); 68 int json_variant_new_real(JsonVariant **ret, double d); 69 int json_variant_new_boolean(JsonVariant **ret, bool b); 70 int json_variant_new_array(JsonVariant **ret, JsonVariant **array, size_t n); 71 int json_variant_new_array_bytes(JsonVariant **ret, const void *p, size_t n); [all …]
|
D | json.c | 51 struct JsonVariant { struct 60 JsonVariant *parent; 101 JsonVariant *reference; argument 120 #define INLINE_STRING_MAX (sizeof(JsonVariant) - offsetof(JsonVariant, string) - 1U) 125 assert_cc(sizeof(JsonVariant) == 40U); 177 static bool json_variant_is_magic(const JsonVariant *v) { in json_variant_is_magic() 184 static bool json_variant_is_const_string(const JsonVariant *v) { in json_variant_is_const_string() 195 static bool json_variant_is_regular(const JsonVariant *v) { in json_variant_is_regular() 203 static JsonVariant *json_variant_dereference(JsonVariant *v) { in json_variant_dereference() 219 static uint16_t json_variant_depth(JsonVariant *v) { in json_variant_depth() [all …]
|
D | json-internal.h | 32 #define JSON_VARIANT_MAGIC_TRUE ((JsonVariant*) _JSON_VARIANT_MAGIC_TRUE) 34 #define JSON_VARIANT_MAGIC_FALSE ((JsonVariant*) _JSON_VARIANT_MAGIC_FALSE) 36 #define JSON_VARIANT_MAGIC_NULL ((JsonVariant*) _JSON_VARIANT_MAGIC_NULL) 38 #define JSON_VARIANT_MAGIC_ZERO_INTEGER ((JsonVariant*) _JSON_VARIANT_MAGIC_ZERO_INTEGER) 40 #define JSON_VARIANT_MAGIC_ZERO_UNSIGNED ((JsonVariant*) _JSON_VARIANT_MAGIC_ZERO_UNSIGNED) 42 #define JSON_VARIANT_MAGIC_ZERO_REAL ((JsonVariant*) _JSON_VARIANT_MAGIC_ZERO_REAL) 44 #define JSON_VARIANT_MAGIC_EMPTY_STRING ((JsonVariant*) _JSON_VARIANT_MAGIC_EMPTY_STRING) 46 #define JSON_VARIANT_MAGIC_EMPTY_ARRAY ((JsonVariant*) _JSON_VARIANT_MAGIC_EMPTY_ARRAY) 48 #define JSON_VARIANT_MAGIC_EMPTY_OBJECT ((JsonVariant*) _JSON_VARIANT_MAGIC_EMPTY_OBJECT) 50 #define _JSON_VARIANT_MAGIC_MAX ((JsonVariant*) __JSON_VARIANT_MAGIC_MAX)
|
D | varlink.h | 52 typedef int (*VarlinkMethod)(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, void… 53 typedef int (*VarlinkReply)(Varlink *link, JsonVariant *parameters, const char *error_id, VarlinkRe… 81 int varlink_send(Varlink *v, const char *method, JsonVariant *parameters); 85 int varlink_call(Varlink *v, const char *method, JsonVariant *parameters, JsonVariant **ret_paramet… 86 int varlink_callb(Varlink *v, const char *method, JsonVariant **ret_parameters, const char **ret_er… 89 int varlink_invoke(Varlink *v, const char *method, JsonVariant *parameters); 93 int varlink_observe(Varlink *v, const char *method, JsonVariant *parameters); 97 int varlink_reply(Varlink *v, JsonVariant *parameters); 101 int varlink_error(Varlink *v, const char *error_id, JsonVariant *parameters); 103 int varlink_error_invalid_parameter(Varlink *v, JsonVariant *parameters); [all …]
|
D | user-record.c | 197 int json_dispatch_realm(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *user… in json_dispatch_realm() 224 int json_dispatch_gecos(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *user… in json_dispatch_gecos() 255 static int json_dispatch_nice(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void… in json_dispatch_nice() 275 static int json_dispatch_rlimit_value(const char *name, JsonVariant *variant, JsonDispatchFlags fla… in json_dispatch_rlimit_value() 294 static int json_dispatch_rlimits(const char *name, JsonVariant *variant, JsonDispatchFlags flags, v… in json_dispatch_rlimits() 296 JsonVariant *value; in json_dispatch_rlimits() 311 JsonVariant *jcur, *jmax; in json_dispatch_rlimits() 356 static int json_dispatch_filename_or_path(const char *name, JsonVariant *variant, JsonDispatchFlags… in json_dispatch_filename_or_path() 382 static int json_dispatch_path(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void… in json_dispatch_path() 408 static int json_dispatch_home_directory(const char *name, JsonVariant *variant, JsonDispatchFlags f… in json_dispatch_home_directory() [all …]
|
D | group-record.c | 46 static int dispatch_privileged(const char *name, JsonVariant *variant, JsonDispatchFlags flags, voi… in dispatch_privileged() 56 static int dispatch_binding(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *… in dispatch_binding() 63 JsonVariant *m; in dispatch_binding() 84 static int dispatch_per_machine(const char *name, JsonVariant *variant, JsonDispatchFlags flags, vo… in dispatch_per_machine() 95 JsonVariant *e; in dispatch_per_machine() 106 JsonVariant *m; in dispatch_per_machine() 142 static int dispatch_status(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *u… in dispatch_status() 149 JsonVariant *m; in dispatch_status() 189 JsonVariant *v, in group_record_load() 263 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in group_record_build()
|
D | user-record.h | 367 JsonVariant *json; 376 int user_record_load(UserRecord *h, JsonVariant *v, UserRecordLoadFlags flags); 425 int json_dispatch_realm(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *user… 426 int json_dispatch_gecos(const char *name, JsonVariant *variant, JsonDispatchFlags flags, void *user… 427 int json_dispatch_user_group_list(const char *name, JsonVariant *variant, JsonDispatchFlags flags, … 428 int json_dispatch_user_disposition(const char *name, JsonVariant *variant, JsonDispatchFlags flags,… 430 int per_machine_id_match(JsonVariant *ids, JsonDispatchFlags flags); 431 int per_machine_hostname_match(JsonVariant *hns, JsonDispatchFlags flags); 432 int user_group_record_mangle(JsonVariant *v, UserRecordLoadFlags load_flags, JsonVariant **ret_vari…
|
D | elf-util.c | 154 JsonVariant **package_metadata; 271 static int parse_package_metadata(const char *name, JsonVariant *id_json, Elf *elf, bool *ret_inter… in parse_package_metadata() 319 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *w = NULL; in parse_package_metadata() 383 static int parse_buildid(Dwfl_Module *mod, Elf *elf, const char *name, StackContext *c, JsonVariant… in parse_buildid() 384 _cleanup_(json_variant_unrefp) JsonVariant *id_json = NULL; in parse_buildid() 413 JsonVariant *build_id = json_variant_by_key(id_json, "buildId"); in parse_buildid() 426 _cleanup_(json_variant_unrefp) JsonVariant *id_json = NULL; in module_callback() 504 static int parse_core(int fd, const char *executable, char **ret, JsonVariant **ret_package_metadat… in parse_core() 512 _cleanup_(json_variant_unrefp) JsonVariant *package_metadata = NULL; in parse_core() 572 static int parse_elf(int fd, const char *executable, char **ret, JsonVariant **ret_package_metadata… in parse_elf() [all …]
|
D | varlink.c | 127 JsonVariant *current; 128 JsonVariant *reply; 670 static int varlink_sanitize_parameters(JsonVariant **v) { in varlink_sanitize_parameters() 683 _cleanup_(json_variant_unrefp) JsonVariant *parameters = NULL; in varlink_dispatch_reply() 686 JsonVariant *e; in varlink_dispatch_reply() 784 _cleanup_(json_variant_unrefp) JsonVariant *parameters = NULL; in varlink_dispatch_method() 787 JsonVariant *e; in varlink_dispatch_method() 1236 static int varlink_enqueue_json(Varlink *v, JsonVariant *m) { in varlink_enqueue_json() 1286 int varlink_send(Varlink *v, const char *method, JsonVariant *parameters) { in varlink_send() 1287 _cleanup_(json_variant_unrefp) JsonVariant *m = NULL; in varlink_send() [all …]
|
D | cryptsetup-util.c | 182 JsonVariant **ret) { in cryptsetup_get_token_as_json() 184 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in cryptsetup_get_token_as_json() 211 JsonVariant *w; in cryptsetup_get_token_as_json() 227 int cryptsetup_get_keyslot_from_token(JsonVariant *v) { in cryptsetup_get_keyslot_from_token() 229 JsonVariant *w; in cryptsetup_get_keyslot_from_token() 256 int cryptsetup_add_token_json(struct crypt_device *cd, JsonVariant *v) { in cryptsetup_add_token_json()
|
/systemd-251/src/network/ |
D | networkd-json.c | 22 static int address_build_json(Address *address, JsonVariant **ret) { in address_build_json() 23 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in address_build_json() 65 static int addresses_build_json(Set *addresses, JsonVariant **ret) { in addresses_build_json() 66 JsonVariant **elements; in addresses_build_json() 78 elements = new(JsonVariant*, set_size(addresses)); in addresses_build_json() 97 static int neighbor_build_json(Neighbor *n, JsonVariant **ret) { in neighbor_build_json() 98 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in neighbor_build_json() 122 static int neighbors_build_json(Set *neighbors, JsonVariant **ret) { in neighbors_build_json() 123 JsonVariant **elements; in neighbors_build_json() 135 elements = new(JsonVariant*, set_size(neighbors)); in neighbors_build_json() [all …]
|
/systemd-251/src/nspawn/ |
D | nspawn-oci.c | 81 static int oci_unexpected(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata… in oci_unexpected() 86 static int oci_unsupported(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdat… in oci_unsupported() 91 static int oci_terminal(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata) { in oci_terminal() 100 static int oci_console_dimension(const char *name, JsonVariant *variant, JsonDispatchFlags flags, v… in oci_console_dimension() 118 static int oci_console_size(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userda… in oci_console_size() 129 static int oci_absolute_path(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userd… in oci_absolute_path() 144 static int oci_env(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata) { in oci_env() 146 JsonVariant *e; in oci_env() 172 static int oci_args(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata) { in oci_args() 194 static int oci_rlimit_type(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdat… in oci_rlimit_type() [all …]
|
/systemd-251/src/home/ |
D | user-record-util.c | 230 _cleanup_(json_variant_unrefp) JsonVariant *extended = NULL; in user_record_reconcile() 232 JsonVariant *e; in user_record_reconcile() 284 _cleanup_(json_variant_unrefp) JsonVariant *new_binding_entry = NULL, *binding = NULL; in user_record_add_binding() 351 _cleanup_(json_variant_unrefp) JsonVariant *be = NULL; in user_record_add_binding() 628 …_cleanup_(json_variant_unrefp) JsonVariant *new_per_machine = NULL, *midv = NULL, *midav = NULL, *… in user_record_set_disk_size() 629 _cleanup_free_ JsonVariant **array = NULL; in user_record_set_disk_size() 631 JsonVariant *per_machine; in user_record_set_disk_size() 648 r = json_variant_new_array(&midav, (JsonVariant*[]) { midv }, 1); in user_record_set_disk_size() 661 array = new(JsonVariant*, n + 1); in user_record_set_disk_size() 666 JsonVariant *m; in user_record_set_disk_size() [all …]
|
D | homectl-pkcs11.c | 15 JsonVariant **v, in add_pkcs11_encrypted_key() 20 _cleanup_(json_variant_unrefp) JsonVariant *l = NULL, *w = NULL, *e = NULL; in add_pkcs11_encrypted_key() 66 static int add_pkcs11_token_uri(JsonVariant **v, const char *uri) { in add_pkcs11_token_uri() 67 _cleanup_(json_variant_unrefp) JsonVariant *w = NULL; in add_pkcs11_token_uri() 100 int identity_add_token_pin(JsonVariant **v, const char *pin) { in identity_add_token_pin() 101 _cleanup_(json_variant_unrefp) JsonVariant *w = NULL, *l = NULL; in identity_add_token_pin() 159 int identity_add_pkcs11_key_data(JsonVariant **v, const char *uri) { in identity_add_pkcs11_key_data()
|
D | homectl-recovery-key.c | 14 static int add_privileged(JsonVariant **v, const char *hashed) { in add_privileged() 15 _cleanup_(json_variant_unrefp) JsonVariant *e = NULL, *w = NULL, *l = NULL; in add_privileged() 47 static int add_public(JsonVariant **v) { in add_public() 68 static int add_secret(JsonVariant **v, const char *password) { in add_secret() 69 _cleanup_(json_variant_unrefp) JsonVariant *w = NULL, *l = NULL; in add_secret() 104 int identity_add_recovery_key(JsonVariant **v) { in identity_add_recovery_key()
|
D | homectl-fido2.c | 22 JsonVariant **v, in add_fido2_credential_id() 26 _cleanup_(json_variant_unrefp) JsonVariant *w = NULL; in add_fido2_credential_id() 65 JsonVariant **v, in add_fido2_salt() 74 _cleanup_(json_variant_unrefp) JsonVariant *l = NULL, *w = NULL, *e = NULL; in add_fido2_salt() 119 JsonVariant **v, in identity_add_fido2_parameters() 125 JsonVariant *un, *realm, *rn; in identity_add_fido2_parameters()
|
D | user-record-sign.c | 11 _cleanup_(json_variant_unrefp) JsonVariant *j = NULL; in user_record_signable_json() 33 _cleanup_(json_variant_unrefp) JsonVariant *encoded = NULL, *v = NULL; in user_record_sign() 109 JsonVariant *array, *e; in user_record_verify() 133 JsonVariant *data; in user_record_verify() 166 JsonVariant *array; in user_record_has_signature()
|
D | homed-varlink.h | 6 int vl_method_get_user_record(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, voi… 7 int vl_method_get_group_record(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, vo… 8 int vl_method_get_memberships(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, voi…
|
D | homed-varlink.c | 37 static int build_user_json(Home *h, bool trusted, JsonVariant **ret) { in build_user_json() 73 int vl_method_get_user_record(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, voi… in vl_method_get_user_record() 82 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in vl_method_get_user_record() 153 static int build_group_json(Home *h, JsonVariant **ret) { in build_group_json() 189 int vl_method_get_group_record(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, vo… in vl_method_get_group_record() 198 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in vl_method_get_group_record() 259 int vl_method_get_memberships(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, voi… in vl_method_get_memberships()
|
/systemd-251/src/test/ |
D | test-json.c | 79 typedef void (*Test)(JsonVariant *); 82 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *w = NULL; in test_variant_one() 144 static void test_1(JsonVariant *v) { in test_1() 145 JsonVariant *p, *q; in test_1() 180 static void test_2(JsonVariant *v) { in test_2() 181 JsonVariant *p, *q; in test_2() 227 static void test_zeroes(JsonVariant *v) { in test_zeroes() 234 JsonVariant *w; in test_zeroes() 256 JsonVariant *q; in test_zeroes() 266 _cleanup_(json_variant_unrefp) JsonVariant *a = NULL, *b = NULL; in TEST() [all …]
|
D | test-varlink.c | 26 static int method_something(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, void … in method_something() 27 _cleanup_(json_variant_unrefp) JsonVariant *ret = NULL; in method_something() 28 JsonVariant *a, *b; in method_something() 51 static int method_done(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, void *user… in method_done() 59 static int reply(Varlink *link, JsonVariant *parameters, const char *error_id, VarlinkReplyFlags fl… in reply() 60 JsonVariant *sum; in reply() 84 static int overload_reply(Varlink *link, JsonVariant *parameters, const char *error_id, VarlinkRepl… in overload_reply() 145 _cleanup_(json_variant_unrefp) JsonVariant *i = NULL; in thread() 146 JsonVariant *o = NULL; in thread() 192 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in main()
|
/systemd-251/src/core/ |
D | core-varlink.c | 24 static int build_user_json(const char *user_name, uid_t uid, JsonVariant **ret) { in build_user_json() 54 static int build_managed_oom_json_array_element(Unit *u, const char *property, JsonVariant **ret_v)… in build_managed_oom_json_array_element() 90 _cleanup_(json_variant_unrefp) JsonVariant *arr = NULL, *v = NULL; in manager_varlink_send_managed_oom_update() 121 _cleanup_(json_variant_unrefp) JsonVariant *e = NULL; in manager_varlink_send_managed_oom_update() 148 static int build_managed_oom_cgroups_json(Manager *m, JsonVariant **ret) { in build_managed_oom_cgroups_json() 150 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *arr = NULL; in build_managed_oom_cgroups_json() 172 _cleanup_(json_variant_unrefp) JsonVariant *e = NULL; in build_managed_oom_cgroups_json() 200 JsonVariant *parameters, in vl_method_subscribe_managed_oom_cgroups() 204 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in vl_method_subscribe_managed_oom_cgroups() 232 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in manager_varlink_send_managed_oom_initial() [all …]
|
/systemd-251/src/fuzz/ |
D | fuzz-bootspec.c | 12 static int json_dispatch_config(const char *name, JsonVariant *variant, JsonDispatchFlags flags, vo… in json_dispatch_config() 26 static int json_dispatch_entries(const char *name, JsonVariant *variant, JsonDispatchFlags flags, v… in json_dispatch_entries() 28 JsonVariant *entry; in json_dispatch_entries() 35 JsonVariant *v; in json_dispatch_entries() 62 static int json_dispatch_loader(const char *name, JsonVariant *variant, JsonDispatchFlags flags, vo… in json_dispatch_loader() 96 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in LLVMFuzzerTestOneInput()
|
/systemd-251/src/userdb/ |
D | userwork.c | 38 static int add_nss_service(JsonVariant **v) { in add_nss_service() 39 _cleanup_(json_variant_unrefp) JsonVariant *status = NULL, *z = NULL; in add_nss_service() 72 static int build_user_json(Varlink *link, UserRecord *ur, JsonVariant **ret) { in build_user_json() 74 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in build_user_json() 131 static int vl_method_get_user_record(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags fla… in vl_method_get_user_record() 140 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in vl_method_get_user_record() 165 _cleanup_(json_variant_unrefp) JsonVariant *last = NULL; in vl_method_get_user_record() 224 static int build_group_json(Varlink *link, GroupRecord *gr, JsonVariant **ret) { in build_group_json() 226 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL; in build_group_json() 267 static int vl_method_get_group_record(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags fl… in vl_method_get_group_record() [all …]
|
/systemd-251/src/nss-resolve/ |
D | nss-resolve.c | 96 static int json_dispatch_ifindex(const char *name, JsonVariant *variant, JsonDispatchFlags flags, v… in json_dispatch_ifindex() 114 static int json_dispatch_family(const char *name, JsonVariant *variant, JsonDispatchFlags flags, vo… in json_dispatch_family() 133 JsonVariant *addresses; 159 static int json_dispatch_address(const char *name, JsonVariant *variant, JsonDispatchFlags flags, v… in json_dispatch_address() 162 JsonVariant *i; in json_dispatch_address() 234 _cleanup_(json_variant_unrefp) JsonVariant *cparams = NULL; in _nss_resolve_gethostbyname4_r() 236 JsonVariant *rparams, *entry; in _nss_resolve_gethostbyname4_r() 387 _cleanup_(json_variant_unrefp) JsonVariant *cparams = NULL; in _nss_resolve_gethostbyname3_r() 389 JsonVariant *rparams, *entry; in _nss_resolve_gethostbyname3_r() 553 JsonVariant *names; [all …]
|