summaryrefslogtreecommitdiff
path: root/src/nspawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nspawn.c')
-rw-r--r--src/nspawn.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nspawn.c b/src/nspawn.c
index 8441c057b9..653d7db730 100644
--- a/src/nspawn.c
+++ b/src/nspawn.c
@@ -361,7 +361,7 @@ static int drop_capabilities(void) {
unsigned long l;
- for (l = 0; l <= MAX(63LU, (unsigned long) CAP_LAST_CAP); l++) {
+ for (l = 0; l <= cap_last_cap(); l++) {
unsigned i;
for (i = 0; i < ELEMENTSOF(retain); i++)
@@ -372,12 +372,6 @@ static int drop_capabilities(void) {
continue;
if (prctl(PR_CAPBSET_DROP, l) < 0) {
-
- /* If this capability is not known, EINVAL
- * will be returned, let's ignore this. */
- if (errno == EINVAL)
- break;
-
log_error("PR_CAPBSET_DROP failed: %m");
return -errno;
}