|
Jan F |
9cefae |
diff -up openssh-5.8p1/log.h.wIm openssh-5.8p1/log.h
|
|
Jan F |
9cefae |
--- openssh-5.8p1/log.h.wIm 2008-06-13 02:22:54.000000000 +0200
|
|
Jan F |
842f43 |
+++ openssh-5.8p1/log.h 2011-02-22 09:21:58.000000000 +0100
|
|
Jan F |
842f43 |
@@ -63,6 +63,8 @@ void verbose(const char *, ...) __at
|
|
Jan F |
9cefae |
void debug(const char *, ...) __attribute__((format(printf, 1, 2)));
|
|
Jan F |
9cefae |
void debug2(const char *, ...) __attribute__((format(printf, 1, 2)));
|
|
Jan F |
9cefae |
void debug3(const char *, ...) __attribute__((format(printf, 1, 2)));
|
|
Jan F |
842f43 |
+void _debug_wIm_body(const char *, const char *);
|
|
Jan F |
842f43 |
+#define debug_wIm(a) _debug_wIm_body(a,__func__)
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
void do_log(LogLevel, const char *, va_list);
|
|
Jan F |
9cefae |
void cleanup_exit(int) __attribute__((noreturn));
|
|
Jan F |
9cefae |
diff -up openssh-5.8p1/Makefile.in.wIm openssh-5.8p1/Makefile.in
|
|
Jan F |
9cefae |
--- openssh-5.8p1/Makefile.in.wIm 2011-02-04 01:42:13.000000000 +0100
|
|
Jan F |
842f43 |
+++ openssh-5.8p1/Makefile.in 2011-02-22 09:20:18.000000000 +0100
|
|
Jan F |
9cefae |
@@ -71,7 +71,7 @@ LIBSSH_OBJS=acss.o authfd.o authfile.o b
|
|
Jan F |
9cefae |
cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \
|
|
Jan F |
9cefae |
compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \
|
|
Jan F |
9cefae |
log.o match.o md-sha256.o moduli.o nchan.o packet.o \
|
|
Jan F |
9cefae |
- readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \
|
|
Jan F |
9cefae |
+ readpass.o rsa.o ttymodes.o whereIam.o xmalloc.o addrmatch.o \
|
|
Jan F |
9cefae |
atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
|
|
Jan F |
9cefae |
monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \
|
|
Jan F |
9cefae |
kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \
|
|
Jan F |
9cefae |
diff -up openssh-5.8p1/sshd.c.wIm openssh-5.8p1/sshd.c
|
|
Jan F |
9cefae |
--- openssh-5.8p1/sshd.c.wIm 2011-01-11 07:20:31.000000000 +0100
|
|
Jan F |
842f43 |
+++ openssh-5.8p1/sshd.c 2011-02-22 09:20:18.000000000 +0100
|
|
Jan F |
9cefae |
@@ -139,6 +139,9 @@ int deny_severity;
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
extern char *__progname;
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
+/* trace of fork processes */
|
|
Jan F |
9cefae |
+extern int whereIam;
|
|
Jan F |
9cefae |
+
|
|
Jan F |
9cefae |
/* Server configuration options. */
|
|
Jan F |
9cefae |
ServerOptions options;
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
@@ -652,6 +655,7 @@ privsep_preauth(Authctxt *authctxt)
|
|
Jan F |
9cefae |
} else {
|
|
Jan F |
9cefae |
/* child */
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
+ whereIam = 1;
|
|
Jan F |
9cefae |
close(pmonitor->m_sendfd);
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
/* Demote the child */
|
|
Jan F |
9cefae |
@@ -693,6 +697,7 @@ privsep_postauth(Authctxt *authctxt)
|
|
Jan F |
9cefae |
exit(0);
|
|
Jan F |
9cefae |
}
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
+ whereIam = 2;
|
|
Jan F |
9cefae |
close(pmonitor->m_sendfd);
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
/* Demote the private keys to public keys. */
|
|
Jan F |
9cefae |
@@ -1302,6 +1307,8 @@ main(int ac, char **av)
|
|
Jan F |
9cefae |
Key *key;
|
|
Jan F |
9cefae |
Authctxt *authctxt;
|
|
Jan F |
9cefae |
|
|
Jan F |
9cefae |
+ whereIam = 0;
|
|
Jan F |
9cefae |
+
|
|
Jan F |
9cefae |
#ifdef HAVE_SECUREWARE
|
|
Jan F |
9cefae |
(void)set_auth_parameters(ac, av);
|
|
Jan F |
9cefae |
#endif
|
|
Jan F |
9cefae |
diff -up openssh-5.8p1/whereIam.c.wIm openssh-5.8p1/whereIam.c
|
|
Jan F |
842f43 |
--- openssh-5.8p1/whereIam.c.wIm 2011-02-22 09:20:18.000000000 +0100
|
|
Jan F |
842f43 |
+++ openssh-5.8p1/whereIam.c 2011-02-22 09:24:01.000000000 +0100
|
|
Jan F |
9cefae |
@@ -0,0 +1,9 @@
|
|
Jan F |
9cefae |
+
|
|
Jan F |
9cefae |
+int whereIam = -1;
|
|
Jan F |
9cefae |
+
|
|
Jan F |
842f43 |
+void _debug_wIm_body(const char *txt, const char *func)
|
|
Jan F |
9cefae |
+{
|
|
Jan F |
842f43 |
+ debug("%s: %s wIm = %d, uid=%d, euid=%d", txt, func, whereIam, getuid(), geteuid());
|
|
Jan F |
9cefae |
+}
|
|
Jan F |
9cefae |
+
|
|
Jan F |
9cefae |
+
|