summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.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/systemctl/systemctl.c
parentc3272fd4df4a2ff3ebc1b8d4024d56bc803a1b62 (diff)
downloadsystemd-8a016c746ef4f7e9b5fcc5fc7086e80880d84608.tar.gz
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/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 8c8e496da5..2f3efd23c4 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7210,7 +7210,7 @@ static int create_edit_temp_file(const char *new_path, const char *original_path
if (r < 0)
return log_error_errno(r, "Failed to create directories for \"%s\": %m", new_path);
- r = copy_file(original_path, t, 0, 0644, 0, COPY_REFLINK);
+ r = copy_file(original_path, t, 0, 0644, 0, 0, COPY_REFLINK);
if (r == -ENOENT) {
r = touch(t);