On Tue, 2003-12-09 at 18:57, Stas Bekman wrote:
Which probably means that your perl POSIX implementation is broken.
Wed Dec 10 12:15:18 [EMAIL PROTECTED]:~> su -
Password: [EMAIL PROTECTED] root]# perl -le 'require POSIX; POSIX::setgid(99) or die
"failed to run: $@";'
[EMAIL PROTECTED] root]# perl -le 'require POSIX; POSIX::setuid(65534) or
die "failed to setuid: $@"; print -r q{/root} && -w _ && -x _ ? q{OK} :
q{NOK}; '
OK
Your nobody and my nobody are not the same nobody ;) grep ^nobody /etc/passwd nobody:x:99:99:Nobody:/:/sbin/nologin
Can you please try this one:
% perl -le ' \
my($uid, $gid) = (getpwnam("nobody"))[2..3]; \
$( = $) = $gid+0; \
die "failed to change gid to $gid (now: $(, $))" if $( != $gid; \
$< = $> = $uid+0; \
die "failed to change uid to $uid (now: $<, $>)" if $< != $uid; \
print -r q{/root} && -w _ && -x _ ? q{OK} : q{NOK};'BTW, it should work correctly no matter if you have nologin in /etc/passwd or not.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
