diff options
author | Andrej Lajovic <andrej.lajovic@ad-vega.si> | 2021-08-09 01:43:54 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-08-11 17:48:10 +0200 |
commit | 23e026de254df54119e6565bf7b638b9b83ec4fd (patch) | |
tree | 36f45ceabf1fc254c1d93163707ee4b79b4ed066 /src/partition | |
parent | Merge pull request #20419 from keszybz/setenv-no-value (diff) | |
download | systemd-23e026de254df54119e6565bf7b638b9b83ec4fd.tar.xz systemd-23e026de254df54119e6565bf7b638b9b83ec4fd.zip |
shared/copy: add a new flag COPY_ALL_XATTRS
When the flag COPY_ALL_XATTRS is set, it causes the complete set of xattrs
to be copied. If the flag is unset, only xattrs from the "user" namespace
are copied.
Fixes #17178.
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/repart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c index c75198e5c9..6f3b3dbe17 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -2849,13 +2849,13 @@ static int do_copy_files(Partition *p, const char *fs) { sfd, ".", pfd, fn, UID_INVALID, GID_INVALID, - COPY_REFLINK|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS); + COPY_REFLINK|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS); } else r = copy_tree_at( sfd, ".", tfd, ".", UID_INVALID, GID_INVALID, - COPY_REFLINK|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS); + COPY_REFLINK|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS); if (r < 0) return log_error_errno(r, "Failed to copy '%s' to '%s%s': %m", *source, strempty(arg_root), *target); } else { @@ -2890,7 +2890,7 @@ static int do_copy_files(Partition *p, const char *fs) { if (r < 0) return log_error_errno(r, "Failed to copy '%s' to '%s%s': %m", *source, strempty(arg_root), *target); - (void) copy_xattr(sfd, tfd); + (void) copy_xattr(sfd, tfd, COPY_ALL_XATTRS); (void) copy_access(sfd, tfd); (void) copy_times(sfd, tfd, 0); } |