chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: stop the service if ExecStartPost ends with a failure
[elogind.git]
/
src
/
nspawn.c
diff --git
a/src/nspawn.c
b/src/nspawn.c
index 8441c057b9fcf7b4f875cfb82bc9b05d04a82e80..653d7db730a80361b08a2b002415c0cb2e6fcaa6 100644
(file)
--- a/
src/nspawn.c
+++ b/
src/nspawn.c
@@
-361,7
+361,7
@@
static int drop_capabilities(void) {
unsigned long l;
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++)
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) {
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;
}
log_error("PR_CAPBSET_DROP failed: %m");
return -errno;
}