diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-12-10 03:16:14 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-12-10 03:21:07 +0100 |
commit | 2822da4fb7f891e5320f02f1d00f64b72221ced4 (patch) | |
tree | 53d99b2f6cfd0d0e81b47671a03f1c3e1e5880fc /src/nspawn/nspawn.c | |
parent | 45823da23ccfea5159fafa844ede0a873a460df8 (diff) |
util: introduce our own gperf based capability list
This way, we can ensure we have a more complete, up-to-date list of
capabilities around, always.
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r-- | src/nspawn/nspawn.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 932696aa9e..0466ddbff3 100644 --- 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 "cap-list.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; - cap_value_t cap; t = strndup(word, length); if (!t) @@ -413,7 +413,10 @@ static int parse_argv(int argc, char *argv[]) { 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; } |