diff options
author | Martin Willi <martin@strongswan.org> | 2008-05-07 08:46:37 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-05-07 08:46:37 +0000 |
commit | 5d892343fa527873f7f892e3ba3b0d5b86c78a9c (patch) | |
tree | 663639617ba3cda81bced272bf260d732fa85a51 /src | |
parent | 86ab5636c2c9085c70688910fc3cd1f90a38187d (diff) | |
download | strongswan-5d892343fa527873f7f892e3ba3b0d5b86c78a9c.tar.bz2 strongswan-5d892343fa527873f7f892e3ba3b0d5b86c78a9c.tar.xz |
using capset version 1 if a newer is available
Diffstat (limited to 'src')
-rw-r--r-- | src/charon/daemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/charon/daemon.c b/src/charon/daemon.c index 87f33480f..0400a991d 100644 --- a/src/charon/daemon.c +++ b/src/charon/daemon.c @@ -266,7 +266,13 @@ static void drop_capabilities(private_daemon_t *this, bool full) keep |= (1<<CAP_SETGID); } + /* we use the old capset version for now. For systems with version 2 + * available, we specifiy version 1 excplicitly. */ +#ifdef _LINUX_CAPABILITY_VERSION_1 + hdr.version = _LINUX_CAPABILITY_VERSION_1; +#else hdr.version = _LINUX_CAPABILITY_VERSION; +#endif hdr.pid = 0; data.inheritable = data.effective = data.permitted = keep; |