summaryrefslogtreecommitdiff
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-12-23 17:29:40 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-12-23 22:11:00 +0900
commit26c45a6c1d340e344157f7a6340782b4934b579f (patch)
treeb08b0ea7d624a830be7dca9541a0402e487629e6 /src/tmpfiles
parentd7301331e8db7050c8dc4b1b8c8f70b81d75b438 (diff)
downloadsystemd-26c45a6c1d340e344157f7a6340782b4934b579f.tar.gz
tree-wide: have_effective_cap() may return negative errno
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 538d5273cf..5fb4cbf04a 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -2520,7 +2520,7 @@ static int create_item(Item *i) {
case CREATE_BLOCK_DEVICE:
case CREATE_CHAR_DEVICE:
- if (have_effective_cap(CAP_MKNOD) == 0) {
+ if (have_effective_cap(CAP_MKNOD) <= 0) {
/* In a container we lack CAP_MKNOD. We shouldn't attempt to create the device node in that
* case to avoid noise, and we don't support virtualized devices in containers anyway. */