capabilities: Only plugins that require CAP_NET_ADMIN demand it
The daemon as such does not require this capability.
This commit is contained in:
@@ -62,6 +62,12 @@ plugin_t *kernel_pfkey_plugin_create()
|
||||
{
|
||||
private_kernel_pfkey_plugin_t *this;
|
||||
|
||||
if (!lib->caps->keep(lib->caps, CAP_NET_ADMIN))
|
||||
{ /* required to open PF_KEY sockets */
|
||||
DBG1(DBG_KNL, "kernel-pfkey plugin requires CAP_NET_ADMIN capability");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
INIT(this,
|
||||
.public = {
|
||||
.plugin = {
|
||||
|
||||
Reference in New Issue
Block a user