From e82e549fb2cd97966bd3a5d38dfab15e3d9cd7b6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 24 Apr 2019 18:43:56 +0200 Subject: tree-wide: make use of the new WRITE_STRING_FILE_MKDIR_0755 flag --- src/nspawn/nspawn-cgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nspawn/nspawn-cgroup.c') 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; -- cgit v1.2.3