diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-13 19:24:01 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-17 10:22:28 +0100 |
commit | d01cd40196eb18d859b3c416505ceb1d4ba398ac (patch) | |
tree | 65baa4f5219dd3414aa3b5038301b678a463e976 /src/basic/copy.h | |
parent | 1c876927e4e63b90f72dd32cbc949a16948fe39e (diff) |
machined: when copying files from/to userns containers chown to root
This changes the file copy logic of machined to set the UID/GID of all
copied files to 0 if the host and container do not share the same user
namespace.
Fixes: #4078
Diffstat (limited to 'src/basic/copy.h')
-rw-r--r-- | src/basic/copy.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/copy.h b/src/basic/copy.h index c2f02c455e..4f3e11423e 100644 --- a/src/basic/copy.h +++ b/src/basic/copy.h @@ -33,8 +33,8 @@ typedef enum CopyFlags { int copy_file_fd(const char *from, int to, CopyFlags copy_flags); int copy_file(const char *from, const char *to, int open_flags, mode_t mode, unsigned chattr_flags, CopyFlags copy_flags); int copy_file_atomic(const char *from, const char *to, mode_t mode, unsigned chattr_flags, CopyFlags copy_flags); -int copy_tree(const char *from, const char *to, CopyFlags copy_flags); -int copy_tree_at(int fdf, const char *from, int fdt, const char *to, CopyFlags copy_flags); +int copy_tree(const char *from, const char *to, uid_t override_uid, gid_t override_gid, CopyFlags copy_flags); +int copy_tree_at(int fdf, const char *from, int fdt, const char *to, uid_t override_uid, gid_t override_gid, CopyFlags copy_flags); int copy_directory_fd(int dirfd, const char *to, CopyFlags copy_flags); int copy_directory(const char *from, const char *to, CopyFlags copy_flags); int copy_bytes(int fdf, int fdt, uint64_t max_bytes, CopyFlags copy_flags); |