From d7f23732b6d24c35d6c0dbcc5ecec0207be0d977 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 22 Feb 2016 22:00:55 +0100 Subject: capabilities: print message about retained capabilities --- src/capabilities.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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) -- cgit v1.2.3