From ae556c210942cb6986c6d77b58505b5daa66bbe2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 Jun 2011 13:33:56 +0200 Subject: execute: don't choke when systemd was compiled with a different CAP_LAST_CAP then what it is run with --- src/nspawn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nspawn.c') diff --git a/src/nspawn.c b/src/nspawn.c index b5908d63ff..1ade6e25ef 100644 --- a/src/nspawn.c +++ b/src/nspawn.c @@ -332,7 +332,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 <= MAX(63LU, (unsigned long) CAP_LAST_CAP); l++) { unsigned i; for (i = 0; i < ELEMENTSOF(retain); i++) @@ -347,7 +347,7 @@ static int drop_capabilities(void) { /* If this capability is not known, EINVAL * will be returned, let's ignore this. */ if (errno == EINVAL) - continue; + break; log_error("PR_CAPBSET_DROP failed: %m"); return -errno; -- cgit v1.2.3-54-g00ecf