OpenSSH-3.9p1 permanently_set_uid behavior on Linux
Glen Nakamura
glen at imodulo.com
Sat Aug 28 04:42:48 EST 2004
Aloha,
I'm curious about the following code at line 203 in uidswap.c:
/* Try restoration of GID if changed (test clearing of saved gid) */
if (old_gid != pw->pw_gid &&
(setgid(old_gid) != -1 || setegid(old_gid) != -1))
fatal("%s: was able to restore old [e]gid", __func__);
This causes permanently_set_uid to fail in the following case:
$ su
Password: ????????
# newgrp bin
# ssh remotehost
permanently_set_uid: was able to restore old [e]gid
#
Is this the desired behavior or should the code special case running as root?
- Glen Nakamura
More information about the openssh-unix-dev
mailing list