summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/agent/agent_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/agent/agent_plugin.c')
-rw-r--r--src/libstrongswan/plugins/agent/agent_plugin.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/agent/agent_plugin.c b/src/libstrongswan/plugins/agent/agent_plugin.c
index 322ded48c..dc6adc457 100644
--- a/src/libstrongswan/plugins/agent/agent_plugin.c
+++ b/src/libstrongswan/plugins/agent/agent_plugin.c
@@ -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;
}
-