diff options
author | Tobias Brunner <tobias@strongswan.org> | 2009-04-30 11:37:54 +0000 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2009-04-30 11:37:54 +0000 |
commit | d24a74c5b4fb62b720a79b632021746b69de7c45 (patch) | |
tree | fd8854673b9d72059d7f9459a82663d5a70617ce /src/charon/daemon.c | |
parent | 466f11bfaf56c389947b2cbee6dd4f1fb56a821e (diff) | |
download | strongswan-d24a74c5b4fb62b720a79b632021746b69de7c45.tar.bz2 strongswan-d24a74c5b4fb62b720a79b632021746b69de7c45.tar.xz |
merging changes from portability branch back to trunk
important change for developers: %Y replaces %D to print identities!
Diffstat (limited to 'src/charon/daemon.c')
-rw-r--r-- | src/charon/daemon.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/charon/daemon.c b/src/charon/daemon.c index 6dcb39a89..339846a85 100644 --- a/src/charon/daemon.c +++ b/src/charon/daemon.c @@ -17,7 +17,9 @@ */ #include <stdio.h> +#ifdef HAVE_PRCTL #include <sys/prctl.h> +#endif #include <signal.h> #include <pthread.h> #include <sys/stat.h> @@ -240,8 +242,10 @@ static void kill_daemon(private_daemon_t *this, char *reason) * drop daemon capabilities */ static void drop_capabilities(private_daemon_t *this) -{ +{ +#ifdef HAVE_PRCTL prctl(PR_SET_KEEPCAPS, 1); +#endif if (setgid(charon->gid) != 0) { |