# New Ticket Created by  Cory Spencer 
# Please include the string:  [perl #126560]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=126560 >


I recently committed the starts of a POSIX module to the p6 ecosystem and 
noticed that when using the POSIX::setuid and POSIX::setgid function calls, the 
$*USER and $*GROUP variables to not update as expected when program privileges 
change.

I have attached a sample program demonstrating this below.  Note that the 
program must be run as root.

Here is the output on my machine:

~$ sudo perl6 ./uid-gid.p6
$*USER reports UID as: 0
$*GROUP reports GID as: 0

POSIX::getuid reports UID as: 0
POSIX::getgid reports GID as: 0

Dropping privileges to 'nobody' user...

Privileges dropped.

$*USER reports UID as: 0
$*GROUP reports GID as: 0

POSIX::getuid reports UID as: 65534
POSIX::getgid reports GID as: 65534

Attachment: uid-gid.p6
Description: Binary data

Reply via email to