4.2 oddity -- SLOGIN flag in proc.h
Jeff Glass
jjg at security.UUCP
Tue Aug 13 23:46:13 AEST 1985
In article <607 at brl-tgr.ARPA> scc%computer-lab.cambridge.ac.uk at ucl-cs.arpa (Stephen Crawley) writes:
> The <sys/proc.h> header file contains the following line :-
>
> #define SLOGIN 0x0800000 /* a login process (legit child of init) */
>
> However, ps -axl indicates that this bit is not set for any processes.
> Indeed, grepping /sys/sys confirmed that SLOGIN isn't referenced anywhere.
> While making sure that the flag gets set would seem to be straight forward,
> I'm not convinced that it would be stunningly useful. [ What would be
> more useful would be if the login shell pid were recorded in /etc/utmp! ]
I think this method would be superior to the way that {c,}sh now find that
they are login shells (checking if argv[0][0] == '-'). at least one security
hole takes advantage of this.
I also think Stephen's suggestion (putting the pid in utmp) is pretty neat.
/jeff
--
security!jjg at mitre-bedford.ARPA (MIL)
{allegra,ihnp4,utzoo,philabs,uw-beaver}!linus!security!jjg (UUCP)
More information about the Comp.unix.wizards
mailing list