summaryrefslogtreecommitdiffstats
path: root/src/import/pull-tar.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-03-28 17:54:04 +0100
committerLennart Poettering <lennart@poettering.net>2019-03-28 18:43:04 +0100
commit8a016c746ef4f7e9b5fcc5fc7086e80880d84608 (patch)
tree3de74a91ac4963ec214009b55c14fd72b1429712 /src/import/pull-tar.c
parentmissing: add FS_PROJINHERIT_FL (diff)
downloadsystemd-8a016c746ef4f7e9b5fcc5fc7086e80880d84608.tar.xz
systemd-8a016c746ef4f7e9b5fcc5fc7086e80880d84608.zip
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.
Diffstat (limited to 'src/import/pull-tar.c')
-rw-r--r--src/import/pull-tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c
index e7a208e904..3930578a8c 100644
--- a/src/import/pull-tar.c
+++ b/src/import/pull-tar.c
@@ -244,7 +244,7 @@ static int tar_pull_make_local_copy(TarPull *i) {
local_settings = strjoina(i->image_root, "/", i->local, ".nspawn");
- r = copy_file_atomic(i->settings_path, local_settings, 0664, 0, COPY_REFLINK | (i->force_local ? COPY_REPLACE : 0));
+ r = copy_file_atomic(i->settings_path, local_settings, 0664, 0, 0, COPY_REFLINK | (i->force_local ? COPY_REPLACE : 0));
if (r == -EEXIST)
log_warning_errno(r, "Settings file %s already exists, not replacing.", local_settings);
else if (r == -ENOENT)