Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Setting ulimit values in files on Redhat AS 2.1

Re: Setting ulimit values in files on Redhat AS 2.1

From: Scott Lurndal <scott_at_slp53.sl.home>
Date: Fri, 02 Jul 2004 22:06:45 GMT
Message-ID: <V%kFc.86078$SE3.39124@newssvr29.news.prodigy.com>


Steve <ThisOne_at_Aint.valid> writes:
>Scott Lurndal wrote:
>> Steve <ThisOne_at_Aint.valid> writes:

>>>
>>>Personally, I'd put them in /etc/profile. This is always run for all
>>>users, and with root privileges. That way, you can raise them up to the max.
>>
>>
>> /etc/profile is executed in the context of the logged in user, not root.
>> You cannot raise the ulimit using /etc/profile, only lower it.
>>
>>
>> scott
>>
>>
>>>Steve
>
>I was about to deny 'hotly' this statement, but thought to check first.
>Glad I did! As you may have guessed, this used to be the way it was
>done, at least on commercial *nixes ( Solaris, HP-UX, DEC Ultrix ).

Perhaps the *BSD based systems, but no System-V based system (SVR2, SVR3, SVR4, SVR4.2MP, SVR4/MK, Unixware or Solaris) has ever sourced /etc/profile as root[*]. The code that changes the UID to the new user is in login(1) and happens before the shell is invoked with the single "-" argument which tells the shell it needs to read /etc/profile.

Remember that /etc/profile must be sourced in the context of the shell process itself, it cannot be executed stand-alone. To be able to source it with the effective UID == 0, one would have to invoke the shell with UID 0 and trust the shell to set the effective, real and saved UID's to the correct uid for the user after reading and processing /etc/profile. No shell has ever been trusted to do this.

scott

[*] unless of course, you log in as root.

>
>Either it has been changed, or Linux differs from the old System V in
>this way.
>
>It's always good to learn something new, even at the weekend!
>
>Cheers,
>
>Steve
Received on Fri Jul 02 2004 - 17:06:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US