> From [EMAIL PROTECTED] Tue Aug 13 08:32:36 2002
> Date: Tue, 13 Aug 2002 10:41:53 -0400
> From: Rick Cochran <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: LPRng: Remaining bugs in 3.8.14 build
>
>
>
> Patrick Powell wrote:
> > The 'setruid()' is BROKEN?  Sigh... OK. Could you send me the output
> > of 'configure' and the output of running 'make -k' ?
> > 
> > Does it have setreuid()?  I need to be able to set the
> > real UID to a user value and the effective ID to root.
>
> Patrick,
>
> Thanks for asking!
>
> Here is the bird's eye low-down on this caper - straight from the AIX 
> manual:
>
... and lots of AIX man pages
>
> -- 
> |Rick Cochran                                   phone: 607-255-7618|
> |Cornell CIT - Systems & Operations - Net-Print   FAX: 607-255-8521|
> |730 Rhodes Hall, Ithaca, N.Y. 14853        email: [EMAIL PROTECTED]|

Right.  The setruid() behavior is identical (similar?) to the old SysV
stuff.  To make this work right you do:

   setuid( 0 /* root */); /* sets both RUID and EUID, and possibly 'hidden' */
   setruid( xxx ); /* now this is safe */

in LPRng/src/common/utilities.c you will find the bombproof
ways to do this stuff.  You can test it by:

su
checkpc -T /dev/null -D4

and watch the output :-)

Patrick Powell 



-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to