capabilities: Ensure required capabilities are actually held by the process/user
This commit is contained in:
@@ -52,6 +52,13 @@ plugin_t *xauth_pam_plugin_create()
|
||||
{
|
||||
xauth_pam_plugin_t *this;
|
||||
|
||||
/* required for PAM authentication */
|
||||
if (!charon->caps->keep(charon->caps, CAP_AUDIT_WRITE))
|
||||
{
|
||||
DBG1(DBG_DMN, "xauth-pam plugin requires CAP_AUDIT_WRITE capability");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
INIT(this,
|
||||
.plugin = {
|
||||
.get_name = _get_name,
|
||||
@@ -60,8 +67,5 @@ plugin_t *xauth_pam_plugin_create()
|
||||
},
|
||||
);
|
||||
|
||||
/* required for PAM authentication */
|
||||
charon->caps->keep(charon->caps, CAP_AUDIT_WRITE);
|
||||
|
||||
return &this->plugin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user