summaryrefslogtreecommitdiffstats
path: root/src/nspawn/nspawn-cgroup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-24 18:43:56 +0200
committerLennart Poettering <lennart@poettering.net>2019-05-08 12:36:20 +0200
commite82e549fb2cd97966bd3a5d38dfab15e3d9cd7b6 (patch)
tree88197e8586bedd3d4f69eef35f3a9eaf555c141d /src/nspawn/nspawn-cgroup.c
parenttree-wide: voidify a few calls (diff)
downloadsystemd-e82e549fb2cd97966bd3a5d38dfab15e3d9cd7b6.tar.xz
systemd-e82e549fb2cd97966bd3a5d38dfab15e3d9cd7b6.zip
tree-wide: make use of the new WRITE_STRING_FILE_MKDIR_0755 flag
Diffstat (limited to 'src/nspawn/nspawn-cgroup.c')
-rw-r--r--src/nspawn/nspawn-cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c
index ec62b64b00..f84bb39796 100644
--- a/src/nspawn/nspawn-cgroup.c
+++ b/src/nspawn/nspawn-cgroup.c
@@ -121,10 +121,9 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
(void) rm_rf(fn, REMOVE_ROOT|REMOVE_ONLY_DIRECTORIES);
fn = strjoina(tree, cgroup, "/cgroup.procs");
- (void) mkdir_parents(fn, 0755);
sprintf(pid_string, PID_FMT, pid);
- r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER);
+ r = write_string_file(fn, pid_string, WRITE_STRING_FILE_DISABLE_BUFFER|WRITE_STRING_FILE_MKDIR_0755);
if (r < 0) {
log_error_errno(r, "Failed to move process: %m");
goto finish;