]> andersk Git - gssapi-openssh.git/blobdiff - openssh/ssh-agent.c
merged OpenSSH 3.8.1p1 to trunk
[gssapi-openssh.git] / openssh / ssh-agent.c
index e5232fc9b70a76343f378209a89674e492ed0b5a..f5fce6b2aa016d7f2dd4d9621d2efce583ee73c8 100644 (file)
@@ -57,6 +57,10 @@ RCSID("$OpenBSD: ssh-agent.c,v 1.117 2003/12/02 17:01:15 markus Exp $");
 #include "scard.h"
 #endif
 
+#if defined(HAVE_SYS_PRCTL_H)
+#include <sys/prctl.h> /* For prctl() and PR_SET_DUMPABLE */
+#endif
+
 typedef enum {
        AUTH_UNUSED,
        AUTH_SOCKET,
@@ -1023,6 +1027,11 @@ main(int ac, char **av)
        setegid(getgid());
        setgid(getgid());
 
+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
+       /* Disable ptrace on Linux without sgid bit */
+       prctl(PR_SET_DUMPABLE, 0);
+#endif
+
        SSLeay_add_all_algorithms();
 
        __progname = ssh_get_progname(av[0]);
This page took 0.035981 seconds and 4 git commands to generate.