X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Ftmpfiles.c;h=70a9ebd83111e609252c8c410a4cd4535d31f006;hb=3336686286cb0eab725190c14bc990b38fe57125;hp=0c3b88d35b19a1aaf56247802e95b88665911c7c;hpb=35b8ca3aaf8cb044ad76675dfcad89e000dd4a5c;p=elogind.git diff --git a/src/tmpfiles.c b/src/tmpfiles.c index 0c3b88d35..70a9ebd83 100644 --- a/src/tmpfiles.c +++ b/src/tmpfiles.c @@ -47,7 +47,7 @@ /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates * them in the file system. This is intended to be used to create - * properly owned directories beneath /tmp, /var/tmp, /var/run and + * properly owned directories beneath /tmp, /var/tmp, /run and * /var/lock which are volatile and hence need to be recreated on * bootup. */ @@ -466,6 +466,7 @@ static int create_item(Item *i) { case CREATE_DIRECTORY: u = umask(0); + mkdir_parents(i->path, 0755); r = mkdir(i->path, i->mode); umask(u); @@ -775,7 +776,8 @@ static int scandir_filter(const struct dirent *d) { return 0; if (d->d_type != DT_REG && - d->d_type != DT_LNK) + d->d_type != DT_LNK && + d->d_type != DT_UNKNOWN) return 0; return endswith(d->d_name, ".conf");