login bug? Fix?
Cathey, Jim
jcathey at ciena.com
Fri Nov 7 03:20:55 UTC 2008
My apologies for the formatting, but I'm not yet
conversant with the patch format you want. (We spend
all our time here in accurev.) I missed a line that
went with the nologin fixes in login.c:
- if (!amroot)
+ if (!amroot || pw->pw_uid)
die_if_nologin();
Without this change it in fact does not throw you
off the box if you're logging in as non-root while
the /etc/nologin is in effect.
I'm not entirely sure that this is right anyway, as
if you run login by hand and try to become root, I
think it'll throw you off altogether at that point.
Perhaps it should only check pw->pw_uid for this test
and not amroot at all? As in:
if (pw->pw_uid)
die_if_nologin();
Seems to me that the purpose is to only allow logins
that are root, who you were before is irrelevant.
-- Jim
More information about the busybox
mailing list