X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fnspawn.c;h=653d7db730a80361b08a2b002415c0cb2e6fcaa6;hb=4f3656e1cec7fe3d7d3537e23a406cb88d734502;hp=8441c057b9fcf7b4f875cfb82bc9b05d04a82e80;hpb=3bb1c6b04f93841c10d2cb1c4e2945d5a0bb8ff1;p=elogind.git diff --git a/src/nspawn.c b/src/nspawn.c index 8441c057b..653d7db73 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; }