http://bugzilla.spamassassin.org/show_bug.cgi?id=3586
------- Additional Comments From [EMAIL PROTECTED] 2004-07-11 20:00 -------
Subject: Re: failed sanity check
On Sun, Jul 11, 2004 at 07:46:31PM -0700, [EMAIL PROTECTED] wrote:
> I'm going to post a message to one of the perl and/or FreeBSD mailing lists.
> How should I phrase the question? "Why won't perl drop root privilages?"
Interestingly, the same exact issue occurs on my Mac OS X machine,
but not any of the other platforms I have access to...
root# perl -e 'sub p {print "RUID: $<, EUID: $>\n";} p; $>=1000; p; $<=$>; p;'
RUID: 0, EUID: 0
RUID: 0, EUID: 1000
RUID: 0, EUID: 1000
The end line should read "RUID: 1000, EUID: 1000".
Linux:
# perl -e 'sub p {print "RUID: $<, EUID: $>\n";} p; $>=1000; p; $<=$>; p;'
RUID: 0, EUID: 0
RUID: 0, EUID: 1000
RUID: 1000, EUID: 1000
Solaris:
# perl -e 'sub p {print "RUID: $<, EUID: $>\n";} p; $>=1000; p; $<=$>; p;'
RUID: 0, EUID: 0
RUID: 0, EUID: 1000
RUID: 1000, EUID: 1000
More interesting bits:
# perl -e 'sub p {print "RUID: $<, EUID: $>\n";} p; $<=1000; p;'
RUID: 0, EUID: 0
RUID: 0, EUID: 0
# perl -e 'sub p {print "RUID: $<, EUID: $>\n";} p; use POSIX; setuid(1000); p;'
RUID: 0, EUID: 0
RUID: 0, EUID: 0
# cat - > t.c
main() {
printf("RUID: %d, EUID: %d\n", getuid(), geteuid());
setuid(1000);
printf("RUID: %d, EUID: %d\n", getuid(), geteuid());
}
# gcc t.c
# ./a.out
RUID: 0, EUID: 0
RUID: 1000, EUID: 1000
so setuid() obviously works. just not at all from perl.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.