chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: introduce our own gperf based capability list
[elogind.git]
/
src
/
nspawn
/
nspawn.c
diff --git
a/src/nspawn/nspawn.c
b/src/nspawn/nspawn.c
index 932696aa9e1fae860c930f7a7ef656003774cb78..0466ddbff3ebae0f1b0569da607f8adbf93d27e9 100644
(file)
--- a/
src/nspawn/nspawn.c
+++ b/
src/nspawn/nspawn.c
@@
-90,6
+90,7
@@
#include "base-filesystem.h"
#include "barrier.h"
#include "event-util.h"
#include "base-filesystem.h"
#include "barrier.h"
#include "event-util.h"
+#include "cap-list.h"
#ifdef HAVE_SECCOMP
#include "seccomp-util.h"
#ifdef HAVE_SECCOMP
#include "seccomp-util.h"
@@
-401,7
+402,6
@@
static int parse_argv(int argc, char *argv[]) {
FOREACH_WORD_SEPARATOR(word, length, optarg, ",", state) {
_cleanup_free_ char *t;
FOREACH_WORD_SEPARATOR(word, length, optarg, ",", state) {
_cleanup_free_ char *t;
- cap_value_t cap;
t = strndup(word, length);
if (!t)
t = strndup(word, length);
if (!t)
@@
-413,7
+413,10
@@
static int parse_argv(int argc, char *argv[]) {
else
minus = (uint64_t) -1;
} else {
else
minus = (uint64_t) -1;
} else {
- if (cap_from_name(t, &cap) < 0) {
+ int cap;
+
+ cap = capability_from_name(t);
+ if (cap < 0) {
log_error("Failed to parse capability %s.", t);
return -EINVAL;
}
log_error("Failed to parse capability %s.", t);
return -EINVAL;
}