SPUG: Understanding RUID EUID and modules (fwd)
Jim Ludwig
jsl at blarg.net
Wed May 16 13:16:41 PDT 2007
John Costello wrote:
>> If I run this from a perl script
>>
>>
>> print "RUID $< and EUID $>\n";
>> $< = $> = 8000;
>> print "RUID now $< and EUID now $>\n";
>> $< = $> = 0;
>> print "RUID set to $< and EUID set to $>\n";
>>
>> I get
>>
>> RUID 0 and EUID 0
>> RUID now 8000 and EUID now 8000
>> RUID set to 8000 and EUID set to 8000
>>
>> which is what I expect.
I don't know if you're going to expect this, but
if you run *this* script as root...
print "RUID $< and EUID $>\n";
#$< = $> = 8000;
$> = $< = 8000;
print "RUID now $< and EUID now $>\n";
$< = $> = 0;
print "RUID set to $< and EUID set to $>\n";
...then you get this:
RUID 0 and EUID 0
RUID now 8000 and EUID now 8000
RUID set to 0 and EUID set to 0
Cheers,
jim
More information about the spug-list
mailing list