rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
Michel Lind 1c324b
--- a/serverloop.c
d1c05f
+++ b/serverloop.c
d1c05f
@@ -433,6 +433,7 @@ server_request_direct_tcpip(struct ssh *
d1c05f
 	char *target = NULL, *originator = NULL;
d1c05f
 	u_int target_port = 0, originator_port = 0;
d1c05f
 	int r;
d1c05f
+	uid_t user;
d1c05f
 
d1c05f
 	if ((r = sshpkt_get_cstring(ssh, &target, NULL)) != 0 ||
d1c05f
 	    (r = sshpkt_get_u32(ssh, &target_port)) != 0 ||
d1c05f
@@ -451,6 +452,11 @@ server_request_direct_tcpip(struct ssh *
d1c05f
 		goto out;
d1c05f
 	}
d1c05f
 
d1c05f
+	user = getuid();
d1c05f
+	logit("Tunnel: %s:%d -> %s:%d UID(%d) user %s",
d1c05f
+	    originator, originator_port, target, target_port, user,
d1c05f
+	    getpwuid(user)->pw_name);
d1c05f
+
d1c05f
 	debug_f("originator %s port %u, target %s port %u",
d1c05f
 	    originator, originator_port, target, target_port);
d1c05f