Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 1998 12:03:48 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, jkh@time.cdrom.com
Cc:        cvs-committers@FreeBSD.ORG, ghelmer@scl.ameslab.gov, imp@village.org, roberto@keltia.freenix.fr
Subject:   Re: cvs commit: src/usr.bin/msgs msgs.c
Message-ID:  <199807110203.MAA02791@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Well, it is innocuous, except it reduces portabilty (seteuid() isn't in
>> POSIX.1).  Here is an attempt at a portable version:
>> 
>> 	uid = getuid();
>> 	(void)setuid(uid);
>> 	(void)setuid(uid);
>
>I never knew that setuid() was "sticky" - what happens if you call it
>a 3rd time? :-) 

It depends on how bizarre "appropriate privilege" is and whether it
changes between the second and third calls.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807110203.MAA02791>