/systemd-251/src/import/ |
D | import-common.c | 209 if (fstatat(dirfd(d), child, &st, AT_SYMLINK_NOFOLLOW) < 0) in import_mangle_os_tree() 241 cd = xopendirat(dirfd(d), child, O_NOFOLLOW); in import_mangle_os_tree() 252 r = rename_noreplace(dirfd(d), child, dirfd(d), t); in import_mangle_os_tree() 260 r = rename_noreplace(dirfd(cd), de->d_name, dirfd(d), de->d_name); in import_mangle_os_tree() 265 if (unlinkat(dirfd(d), t, AT_REMOVEDIR) < 0) in import_mangle_os_tree() 268 r = futimens(dirfd(d), (struct timespec[2]) { st.st_atim, st.st_mtim }); in import_mangle_os_tree() 272 r = fchmod_and_chown(dirfd(d), st.st_mode, st.st_uid, st.st_gid); in import_mangle_os_tree()
|
/systemd-251/src/shared/ |
D | mkdir-label.c | 10 int mkdirat_label(int dirfd, const char *path, mode_t mode) { in mkdirat_label() argument 15 r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR); in mkdirat_label() 19 r = mkdirat_errno_wrapper(dirfd, path, mode); in mkdirat_label() 24 return mac_smack_fix_at(dirfd, path, 0); in mkdirat_label()
|
D | clean-ipc.c | 232 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) { in clean_posix_shm_internal() 244 kid = xopendirat(dirfd(dir), de->d_name, O_NOFOLLOW|O_NOATIME); in clean_posix_shm_internal() 261 if (unlinkat(dirfd(dir), de->d_name, AT_REMOVEDIR) < 0) { in clean_posix_shm_internal() 281 if (unlinkat(dirfd(dir), de->d_name, 0) < 0) { in clean_posix_shm_internal() 334 if (fstatat(dirfd(dir), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) { in clean_posix_mq()
|
D | copy.c | 949 if (fstatat(dirfd(d), de->d_name, &buf, AT_SYMLINK_NOFOLLOW) < 0) { in fd_copy_directory() 989 r = fd_is_mount_point(dirfd(d), de->d_name, 0); in fd_copy_directory() 996 …q = fd_copy_directory(dirfd(d), de->d_name, &buf, fdt, de->d_name, original_device, depth_left-1, … in fd_copy_directory() 998 …q = fd_copy_regular(dirfd(d), de->d_name, &buf, fdt, de->d_name, override_uid, override_gid, copy_… in fd_copy_directory() 1000 …q = fd_copy_symlink(dirfd(d), de->d_name, &buf, fdt, de->d_name, override_uid, override_gid, copy_… in fd_copy_directory() 1002 …q = fd_copy_fifo(dirfd(d), de->d_name, &buf, fdt, de->d_name, override_uid, override_gid, copy_fla… in fd_copy_directory() 1004 …q = fd_copy_node(dirfd(d), de->d_name, &buf, fdt, de->d_name, override_uid, override_gid, copy_fla… in fd_copy_directory() 1025 (void) copy_xattr(dirfd(d), fdt, copy_flags); in fd_copy_directory() 1103 int dirfd, in copy_directory_fd_full() argument 1113 assert(dirfd >= 0); in copy_directory_fd_full() [all …]
|
D | copy.h | 56 int copy_directory_fd_full(int dirfd, const char *to, CopyFlags copy_flags, copy_progress_path_t pr… 57 static inline int copy_directory_fd(int dirfd, const char *to, CopyFlags copy_flags) { in copy_directory_fd() argument 58 return copy_directory_fd_full(dirfd, to, copy_flags, NULL, NULL, NULL); in copy_directory_fd()
|
D | install-file.c | 81 static int unlinkat_maybe_dir(int dirfd, const char *pathname) { in unlinkat_maybe_dir() argument 86 if (unlinkat(dirfd, pathname, 0) < 0) { in unlinkat_maybe_dir() 90 if (unlinkat(dirfd, pathname, AT_REMOVEDIR) < 0) in unlinkat_maybe_dir()
|
D | chown-recursive.c | 74 path_fd = openat(dirfd(d), de->d_name, O_PATH|O_CLOEXEC|O_NOFOLLOW); in chown_recursive_internal() 103 r = chown_one(dirfd(d), st, uid, gid, mask); in chown_recursive_internal()
|
D | rm-rf.c | 225 … r = unlinkat_harder(dirfd(todos[n_todo-1].dir), dirname, AT_REMOVEDIR, flags); in rm_rf_children() 236 fd = dirfd(d); /* Retrieve the file descriptor from the DIR object */ in rm_rf_children() 246 … fd = dirfd(d); /* We donated the fd to fdopendir(). Let's make sure we sure we have in rm_rf_children()
|
D | discover-image.c | 459 if (fstatat(dirfd(d), name, &st, flags) < 0) { in image_find() 469 if (fstatat(dirfd(d), raw, &st, flags) < 0) { in image_find() 479 r = image_make(name, dirfd(d), resolved, raw, &st, ret); in image_find() 485 r = image_make(name, dirfd(d), resolved, name, &st, ret); in image_find() 566 if (fstatat(dirfd(d), de->d_name, &st, flags) < 0) { in image_discover() 596 r = image_make(pretty, dirfd(d), resolved, de->d_name, &st, &image); in image_discover()
|
D | mkdir-label.h | 9 int mkdirat_label(int dirfd, const char *path, mode_t mode);
|
D | smack-util.h | 37 int mac_smack_fix_at(int dirfd, const char *path, LabelFixFlags flags);
|
D | selinux-util.h | 45 int mac_selinux_create_file_prepare_at(int dirfd, const char *path, mode_t mode);
|
/systemd-251/src/basic/ |
D | fs-util.c | 509 int mkfifoat_atomic(int dirfd, const char *path, mode_t mode) { in mkfifoat_atomic() argument 523 if (mkfifoat(dirfd, t, mode) < 0) in mkfifoat_atomic() 526 if (renameat(dirfd, t, dirfd, path) < 0) { in mkfifoat_atomic() 1013 int open_mkdir_at(int dirfd, const char *path, int flags, mode_t mode) { in open_mkdir_at() argument 1048 parent_fd = openat(dirfd, parent, O_PATH|O_DIRECTORY|O_CLOEXEC); in open_mkdir_at() 1052 dirfd = parent_fd; in open_mkdir_at() 1056 r = RET_NERRNO(mkdirat(dirfd, path, mode)); in open_mkdir_at() 1067 fd = RET_NERRNO(openat(dirfd, path, (flags & ~O_EXCL)|O_DIRECTORY|O_NOFOLLOW)); in open_mkdir_at() 1079 (void) unlinkat(dirfd, path, AT_REMOVEDIR); in open_mkdir_at() 1087 int openat_report_new(int dirfd, const char *pathname, int flags, mode_t mode, bool *ret_newly_crea… in openat_report_new() argument [all …]
|
D | unit-file.c | 272 int dirfd, in unit_file_resolve_symlink() argument 292 assert(dirfd >= 0 || dirfd == AT_FDCWD); in unit_file_resolve_symlink() 294 r = readlinkat_malloc(dirfd, filename, &target); in unit_file_resolve_symlink() 501 r = readlinkat_malloc(dirfd(d), de->d_name, &target); in unit_file_build_name_map() 547 *dir, dirfd(d), de->d_name, in unit_file_build_name_map()
|
D | fs-util.h | 112 int open_mkdir_at(int dirfd, const char *path, int flags, mode_t mode); 114 int openat_report_new(int dirfd, const char *pathname, int flags, mode_t mode, bool *ret_newly_crea…
|
D | mkdir.c | 82 int mkdirat_errno_wrapper(int dirfd, const char *pathname, mode_t mode) { in mkdirat_errno_wrapper() argument 83 return RET_NERRNO(mkdirat(dirfd, pathname, mode)); in mkdirat_errno_wrapper()
|
D | unit-file.h | 43 int dirfd,
|
D | mkdir.h | 12 int mkdirat_errno_wrapper(int dirfd, const char *pathname, mode_t mode);
|
/systemd-251/src/udev/ |
D | udevadm-info.c | 314 if (fstatat(dirfd(dir), dent->d_name, &stats, AT_SYMLINK_NOFOLLOW) < 0) in cleanup_dir() 321 subdir = xopendirat(dirfd(dir), dent->d_name, O_NOFOLLOW); in cleanup_dir() 327 (void) unlinkat(dirfd(dir), dent->d_name, AT_REMOVEDIR); in cleanup_dir() 329 (void) unlinkat(dirfd(dir), dent->d_name, 0); in cleanup_dir() 347 if (faccessat(dirfd(datadir), dent->d_name, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) in cleanup_dir_after_db_cleanup() 352 (void) unlinkat(dirfd(dir), dent->d_name, 0); in cleanup_dir_after_db_cleanup() 365 if (fstatat(dirfd(dir), dent->d_name, &stats, AT_SYMLINK_NOFOLLOW) < 0) in cleanup_dirs_after_db_cleanup() 370 subdir = xopendirat(dirfd(dir), dent->d_name, O_NOFOLLOW); in cleanup_dirs_after_db_cleanup() 376 (void) unlinkat(dirfd(dir), dent->d_name, AT_REMOVEDIR); in cleanup_dirs_after_db_cleanup() 378 (void) unlinkat(dirfd(dir), dent->d_name, 0); in cleanup_dirs_after_db_cleanup()
|
D | udev-watch.c | 56 r = device_new_from_watch_handle_at(&dev, dirfd(dir), wd); in udev_watch_restore() 67 (void) unlinkat(dirfd(dir), ent->d_name, 0); in udev_watch_restore()
|
/systemd-251/src/libsystemd/sd-journal/ |
D | journal-vacuum.c | 153 if (fstatat(dirfd(d), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) { in journal_directory_vacuum() 238 r = journal_file_empty(dirfd(d), p); in journal_directory_vacuum() 246 r = unlinkat_deallocate(dirfd(d), p, 0); in journal_directory_vacuum() 259 patch_realtime(dirfd(d), p, &st, &realtime); in journal_directory_vacuum() 290 r = unlinkat_deallocate(dirfd(d), list[i].filename, 0); in journal_directory_vacuum()
|
/systemd-251/src/coredump/ |
D | coredump-vacuum.c | 160 … if (fstatat(dirfd(d), de->d_name, &st, AT_NO_AUTOMOUNT|AT_SYMLINK_NOFOLLOW) < 0) { in coredump_vacuum() 228 r = vacuum_necessary(dirfd(d), sum, keep_free, max_use); in coredump_vacuum() 232 r = unlinkat_deallocate(dirfd(d), worst->oldest_file, 0); in coredump_vacuum()
|
/systemd-251/src/nspawn/ |
D | nspawn-patch-uid.c | 341 if (fstatat(dirfd(d), de->d_name, &fst, AT_SYMLINK_NOFOLLOW) < 0) { in recurse_fd() 349 …subdir_fd = openat(dirfd(d), de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NO… in recurse_fd() 363 r = patch_fd(dirfd(d), de->d_name, &fst, shift); in recurse_fd() 375 r = patch_fd(d ? dirfd(d) : fd, NULL, st, shift); in recurse_fd()
|
/systemd-251/src/core/ |
D | smack-setup.c | 78 dfd = dirfd(dir); in write_access2_rules() 143 dfd = dirfd(dir); in write_cipso2_rules() 202 dfd = dirfd(dir); in write_netlabel_rules()
|
/systemd-251/src/tmpfiles/ |
D | tmpfiles.c | 464 static DIR* xopendirat_nomod(int dirfd, const char *path) { in xopendirat_nomod() argument 467 dir = xopendirat(dirfd, path, O_NOFOLLOW|O_NOATIME); in xopendirat_nomod() 471 …log_debug_errno(errno, "Cannot open %sdirectory \"%s\": %m", dirfd == AT_FDCWD ? "" : "sub", path); in xopendirat_nomod() 475 dir = xopendirat(dirfd, path, O_NOFOLLOW); in xopendirat_nomod() 477 …log_debug_errno(errno, "Cannot open %sdirectory \"%s\": %m", dirfd == AT_FDCWD ? "" : "sub", path); in xopendirat_nomod() 591 dirfd(d), de->d_name, in dir_cleanup() 625 q = fd_is_mount_point(dirfd(d), de->d_name, 0); in dir_cleanup() 672 sub_dir = xopendirat_nomod(dirfd(d), de->d_name); in dir_cleanup() 680 if (flock(dirfd(sub_dir), LOCK_EX|LOCK_NB) < 0) { in dir_cleanup() 714 if (unlinkat(dirfd(d), de->d_name, AT_REMOVEDIR) < 0) in dir_cleanup() [all …]
|