From: Lennart Poettering Date: Tue, 15 Oct 2024 13:36:06 +0000 (+0200) Subject: debug-generator: create prefix dir of generate unit file X-Git-Tag: v257-rc1~212^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F34781%2Fhead;p=thirdparty%2Fsystemd.git debug-generator: create prefix dir of generate unit file Strictly speaking, it's more correct if we create the prefix path before writing our unit file. --- diff --git a/src/debug-generator/debug-generator.c b/src/debug-generator/debug-generator.c index 76379806896..98670a6c906 100644 --- a/src/debug-generator/debug-generator.c +++ b/src/debug-generator/debug-generator.c @@ -206,7 +206,7 @@ static int process_unit_credentials(const char *credentials_dir) { if (!p) return log_oom(); - r = write_string_file_atomic_label(p, d); + r = write_string_file_at_label(AT_FDCWD, p, d, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC|WRITE_STRING_FILE_MKDIR_0755); if (r < 0) { log_warning_errno(r, "Failed to write unit file '%s' from credential '%s', ignoring: %m", unit, de->d_name);