Home
last modified time | relevance | path

Searched refs:fileno (Results 1 – 25 of 43) sorted by relevance

12

/systemd-251/src/sysusers/
Dsysusers.c279 r = copy_bytes(src, fileno(dst), UINT64_MAX, COPY_REFLINK); in make_backup()
287 …r = fchmod_and_chown_with_fallback(fileno(dst), dst_tmp, st.st_mode & 07777, st.st_uid, st.st_gid); in make_backup()
291 if (futimens(fileno(dst), (const struct timespec[2]) { st.st_atim, st.st_mtim }) < 0) in make_backup()
294 r = fsync_full(fileno(dst)); in make_backup()
423 r = copy_rights_with_fallback(fileno(original), fileno(passwd), passwd_tmp); in write_temporary_passwd()
455 if (fchmod(fileno(passwd), 0644) < 0) in write_temporary_passwd()
545 r = copy_rights_with_fallback(fileno(original), fileno(shadow), shadow_tmp); in write_temporary_shadow()
578 if (fchmod(fileno(shadow), 0000) < 0) in write_temporary_shadow()
681 r = copy_rights_with_fallback(fileno(original), fileno(group), group_tmp); in write_temporary_group()
720 if (fchmod(fileno(group), 0644) < 0) in write_temporary_group()
[all …]
/systemd-251/src/resolve/
Dresolved-resolv-conf.c110 if (fstat(fileno(f), &st) < 0) { in manager_read_resolv_conf()
351 (void) fchmod(fileno(f_uplink), 0644); in manager_write_resolv_conf()
362 (void) fchmod(fileno(f_stub), 0644); in manager_write_resolv_conf()
Dresolved-etc-hosts.c330 r = fstat(fileno(f), &st); in manager_etc_hosts_read()
/systemd-251/src/locale/
Dkeymap-util.c375 (void) fchmod(fileno(f), 0644); in x11_write_data()
838 (void) fchmod(fileno(fw), 0644); in locale_gen_enable_locale()
841 r = copy_access(fileno(fr), fileno(fw)); in locale_gen_enable_locale()
844 r = copy_xattr(fileno(fr), fileno(fw), COPY_ALL_XATTRS); in locale_gen_enable_locale()
/systemd-251/src/basic/
Dfileio.c148 fd = fileno(f); in write_string_stream_ts()
159 fd = fileno(f); in write_string_stream_ts()
236 r = fchmod_umask(fileno(f), FLAGS_SET(flags, WRITE_STRING_FILE_MODE_0600) ? 0600 : 0644); in write_string_file_atomic()
247 r = fsync_directory_of_file(fileno(f)); in write_string_file_atomic()
596 fd = fileno(f); in read_full_stream_full()
1179 fd = fileno(f); in fflush_sync_and_check()
1365 fd = fileno(f); in read_line_full()
Dtmpfile-util.c323 fd = fileno(f); in flink_tmpfile()
Denv-file.c530 (void) fchmod_umask(fileno(f), 0644); in write_env_file()
/systemd-251/src/firstboot/
Dfirstboot.c742 r = copy_rights(fileno(original), fileno(passwd)); in write_root_passwd()
775 r = fchmod(fileno(passwd), 0644); in write_root_passwd()
810 r = copy_rights(fileno(original), fileno(shadow)); in write_root_shadow()
844 r = fchmod(fileno(shadow), 0000); in write_root_shadow()
/systemd-251/src/core/
Dexecute.c591 int fileno, in setup_output() argument
611 if (fileno == STDOUT_FILENO && params->stdout_fd >= 0) { in setup_output()
619 if (fileno == STDERR_FILENO && params->stderr_fd >= 0) { in setup_output()
629 if (fileno == STDERR_FILENO) { in setup_output()
642 return fileno; in setup_output()
646 return RET_NERRNO(dup2(STDOUT_FILENO, fileno)); in setup_output()
653 return open_terminal_as(exec_context_tty_path(context), O_WRONLY, fileno); in setup_output()
657 return RET_NERRNO(dup2(STDIN_FILENO, fileno)); in setup_output()
661 return fileno; in setup_output()
664 return open_null_as(O_WRONLY, fileno); in setup_output()
[all …]
Dmain.c1145 r = fd_cloexec(fileno(f), false); in prepare_reexecute()
1791 xsprintf(sfd, "%i", fileno(arg_serialization)); in do_reexecute()
2590 assert_se(fdset_remove(*ret_fds, fileno(arg_serialization)) >= 0); in collect_fds()
Ddbus-execute.c638 int fileno; in property_get_stdio_fdname() local
646 fileno = STDIN_FILENO; in property_get_stdio_fdname()
648 fileno = STDOUT_FILENO; in property_get_stdio_fdname()
651 fileno = STDERR_FILENO; in property_get_stdio_fdname()
654 return sd_bus_message_append(reply, "s", exec_context_fdname(c, fileno)); in property_get_stdio_fdname()
/systemd-251/src/systemctl/
Dfuzz-systemctl-parse-argv.c42 orig_stdout_fd = fcntl(fileno(stdout), F_DUPFD_CLOEXEC, 3); in LLVMFuzzerTestOneInput()
Dsystemctl-edit.c157 r = fchmod(fileno(f), 0644); in create_edit_temp_file()
/systemd-251/src/test/
Dtest-clock.c53 assert_se(ftruncate(fileno(f), 0) == 0); in TEST()
/systemd-251/src/libsystemd/sd-hwdb/
Dsd-hwdb.c311 if (fstat(fileno(hwdb->f), &hwdb->st) < 0) in sd_hwdb_new()
320 hwdb->map = mmap(0, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0); in sd_hwdb_new()
/systemd-251/src/fuzz/
Dfuzz-bootspec.c111 orig_stdout_fd = fcntl(fileno(stdout), F_DUPFD_CLOEXEC, 3); in LLVMFuzzerTestOneInput()
/systemd-251/src/network/
Dnetworkd-lldp-rx.c140 (void) fchmod(fileno(f), 0644); in link_lldp_save()
Dnetworkd-state-file.c252 (void) fchmod(fileno(f), 0644); in manager_save()
504 (void) fchmod(fileno(f), 0644); in link_save()
/systemd-251/src/shared/
Dhwdb-util.c381 (void) fchmod(fileno(t.f), 0444); in trie_store()
407 if (fsync(fileno(t.f)) < 0) in trie_store()
/systemd-251/src/fsck/
Dfsck.c195 if (flock(fileno(console), LOCK_EX|LOCK_NB) < 0) in process_progress()
/systemd-251/src/login/
Dlogind-inhibit.c101 (void) fchmod(fileno(f), 0644); in inhibitor_save()
Dlogind-seat.c102 (void) fchmod(fileno(f), 0644); in seat_save()
/systemd-251/test/
Dsysv-generator-test.py260 os.fchmod(f.fileno(), 0o755)
/systemd-251/src/libsystemd/sd-journal/
Dcatalog.c426 (void) fchmod(fileno(w), 0644); in write_catalog()
/systemd-251/src/journal/
Djournald-context.c415 …if (fstat(fileno(f), &st) < 0) /* The file might have been replaced since the stat() above, let's … in client_context_read_extra_fields()

12