On Fri, Nov 7, 2008 at 4:20 AM, Cathey, Jim <[EMAIL PROTECTED]> wrote: > 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.
Thanks, you are right. Fixed in svn now. Another one - is it a problem that our login does not setsid? Wouldn't it make it susceptible to attacks from processes in its process group or session? Those processes are "untrusted" since potentially they are run by non-root. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
