diff -up openssh-5.6p1/log.h.wIm openssh-5.6p1/log.h
--- openssh-5.6p1/log.h.wIm 2008-06-13 02:22:54.000000000 +0200
+++ openssh-5.6p1/log.h 2011-01-11 10:35:32.000000000 +0100
@@ -63,6 +63,7 @@ void verbose(const char *, ...) __at
void debug(const char *, ...) __attribute__((format(printf, 1, 2)));
void debug2(const char *, ...) __attribute__((format(printf, 1, 2)));
void debug3(const char *, ...) __attribute__((format(printf, 1, 2)));
+void debug_wIm(const char *);
void do_log(LogLevel, const char *, va_list);
void cleanup_exit(int) __attribute__((noreturn));
diff -up openssh-5.6p1/Makefile.in.wIm openssh-5.6p1/Makefile.in
--- openssh-5.6p1/Makefile.in.wIm 2010-05-12 08:51:39.000000000 +0200
+++ openssh-5.6p1/Makefile.in 2011-01-11 10:35:32.000000000 +0100
@@ -69,7 +69,7 @@ LIBSSH_OBJS=acss.o authfd.o authfile.o b
cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \
compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \
log.o match.o md-sha256.o moduli.o nchan.o packet.o \
- readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \
+ readpass.o rsa.o ttymodes.o whereIam.o xmalloc.o addrmatch.o \
atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \
kexgex.o kexdhc.o kexgexc.o msg.o progressmeter.o dns.o \
diff -up openssh-5.6p1/sshd.c.wIm openssh-5.6p1/sshd.c
--- openssh-5.6p1/sshd.c.wIm 2010-04-16 07:56:22.000000000 +0200
+++ openssh-5.6p1/sshd.c 2011-01-11 10:35:32.000000000 +0100
@@ -139,6 +139,9 @@ int deny_severity;
extern char *__progname;
+/* trace of fork processes */
+extern int whereIam;
+
/* Server configuration options. */
ServerOptions options;
@@ -652,6 +655,7 @@ privsep_preauth(Authctxt *authctxt)
} else {
/* child */
+ whereIam = 1;
close(pmonitor->m_sendfd);
/* Demote the child */
@@ -693,6 +697,7 @@ privsep_postauth(Authctxt *authctxt)
exit(0);
}
+ whereIam = 2;
close(pmonitor->m_sendfd);
/* Demote the private keys to public keys. */
@@ -1299,6 +1304,8 @@ main(int ac, char **av)
Key *key;
Authctxt *authctxt;
+ whereIam = 0;
+
#ifdef HAVE_SECUREWARE
(void)set_auth_parameters(ac, av);
#endif
diff -up openssh-5.6p1/whereIam.c.wIm openssh-5.6p1/whereIam.c
--- openssh-5.6p1/whereIam.c.wIm 2011-01-11 10:35:32.000000000 +0100
+++ openssh-5.6p1/whereIam.c 2011-01-11 10:35:32.000000000 +0100
@@ -0,0 +1,9 @@
+
+int whereIam = -1;
+
+void debug_wIm(const char *txt)
+{
+ debug("%s wIm = %d, euid=%d", txt, whereIam, geteuid());
+}
+
+