From 8a016c746ef4f7e9b5fcc5fc7086e80880d84608 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 28 Mar 2019 17:54:04 +0100 Subject: util-lib: when copying files make sure to apply some chattrs early, some late Some chattrs only work sensible if you set them right after opening a file for create (think: FS_NOCOW_FL). Others only work when they are applied when the file is fully written (think: FS_IMMUTABLE_FL). Let's take that into account when copying files and applying a chattr to them. --- src/portable/portable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/portable') diff --git a/src/portable/portable.c b/src/portable/portable.c index 44e6ca2d30..9b6cc21d2c 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -786,7 +786,7 @@ static int install_profile_dropin( if (flags & PORTABLE_PREFER_COPY) { - r = copy_file_atomic(from, dropin, 0644, 0, COPY_REFLINK); + r = copy_file_atomic(from, dropin, 0644, 0, 0, COPY_REFLINK); if (r < 0) return log_debug_errno(r, "Failed to copy %s %s %s: %m", from, special_glyph(SPECIAL_GLYPH_ARROW), dropin); -- cgit v1.2.1