Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 21262
Status: resolved
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: rjbs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: on 5.6, POSIX::setuid only changes UID, leading to problems
Net::Server::Daemonize::set_uid calls POSIX::setuid and then checks that UID was changed. It does not check that EUID and UID match. On 5.6.1's POSIX, setuid only changes UID. That means that UID and EUID do not match, and taint mode is automatically enabled. set_uid should check that ($> == $uid) and ($< == $uid). -- rjbs
The next version will be released in a few days and will have the following code. Thanks for the report. POSIX::setuid($uid); if ($< != $uid || $> != $uid) { # check $> also (rt #21262) $< = $> = $uid; # try again - needed by some 5.8.0 linux systems (rt #13450) if ($< != $uid) { die "Couldn't become uid \"$uid\": $!\n"; } }