diff -ur openssh-3.6.1p1.orig/ssh-agent.c openssh-3.6.1p1/ssh-agent.c --- openssh-3.6.1p1.orig/ssh-agent.c Sat Mar 15 00:37:09 2003 +++ openssh-3.6.1p1/ssh-agent.c Mon Apr 7 22:10:45 2003 @@ -40,6 +40,10 @@ #include #include +#ifdef __linux__ +#include +#endif + #include "ssh.h" #include "rsa.h" #include "buffer.h" @@ -1004,6 +1008,18 @@ /* drop */ setegid(getgid()); setgid(getgid()); + +#ifdef __linux__ +/* + * Protect this process even if it's not installed SGID (Linux 2.4+ only, + * but we also want to compile this in with older Linux kernel headers in + * case the binary is actually run with a 2.4+ kernel). + */ +#ifndef PR_SET_DUMPABLE +#define PR_SET_DUMPABLE 4 +#endif + prctl(PR_SET_DUMPABLE, 0); +#endif SSLeay_add_all_algorithms();