summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-02-22 22:00:55 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-02-22 22:00:55 +0100
commitd7f23732b6d24c35d6c0dbcc5ecec0207be0d977 (patch)
treebe690da8eae647b6e32a577e6cb4df59df7d5f22 /src
parentaac5eefccd859e5bed50a3772d90f20d46c575fa (diff)
downloadfastd-d7f23732b6d24c35d6c0dbcc5ecec0207be0d977.tar
fastd-d7f23732b6d24c35d6c0dbcc5ecec0207be0d977.zip
capabilities: print message about retained capabilities
Diffstat (limited to 'src')
-rw-r--r--src/capabilities.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/capabilities.c b/src/capabilities.c
index 5e02df3..3feed89 100644
--- a/src/capabilities.c
+++ b/src/capabilities.c
@@ -97,6 +97,12 @@ static bool need_cap_net_raw(void) {
}
static void set_cap(cap_t caps, cap_value_t cap) {
+ char *name = cap_to_name(cap);
+ if (name) {
+ pr_verbose("retaining %s", name);
+ cap_free(name);
+ }
+
if (cap_set_flag(caps, CAP_PERMITTED, 1, &cap, CAP_SET) < 0)
exit_errno("cap_set_flags");
if (cap_set_flag(caps, CAP_EFFECTIVE, 1, &cap, CAP_SET) < 0)