agent: Keep CAP_DAC_OVERRIDE to connect to ssh-agent socket

This is also required if charon-cmd is used with capability dropping.
This commit is contained in:
Tobias Brunner
2014-01-23 10:08:23 +01:00
parent 53d2164c5d
commit 54ca25800c
4 changed files with 10 additions and 14 deletions
@@ -63,6 +63,13 @@ plugin_t *agent_plugin_create()
{
private_agent_plugin_t *this;
/* required to connect to ssh-agent socket */
if (!lib->caps->keep(lib->caps, CAP_DAC_OVERRIDE))
{
DBG1(DBG_DMN, "agent plugin requires CAP_DAC_OVERRIDE capability");
return NULL;
}
INIT(this,
.public = {
.plugin = {
@@ -75,4 +82,3 @@ plugin_t *agent_plugin_create()
return &this->public.plugin;
}
@@ -442,4 +442,3 @@ agent_private_key_t *agent_private_key_open(key_type_t type, va_list args)
}
return &this->public;
}