Blob Blame History Raw
--- a/serverloop.c
+++ b/serverloop.c
@@ -433,6 +433,7 @@ server_request_direct_tcpip(struct ssh *
 	char *target = NULL, *originator = NULL;
 	u_int target_port = 0, originator_port = 0;
 	int r;
+	uid_t user;
 
 	if ((r = sshpkt_get_cstring(ssh, &target, NULL)) != 0 ||
 	    (r = sshpkt_get_u32(ssh, &target_port)) != 0 ||
@@ -451,6 +452,11 @@ server_request_direct_tcpip(struct ssh *
 		goto out;
 	}
 
+	user = getuid();
+	logit("Tunnel: %s:%d -> %s:%d UID(%d) user %s",
+	    originator, originator_port, target, target_port, user,
+	    getpwuid(user)->pw_name);
+
 	debug_f("originator %s port %u, target %s port %u",
 	    originator, originator_port, target, target_port);