From 13ec70afab644813396652ff23a6e02fbd3d00d7 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 25 Dec 2003 21:22:25 +0000 Subject: [PATCH] Fix bug [perl #24641] : when POSIX::set[ug]id() are called, update the perl variables PL_uid and PL_euid (resp. PL_gid and PL_egid) with the new values. p4raw-id: //depot/perl@21958 --- ext/POSIX/POSIX.xs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 049c1b6..3b39038 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1827,10 +1827,20 @@ pause() SysRet setgid(gid) Gid_t gid + CLEANUP: + if (RETVAL >= 0) { + PL_gid = getgid(); + PL_egid = getegid(); + } SysRet setuid(uid) Uid_t uid + CLEANUP: + if (RETVAL >= 0) { + PL_uid = getuid(); + PL_euid = geteuid(); + } SysRetLong sysconf(name) -- 2.7.4