summaryrefslogtreecommitdiff
path: root/ssh-agent.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-06-09 16:23:07 +1000
committerDarren Tucker <dtucker@zip.com.au>2016-06-09 16:23:07 +1000
commit0fb7f5985351fbbcd2613d8485482c538e5123be (patch)
treee1f112e1d19fcb004a643bef8ce24c03ea38e5e2 /ssh-agent.c
parente6508898c3cd838324ecfe1abd0eb8cf802e7106 (diff)
Move prctl PR_SET_DUMPABLE into platform.c.
This should make it easier to add additional platform support such as Solaris (bz#2584).
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index 8aa25b30d..25d6ebc53 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -88,10 +88,6 @@
88#include "ssh-pkcs11.h" 88#include "ssh-pkcs11.h"
89#endif 89#endif
90 90
91#if defined(HAVE_SYS_PRCTL_H)
92#include <sys/prctl.h> /* For prctl() and PR_SET_DUMPABLE */
93#endif
94
95typedef enum { 91typedef enum {
96 AUTH_UNUSED, 92 AUTH_UNUSED,
97 AUTH_SOCKET, 93 AUTH_SOCKET,
@@ -1209,10 +1205,7 @@ main(int ac, char **av)
1209 setegid(getgid()); 1205 setegid(getgid());
1210 setgid(getgid()); 1206 setgid(getgid());
1211 1207
1212#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) 1208 platform_disable_tracing(0); /* strict=no */
1213 /* Disable ptrace on Linux without sgid bit */
1214 prctl(PR_SET_DUMPABLE, 0);
1215#endif
1216 1209
1217#ifdef WITH_OPENSSL 1210#ifdef WITH_OPENSSL
1218 OpenSSL_add_all_algorithms(); 1211 OpenSSL_add_all_algorithms();