diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-02-15 00:23:35 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-02-15 16:25:37 +0100 |
commit | e40b11be04b8abfe040507338336ce8e5e456ff6 (patch) | |
tree | 4350655b9cdaad0bfa764fe2e948aea91157eaa9 /src/shared/copy.c | |
parent | loop-util: fix error handling (diff) | |
download | systemd-e40b11be04b8abfe040507338336ce8e5e456ff6.tar.xz systemd-e40b11be04b8abfe040507338336ce8e5e456ff6.zip |
fs-util: rename xopenat() -> xopanat_full()
Diffstat (limited to 'src/shared/copy.c')
-rw-r--r-- | src/shared/copy.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/shared/copy.c b/src/shared/copy.c index a23c7e990f..c22463e2e7 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -985,12 +985,12 @@ static int fd_copy_directory( exists = r >= 0; - fdt = xopenat_lock(dt, to, - O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW|(exists ? 0 : O_CREAT|O_EXCL), - (copy_flags & COPY_MAC_CREATE ? XO_LABEL : 0)|(set_contains(subvolumes, st) ? XO_SUBVOLUME : 0), - st->st_mode & 07777, - copy_flags & COPY_LOCK_BSD ? LOCK_BSD : LOCK_NONE, - LOCK_EX); + fdt = xopenat_lock_full(dt, to, + O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW|(exists ? 0 : O_CREAT|O_EXCL), + (copy_flags & COPY_MAC_CREATE ? XO_LABEL : 0)|(set_contains(subvolumes, st) ? XO_SUBVOLUME : 0), + st->st_mode & 07777, + copy_flags & COPY_LOCK_BSD ? LOCK_BSD : LOCK_NONE, + LOCK_EX); if (fdt < 0) return fdt; @@ -1379,11 +1379,11 @@ int copy_file_at_full( return r; WITH_UMASK(0000) { - fdt = xopenat_lock(dir_fdt, to, - flags|O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, - (copy_flags & COPY_MAC_CREATE ? XO_LABEL : 0), - mode != MODE_INVALID ? mode : st.st_mode, - copy_flags & COPY_LOCK_BSD ? LOCK_BSD : LOCK_NONE, LOCK_EX); + fdt = xopenat_lock_full(dir_fdt, to, + flags|O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, + (copy_flags & COPY_MAC_CREATE ? XO_LABEL : 0), + mode != MODE_INVALID ? mode : st.st_mode, + copy_flags & COPY_LOCK_BSD ? LOCK_BSD : LOCK_NONE, LOCK_EX); if (fdt < 0) return fdt; } |