emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bad configure check


From: Andreas Schwab
Subject: Re: Bad configure check
Date: Fri, 26 Apr 2002 23:07:02 +0200
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux)

Colin Walters <address@hidden> writes:

|> Can anyone suggest a portable way to determine whether or not a program
|> is setuid while it's running?  My original thought was to compare the
|> return values of getuid() and geteuid(), but it seems this will fail if
|> root runs Emacs.

Does it?  Even root should obey setuid to a different user.  And
experiments show that this is the case.

# ls -l /tmp/id
-rwsr-sr-x    1 games    game       107165 Apr 15 17:28 /tmp/id
# /tmp/id
uid=0(root) gid=0(root) euid=12(games) egid=40(game) 
groups=0(root),1(bin),14(uucp),15(shadow),16(dialout),17(audio),65534(nogroup),65533(nobody),52(dbmaker)

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]