Skip to content

Commit a65a9c4

Browse files
committed
Create parent directories when creating systemd-private subdirs
This is needed when systemd is compiled without systemd-tmpfiles
1 parent 0e7e854 commit a65a9c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/namespace.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,10 @@ static int setup_one_tmp_dir(const char *id, const char *prefix, char **path) {
16611661
if (!x)
16621662
return -ENOMEM;
16631663

1664+
r = mkdir_p(prefix,0777);
1665+
if (r < 0)
1666+
return r;
1667+
16641668
RUN_WITH_UMASK(0077)
16651669
if (!mkdtemp(x))
16661670
return -errno;

0 commit comments

Comments
 (0)