ulimit -- You don't need sources! (kind of long)

Ian Dall ian at sibyl.eleceng.ua.OZ
Tue May 9 11:00:12 AEST 1989


In article <562 at aurora.AthabascaU.CA> lyndon at nexus.ca writes:
>In article <5627 at xyzzy.UUCP> duncan at rtp48.dg.com (W. Lee Duncan) writes:
>>I suppose all have already though of this, but you don't need sources
>>to modify login (or any other program).
>>
>>Simply move /bin/login to, e.g. /usr/lib/old_login (and make it non-setuid).
>>Then, create a new /bin/login program (which will be setuid to root):
>
>One problem with this is that cron jobs don't go through login. Yes I can
>add an explicit ulimit command to the command lines in cron, just as I
>can add wrappers around login. The fact that I have to do this on such
>a global scale argues that perhaps this limit shouldn't be there in the
>first place ...

If you want to defeat ulimit once and for all put the wrapper around
init. This is so small I will include it here

#define BIGNUM 0x204090
main(argc,argv) char **argv;
{ ulimit(2,BIGNUM); execv("/etc/init.real", argv); }

I can't quite remember what the rationale if any was for my choice of BIGNUM.
This does not to be suid because, of course, init runs with euid 0.

-- 
Ian Dall     life (n). A sexually transmitted disease which afflicts
                       some people more severely than others.       



More information about the Comp.bugs.sys5 mailing list