diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-06-25 09:03:00 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-06-25 17:16:33 +0200 |
commit | 1091edede8b8308bccd3f0d356ab77d70cb97559 (patch) | |
tree | c1c18b23c3db2ee463984dd19529253e7e02451b /src/libcharon/plugins/stroke/stroke_plugin.c | |
parent | 19375384403d08624a405a5e733d99bb5be62e2e (diff) | |
download | strongswan-1091edede8b8308bccd3f0d356ab77d70cb97559.tar.bz2 strongswan-1091edede8b8308bccd3f0d356ab77d70cb97559.tar.xz |
capabilities: CAP_CHOWN might be required by many plugins opening UNIX sockets
But as the sockets will be created with the user/group of the running
process this might not be required as no change may be needed.
Diffstat (limited to 'src/libcharon/plugins/stroke/stroke_plugin.c')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_plugin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_plugin.c b/src/libcharon/plugins/stroke/stroke_plugin.c index 4e47a120d..6c4687f4a 100644 --- a/src/libcharon/plugins/stroke/stroke_plugin.c +++ b/src/libcharon/plugins/stroke/stroke_plugin.c @@ -91,6 +91,12 @@ plugin_t *stroke_plugin_create() { private_stroke_plugin_t *this; + if (!lib->caps->keep(lib->caps, CAP_CHOWN)) + { /* required to chown(2) stroke socket */ + DBG1(DBG_CFG, "stroke plugin requires CAP_CHOWN capability"); + return NULL; + } + INIT(this, .public = { .plugin = { |