/systemd-251/test/fuzz/fuzz-unit-file/ |
D | oss-fuzz-6977 | 3 …p=��pours=%ps=%pAaa!Unt=%pourcePath=s=%pwa=%p=ou[waa[Unt=%p=��pours=%ps=%pAaa!Unt=%pourcePath=s=%p…
|
/systemd-251/src/test/ |
D | test-extract-word.c | 12 const char *p, *original; in TEST() local 15 p = original = "foobar waldo"; in TEST() 16 assert_se(extract_first_word(&p, &t, NULL, 0) > 0); in TEST() 19 assert_se(p == original + 7); in TEST() 21 assert_se(extract_first_word(&p, &t, NULL, 0) > 0); in TEST() 24 assert_se(isempty(p)); in TEST() 26 assert_se(extract_first_word(&p, &t, NULL, 0) == 0); in TEST() 28 assert_se(isempty(p)); in TEST() 30 p = original = "\"foobar\" \'waldo\'"; in TEST() 31 assert_se(extract_first_word(&p, &t, NULL, 0) > 0); in TEST() [all …]
|
D | test-uid-range.c | 18 _cleanup_free_ UidRange *p = NULL; in TEST() local 22 assert_se(uid_range_covers(p, n, 0, 0)); in TEST() 23 assert_se(!uid_range_covers(p, n, 0, 1)); in TEST() 24 assert_se(!uid_range_covers(p, n, 100, UINT32_MAX)); in TEST() 26 assert_se(uid_range_add_str(&p, &n, "500-999") >= 0); in TEST() 28 assert_se(p[0].start == 500); in TEST() 29 assert_se(p[0].nr == 500); in TEST() 31 assert_se(!uid_range_contains(p, n, 499)); in TEST() 32 assert_se(uid_range_contains(p, n, 500)); in TEST() 33 assert_se(uid_range_contains(p, n, 999)); in TEST() [all …]
|
D | test-strip-tab-ansi.c | 14 char *p, *z; in TEST() local 16 assert_se(p = strdup("\tFoobar\tbar\twaldo\t")); in TEST() 17 assert_se(strip_tab_ansi(&p, NULL, NULL)); in TEST() 18 fprintf(stdout, "<%s>\n", p); in TEST() 19 assert_se(streq(p, " Foobar bar waldo ")); in TEST() 20 free(p); in TEST() 22 …assert_se(p = strdup(ANSI_HIGHLIGHT "Hello" ANSI_NORMAL ANSI_HIGHLIGHT_RED " world!" ANSI_NORMAL)); in TEST() 23 assert_se(strip_tab_ansi(&p, NULL, NULL)); in TEST() 24 fprintf(stdout, "<%s>\n", p); in TEST() 25 assert_se(streq(p, "Hello world!")); in TEST() [all …]
|
D | test-chown-rec.c | 32 static bool has_xattr(const char *p) { in has_xattr() argument 35 if (lgetxattr(p, "system.posix_acl_access", buffer, sizeof(buffer)) < 0) { in has_xattr() 46 const char *p; in TEST() local 53 p = strjoina(t, "/dir"); in TEST() 54 assert_se(mkdir(p, 0777) >= 0); in TEST() 55 assert_se(lstat(p, &st) >= 0); in TEST() 60 assert_se(!has_xattr(p)); in TEST() 62 p = strjoina(t, "/dir/symlink"); in TEST() 63 assert_se(symlink("../../", p) >= 0); in TEST() 64 assert_se(lstat(p, &st) >= 0); in TEST() [all …]
|
D | test-install-root.c | 21 const char *p; in TEST() local 33 p = strjoina(root, "/usr/lib/systemd/system/a.service"); in TEST() 34 assert_se(write_string_file(p, in TEST() 41 p = strjoina(root, "/usr/lib/systemd/system/b.service"); in TEST() 42 assert_se(symlink("a.service", p) >= 0); in TEST() 47 p = strjoina(root, "/usr/lib/systemd/system/c.service"); in TEST() 48 assert_se(symlink("/usr/lib/systemd/system/a.service", p) >= 0); in TEST() 53 p = strjoina(root, "/usr/lib/systemd/system/d.service"); in TEST() 54 assert_se(symlink("c.service", p) >= 0); in TEST() 64 p = strjoina(root, SYSTEM_CONFIG_UNIT_DIR"/a.service"); in TEST() [all …]
|
D | test-fs-util.c | 34 const char *top, *p, *pslash, *q, *qslash; in TEST() local 44 p = strjoina(top, "/dot"); in TEST() 45 if (symlink(".", p) < 0) { in TEST() 51 p = strjoina(top, "/dotdot"); in TEST() 52 assert_se(symlink("..", p) >= 0); in TEST() 54 p = strjoina(top, "/dotdota"); in TEST() 55 assert_se(symlink("../a", p) >= 0); in TEST() 57 p = strjoina(temp, "/a"); in TEST() 58 assert_se(symlink("b", p) >= 0); in TEST() 60 p = strjoina(temp, "/b"); in TEST() [all …]
|
/systemd-251/src/resolve/ |
D | resolved-dns-packet.c | 32 #define REWINDER_INIT(p) { \ argument 33 .packet = (p), \ 34 .saved_rindex = (p)->rindex, \ 44 DnsPacket *p; in dns_packet_new() local 77 p = malloc0(ALIGN(sizeof(DnsPacket)) + a); in dns_packet_new() 78 if (!p) in dns_packet_new() 81 *p = (DnsPacket) { in dns_packet_new() 92 *ret = p; in dns_packet_new() 97 void dns_packet_set_flags(DnsPacket *p, bool dnssec_checking_disabled, bool truncated) { in dns_packet_set_flags() argument 101 assert(p); in dns_packet_set_flags() [all …]
|
D | resolved-dns-packet.h | 93 static inline uint8_t* DNS_PACKET_DATA(const DnsPacket *p) { in DNS_PACKET_DATA() argument 94 if (_unlikely_(!p)) in DNS_PACKET_DATA() 97 if (p->_data) in DNS_PACKET_DATA() 98 return p->_data; in DNS_PACKET_DATA() 100 return ((uint8_t*) p) + ALIGN(sizeof(DnsPacket)); in DNS_PACKET_DATA() 103 #define DNS_PACKET_HEADER(p) ((DnsPacketHeader*) DNS_PACKET_DATA(p)) argument 104 #define DNS_PACKET_ID(p) DNS_PACKET_HEADER(p)->id argument 105 #define DNS_PACKET_QR(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 15) & 1) argument 106 #define DNS_PACKET_OPCODE(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 11) & 15) argument 107 #define DNS_PACKET_AA(p) ((be16toh(DNS_PACKET_HEADER(p)->flags) >> 10) & 1) argument [all …]
|
/systemd-251/src/core/ |
D | path.c | 261 Path *p = PATH(u); in path_init() local 266 p->directory_mode = 0755; in path_init() 268 p->trigger_limit.interval = USEC_INFINITY; in path_init() 269 p->trigger_limit.burst = UINT_MAX; in path_init() 272 void path_free_specs(Path *p) { in path_free_specs() argument 275 assert(p); in path_free_specs() 277 while ((s = p->specs)) { in path_free_specs() 279 LIST_REMOVE(spec, p->specs, s); in path_free_specs() 286 Path *p = PATH(u); in path_done() local 288 assert(p); in path_done() [all …]
|
D | generator-setup.c | 10 int lookup_paths_mkdir_generator(LookupPaths *p) { in lookup_paths_mkdir_generator() argument 13 assert(p); in lookup_paths_mkdir_generator() 15 if (!p->generator || !p->generator_early || !p->generator_late) in lookup_paths_mkdir_generator() 18 r = mkdir_p_label(p->generator, 0755); in lookup_paths_mkdir_generator() 20 q = mkdir_p_label(p->generator_early, 0755); in lookup_paths_mkdir_generator() 24 q = mkdir_p_label(p->generator_late, 0755); in lookup_paths_mkdir_generator() 31 void lookup_paths_trim_generator(LookupPaths *p) { in lookup_paths_trim_generator() argument 32 assert(p); in lookup_paths_trim_generator() 36 if (p->generator) in lookup_paths_trim_generator() 37 (void) rmdir(p->generator); in lookup_paths_trim_generator() [all …]
|
/systemd-251/coccinelle/ |
D | hashmap_free.cocci | 3 expression p; 5 - set_free(p); 6 - p = NULL; 7 + p = set_free(p); 9 expression p; 11 - if (p) 12 - set_free(p); 13 - p = NULL; 14 + p = set_free(p); 16 expression p; [all …]
|
D | sd_event_source_disable_unref.cocci | 3 expression p; 5 - if (p) { 6 - (void) sd_event_source_set_enabled(p, SD_EVENT_OFF); 7 - p = sd_event_source_unref(p); 9 + p = sd_event_source_disable_unref(p); 11 expression p; 13 - if (p) { 14 - sd_event_source_set_enabled(p, SD_EVENT_OFF); 15 - sd_event_source_unref(p); 17 + sd_event_source_disable_unref(p); [all …]
|
D | safe_closedir.cocci | 3 expression p; 5 - if (p) { 6 - closedir(p); 7 - p = NULL; 9 + p = safe_closedir(p); 11 expression p; 13 - if (p) 14 - closedir(p); 15 - p = NULL; 16 + p = safe_closedir(p); [all …]
|
D | safe_fclose.cocci | 3 expression p; 5 - if (p) { 6 - fclose(p); 7 - p = NULL; 9 + p = safe_fclose(p); 11 expression p; 13 - if (p) 14 - fclose(p); 15 - p = NULL; 16 + p = safe_fclose(p); [all …]
|
D | strv_free.cocci | 3 expression p; 5 - strv_free(p); 6 - p = NULL; 7 + p = strv_free(p); 9 expression p; 11 - if (p) 12 - strv_free(p); 13 - p = NULL; 14 + p = strv_free(p); 16 expression p; [all …]
|
/systemd-251/hwdb.d/ |
D | 20-usb-classes.hwdb | 5 usb:v*p*d*dc01* 8 usb:v*p*d*dc01dsc01* 11 usb:v*p*d*dc01dsc02* 14 usb:v*p*d*dc01dsc03* 17 usb:v*p*d*dc02* 20 usb:v*p*d*dc02dsc01* 23 usb:v*p*d*dc02dsc02* 26 usb:v*p*d*dc02dsc02dp01* 29 usb:v*p*d*dc02dsc02dp02* 32 usb:v*p*d*dc02dsc02dp03* [all …]
|
/systemd-251/src/shared/ |
D | bpf-program.c | 44 BPFProgram *bpf_program_free(BPFProgram *p) { in bpf_program_free() argument 45 if (!p) in bpf_program_free() 55 (void) bpf_program_cgroup_detach(p); in bpf_program_free() 57 safe_close(p->kernel_fd); in bpf_program_free() 58 free(p->prog_name); in bpf_program_free() 59 free(p->instructions); in bpf_program_free() 60 free(p->attached_path); in bpf_program_free() 62 return mfree(p); in bpf_program_free() 83 _cleanup_(bpf_program_freep) BPFProgram *p = NULL; in bpf_program_new() 95 p = new(BPFProgram, 1); in bpf_program_new() [all …]
|
/systemd-251/src/partition/ |
D | repart.c | 179 #define PARTITION_IS_FOREIGN(p) (!(p)->definition_path) argument 180 #define PARTITION_EXISTS(p) (!!(p)->current_partition) argument 218 static uint64_t round_down_size(uint64_t v, uint64_t p) { in round_down_size() argument 219 return (v / p) * p; in round_down_size() 222 static uint64_t round_up_size(uint64_t v, uint64_t p) { in round_up_size() argument 224 v = DIV_ROUND_UP(v, p); in round_up_size() 226 if (v > UINT64_MAX / p) in round_up_size() 229 return v * p; in round_up_size() 233 Partition *p; in partition_new() local 235 p = new(Partition, 1); in partition_new() [all …]
|
/systemd-251/src/basic/ |
D | percent-util.c | 7 static int parse_parts_value_whole(const char *p, const char *symbol) { in parse_parts_value_whole() argument 11 pc = endswith(p, symbol); in parse_parts_value_whole() 15 n = strndupa_safe(p, pc - p); in parse_parts_value_whole() 25 static int parse_parts_value_with_tenths_place(const char *p, const char *symbol) { in parse_parts_value_with_tenths_place() argument 29 pc = endswith(p, symbol); in parse_parts_value_with_tenths_place() 33 dot = memchr(p, '.', pc - p); in parse_parts_value_with_tenths_place() 40 n = strndupa_safe(p, dot - p); in parse_parts_value_with_tenths_place() 43 n = strndupa_safe(p, pc - p); in parse_parts_value_with_tenths_place() 57 static int parse_parts_value_with_hundredths_place(const char *p, const char *symbol) { in parse_parts_value_with_hundredths_place() argument 61 pc = endswith(p, symbol); in parse_parts_value_with_hundredths_place() [all …]
|
D | macro.h | 144 #define ALIGN_PTR(p) ((void*) ALIGN((unsigned long) (p))) argument 145 #define ALIGN4_PTR(p) ((void*) ALIGN4((unsigned long) (p))) argument 146 #define ALIGN8_PTR(p) ((void*) ALIGN8((unsigned long) (p))) argument 148 #define ALIGN_TO_PTR(p, ali) ((void*) ALIGN_TO((unsigned long) (p), (ali))) argument 280 #define PTR_TO_INT(p) ((int) ((intptr_t) (p))) argument 282 #define PTR_TO_UINT(p) ((unsigned) ((uintptr_t) (p))) argument 285 #define PTR_TO_LONG(p) ((long) ((intptr_t) (p))) argument 287 #define PTR_TO_ULONG(p) ((unsigned long) ((uintptr_t) (p))) argument 290 #define PTR_TO_UINT8(p) ((uint8_t) ((uintptr_t) (p))) argument 293 #define PTR_TO_INT32(p) ((int32_t) ((intptr_t) (p))) argument [all …]
|
D | string-util.c | 25 const char *p; in first_word() local 46 p = s + wl; in first_word() 47 if (*p == 0) in first_word() 48 return (char*) p; in first_word() 50 if (!strchr(WHITESPACE, *p)) in first_word() 53 p += strspn(p, WHITESPACE); in first_word() 54 return (char*) p; in first_word() 91 char *r, *p; in strjoin_real() local 106 p = r = new(char, l); in strjoin_real() 112 p = stpcpy(p, t); in strjoin_real() [all …]
|
D | path-util.c | 28 int path_split_and_make_absolute(const char *p, char ***ret) { in path_split_and_make_absolute() argument 32 assert(p); in path_split_and_make_absolute() 35 l = strv_split(p, ":"); in path_split_and_make_absolute() 49 char *path_make_absolute(const char *p, const char *prefix) { in path_make_absolute() argument 50 assert(p); in path_make_absolute() 55 if (path_is_absolute(p) || isempty(prefix)) in path_make_absolute() 56 return strdup(p); in path_make_absolute() 58 return path_join(prefix, p); in path_make_absolute() 79 int path_make_absolute_cwd(const char *p, char **ret) { in path_make_absolute_cwd() argument 83 assert(p); in path_make_absolute_cwd() [all …]
|
/systemd-251/src/journal/ |
D | journald-native.c | 37 const char *p, size_t l, in server_process_entry_meta() argument 47 startswith(p, "PRIORITY=") && in server_process_entry_meta() 48 p[9] >= '0' && p[9] <= '9') in server_process_entry_meta() 49 *priority = (*priority & LOG_FACMASK) | (p[9] - '0'); in server_process_entry_meta() 52 startswith(p, "SYSLOG_FACILITY=") && in server_process_entry_meta() 53 p[16] >= '0' && p[16] <= '9') in server_process_entry_meta() 54 *priority = (*priority & LOG_PRIMASK) | ((p[16] - '0') << 3); in server_process_entry_meta() 57 startswith(p, "SYSLOG_FACILITY=") && in server_process_entry_meta() 58 p[16] >= '0' && p[16] <= '9' && in server_process_entry_meta() 59 p[17] >= '0' && p[17] <= '9') in server_process_entry_meta() [all …]
|
/systemd-251/src/network/ |
D | networkd-radv.c | 181 Prefix *p; in link_request_radv_addresses() local 189 HASHMAP_FOREACH(p, link->network->prefixes_by_section) { in link_request_radv_addresses() 193 if (!p->assign) in link_request_radv_addresses() 197 if (p->prefixlen > 64) in link_request_radv_addresses() 200 r = radv_generate_addresses(link, p->tokens, &p->prefix, p->prefixlen, &addresses); in link_request_radv_addresses() 214 address->prefixlen = p->prefixlen; in link_request_radv_addresses() 215 address->route_metric = p->route_metric; in link_request_radv_addresses() 240 _cleanup_(sd_radv_prefix_unrefp) sd_radv_prefix *p = NULL; in radv_set_prefix() 247 r = sd_radv_prefix_new(&p); in radv_set_prefix() 251 r = sd_radv_prefix_set_prefix(p, &prefix->prefix, prefix->prefixlen); in radv_set_prefix() [all …]
|