Skip to content

Commit a938024

Browse files
repart: Copy fs-verity status for CopyFiles=
When populating a filesytem with CopyFiles=, we first copy the files to a temporary directory. Make sure we use the (new) COPY_FS_VERITY flag when doing that copy so that the `mkfs` that we invoke can see the files with fs-verity enabled. Closes systemd#35352 Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
1 parent 24df9bf commit a938024

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/repart/repart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5642,14 +5642,14 @@ static int do_copy_files(Context *context, Partition *p, const char *root) {
56425642
sfd, ".",
56435643
pfd, fn,
56445644
UID_INVALID, GID_INVALID,
5645-
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS|COPY_GRACEFUL_WARN|COPY_TRUNCATE|COPY_RESTORE_DIRECTORY_TIMESTAMPS,
5645+
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS|COPY_GRACEFUL_WARN|COPY_TRUNCATE|COPY_RESTORE_DIRECTORY_TIMESTAMPS|COPY_FS_VERITY,
56465646
denylist, subvolumes_by_source_inode);
56475647
} else
56485648
r = copy_tree_at(
56495649
sfd, ".",
56505650
tfd, ".",
56515651
UID_INVALID, GID_INVALID,
5652-
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS|COPY_GRACEFUL_WARN|COPY_TRUNCATE|COPY_RESTORE_DIRECTORY_TIMESTAMPS,
5652+
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS|COPY_GRACEFUL_WARN|COPY_TRUNCATE|COPY_RESTORE_DIRECTORY_TIMESTAMPS|COPY_FS_VERITY,
56535653
denylist, subvolumes_by_source_inode);
56545654
if (r < 0)
56555655
return log_error_errno(r, "Failed to copy '%s%s' to '%s%s': %m",

0 commit comments

Comments
 (0)