diff options
author | Kay Sievers <kay@vrfy.org> | 2014-06-13 04:11:11 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2014-06-13 04:12:50 +0200 |
commit | 6555ad8e9d0ae2ec65783b33f9a5fbc018da64d4 (patch) | |
tree | c786ed3f0a554e240a59c707cf8225767108be47 /src/tmpfiles/tmpfiles.c | |
parent | c1b6b04f0e90bbbce589b40db7c58ae2a64976eb (diff) |
tmpfiles: skip mknod() on -EPERM (device cgroup)
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index f515fe8c0c..df52085ff4 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -792,9 +792,17 @@ static int create_item(Item *i) { label_context_clear(); } - if (r < 0 && errno != EEXIST) { - log_error("Failed to create device node %s: %m", i->path); - return -errno; + if (r < 0) { + if (errno == EPERM) { + log_debug("We lack permissions, possibly because of cgroup configuration; " + "skipping creation of device node %s.", i->path); + return 0; + } + + if (errno != EEXIST) { + log_error("Failed to create device node %s: %m", i->path); + return -errno; + } } if (stat(i->path, &st) < 0) { |