chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kmsg-syslogd: pass facility value into kmsg
[elogind.git]
/
src
/
tmpfiles.c
diff --git
a/src/tmpfiles.c
b/src/tmpfiles.c
index c5397ef846ca2cdcabbc945ee7efd0c2f37910e9..e92b1123c67f77d7ff9dea5896465378e8e3f076 100644
(file)
--- 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
/* 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. */
* /var/lock which are volatile and hence need to be recreated on
* bootup. */
@@
-303,6
+303,10
@@
static int dir_cleanup(
if (S_ISSOCK(s.st_mode) && unix_socket_alive(sub_path))
continue;
if (S_ISSOCK(s.st_mode) && unix_socket_alive(sub_path))
continue;
+ /* Ignore device nodes */
+ if (S_ISCHR(s.st_mode) || S_ISBLK(s.st_mode))
+ continue;
+
age = MAX3(timespec_load(&s.st_mtim),
timespec_load(&s.st_atim),
timespec_load(&s.st_ctim));
age = MAX3(timespec_load(&s.st_mtim),
timespec_load(&s.st_atim),
timespec_load(&s.st_ctim));
@@
-503,7
+507,7
@@
static int create_item(Item *i) {
break;
}
break;
}
- if ((r = label_fix(i->path)) < 0)
+ if ((r = label_fix(i->path
, false
)) < 0)
goto finish;
log_debug("%s created successfully.", i->path);
goto finish;
log_debug("%s created successfully.", i->path);
@@
-771,7
+775,8
@@
static int scandir_filter(const struct dirent *d) {
return 0;
if (d->d_type != DT_REG &&
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");
return 0;
return endswith(d->d_name, ".conf");
@@
-848,7
+853,7
@@
static int parse_argv(int argc, char *argv[]) {
}
if (!arg_clean && !arg_create && !arg_remove) {
}
if (!arg_clean && !arg_create && !arg_remove) {
- log_error("You need to specify at leat one of --clean, --create or --remove.");
+ log_error("You need to specify at lea
s
t one of --clean, --create or --remove.");
return -EINVAL;
}
return -EINVAL;
}