From: Rafael Garcia-Suarez Date: Thu, 25 Dec 2003 21:22:25 +0000 (+0000) Subject: Fix bug [perl #24641] : when POSIX::set[ug]id() are called, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13ec70afab644813396652ff23a6e02fbd3d00d7;p=p5sagit%2Fp5-mst-13.2.git 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 --- 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)