diff options
| author | Tobias Brunner <tobias@strongswan.org> | 2013-11-21 17:12:21 +0100 |
|---|---|---|
| committer | Tobias Brunner <tobias@strongswan.org> | 2014-01-23 10:08:23 +0100 |
| commit | 54ca25800cba9e348d174ffefe0e0b878ea9d7db (patch) | |
| tree | 0c6ee24fbe6cc8a0bb8322af62e785022d36dd85 /src/libstrongswan/plugins/agent | |
| parent | 53d2164c5d8a9d9080224771be7a8af73b7784da (diff) | |
| download | strongswan-54ca25800cba9e348d174ffefe0e0b878ea9d7db.tar.bz2 strongswan-54ca25800cba9e348d174ffefe0e0b878ea9d7db.tar.xz | |
agent: Keep CAP_DAC_OVERRIDE to connect to ssh-agent socket
This is also required if charon-cmd is used with capability dropping.
Diffstat (limited to 'src/libstrongswan/plugins/agent')
| -rw-r--r-- | src/libstrongswan/plugins/agent/agent_plugin.c | 8 | ||||
| -rw-r--r-- | src/libstrongswan/plugins/agent/agent_private_key.c | 1 |
2 files changed, 7 insertions, 2 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; } - diff --git a/src/libstrongswan/plugins/agent/agent_private_key.c b/src/libstrongswan/plugins/agent/agent_private_key.c index 8a3fb150a..c2e82a9f1 100644 --- a/src/libstrongswan/plugins/agent/agent_private_key.c +++ b/src/libstrongswan/plugins/agent/agent_private_key.c @@ -442,4 +442,3 @@ agent_private_key_t *agent_private_key_open(key_type_t type, va_list args) } return &this->public; } - |
