There is a little problem in the function sock_alloc in
linux/net/socket.c. The problem is that the owner of an
newly allocated socket is fsuid,fsgid.
Setting the owner of a socket to fsuid and fsgid makes perfect
sense if the sockets are local, but it doesn't make sense if
the sockets are non-local. A result is that the owner of
tcp-connections from suid-programs like rlogin gets the wrong
owner. This shows in netstat and pidentd since the both
read the /proc/net/tcp and tcp_get_info just outputs the
socket owner (the fsuid). The correct behavios must be
outputting the uid.
At the moment sock_alloc doesn't differ between local and non-local
sockets. In this patch I change the behavior of sock_alloc such
that the allocation of a new socket specifies the domain of
the socket.
I've attached a patch for 2.4.0-test2. This patch fixes the
problem for me. Shouln't this be the behaivor? Comments?
-- Christoffer
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:18 EST