From: Arran Cudbard-Bell Date: Wed, 30 Sep 2020 18:30:19 +0000 (-0500) Subject: cap: Actually apply the new capabilitys *sigh* X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aecad72c64febd519d840fe445b57dbb5495aff7;p=thirdparty%2Ffreeradius-server.git cap: Actually apply the new capabilitys *sigh* --- diff --git a/src/lib/util/cap.c b/src/lib/util/cap.c index 7002d147124..08b778314f9 100644 --- a/src/lib/util/cap.c +++ b/src/lib/util/cap.c @@ -73,7 +73,8 @@ int fr_cap_set(cap_value_t cap) if (cap_get_flag(caps, cap, CAP_EFFECTIVE, &state) < 0) { char *cap_name = cap_to_name(cap); - fr_strerror_printf("Failed getting %s effective state: %s", cap_name, fr_syserror(errno)); + fr_strerror_printf("Failed getting %s effective state from working set: %s", + cap_name, fr_syserror(errno)); cap_free(cap_name); goto done; } @@ -89,11 +90,17 @@ int fr_cap_set(cap_value_t cap) if (cap_set_flag(caps, CAP_EFFECTIVE, NUM_ELEMENTS(to_set), to_set, CAP_SET) < 0) { char *cap_name = cap_to_name(cap); - fr_strerror_printf("Failed setting %s effective state: %s", cap_name, fr_syserror(errno)); + fr_strerror_printf("Failed setting %s effective state in worker set: %s", + cap_name, fr_syserror(errno)); cap_free(cap_name); goto done; } + if (cap_set_proc(caps) < 0) { + fr_strerror_printf("Failed setting %s effective state: %s", cap_name, fr_syserror(errno)); + goto done; + } + rcode = 0; /* * It's already in the effective set