Messages in this thread Patch in this message | | | Date | Sun, 19 Sep 1999 09:30:25 +1000 | From | Herbert Xu <> | Subject | uid change in sock_alloc breaks identd |
| |
Hi: The following change introduced in 2.2.7 breaks identd on setuid processes like rlogin.
--- net/socket.c 1999/03/09 17:20:19 1.1.1.1 +++ net/socket.c 1999/04/23 02:45:20 1.1.1.2 @@ -279,8 +279,8 @@
inode->i_mode = S_IFSOCK|S_IRWXUGO; inode->i_sock = 1; - inode->i_uid = current->uid; - inode->i_gid = current->gid; + inode->i_uid = current->fsuid; + inode->i_gid = current->fsgid;
/proc/net/tcp is the only (if there is another one, please let me know :) easily accessible interface from userspace to find the uid of the creator of a TCP connection. identd returns information based on this.
Now in the case of a setuid client like rlogin, the real uid is ther user in question, while the euid and the fsuid are both root. What identd should return of course is the user's login name, not root. This used to work fine because /proc/net/tcp returned i_uid, which was the real uid. But the change in 2.2.7 meant that it now returns root.
For more detail on this problem, please go to http://www.debian.org/Bugs/db/44/44854.html
Now what I'd like to see is to have /proc/net/tcp again list the real uids instead of the fsuids (if anyone actually has some use for the fsuids, maybe you can list both of them). -- Debian GNU/Linux 2.1 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - 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/
| |