diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-12-23 17:29:40 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-12-23 22:11:00 +0900 |
commit | 26c45a6c1d340e344157f7a6340782b4934b579f (patch) | |
tree | b08b0ea7d624a830be7dca9541a0402e487629e6 /src/tmpfiles | |
parent | d7301331e8db7050c8dc4b1b8c8f70b81d75b438 (diff) | |
download | systemd-26c45a6c1d340e344157f7a6340782b4934b579f.tar.gz |
tree-wide: have_effective_cap() may return negative errno
Diffstat (limited to 'src/tmpfiles')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 2 |
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. */ |