openssh and port forwarding as root

Jarno Huuskonen Jarno.Huuskonen at
Wed Jun 20 20:32:41 EST 2001


Openssh sshd opens the socket that forwards users requested port
forwards as root, so the connection seems to come from root. Is it
enough to open the socket as normal user so the connection would appear
to come from that user ? (On Linux this seems to work, but what about
other OS's ?)

I tested this briefly by wrapping the
(in serverloop.c:server_request_direct_tcpip) with
temporarily_use_uid and restore_uid calls and it seems to work (I used
hardcoded values for temporarily_use_uid).  Is it possible to acquire
the username/uid/gid info in server_request_direct_tcpip (and where the
socket is opened with protocol 1) to add temporarily_use_uid / 
restore_uid calls ?


Jarno Huuskonen - System Administrator   |  Jarno.Huuskonen at
University of Kuopio - Computer Center   |  Work:   +358 17 162822
PO BOX 1627, 70211 Kuopio, Finland       |  Mobile: +358 40 5388169

More information about the openssh-unix-dev mailing list