summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-11-03 11:09:39 +0000
committerNicholas Clark <nick@ccl4.org>2005-11-03 11:09:39 +0000
commitae1951c189f1b82f18b60e8a8dae5f87c3eedec8 (patch)
tree73a4c1c0d932e79ae6b4237b48757a1d9f568d4b /doio.c
parent5d329e6ec94ef5c5ac1218b95aaf35eb2c75b434 (diff)
downloadperl-ae1951c189f1b82f18b60e8a8dae5f87c3eedec8.tar.gz
Patch 3945 was a bit overkeen - the effective parameter to cando() and
ingroup() is a boolean flag, not a GID or UID. p4raw-id: //depot/perl@25969
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/doio.c b/doio.c
index 0af6a0a636..5511b55b61 100644
--- a/doio.c
+++ b/doio.c
@@ -1872,9 +1872,10 @@ nothing in the core.
/* Do the permissions allow some operation? Assumes statcache already set. */
#ifndef VMS /* VMS' cando is in vms.c */
bool
-Perl_cando(pTHX_ Mode_t mode, Uid_t effective, register const Stat_t *statbufp)
-/* Note: we use "effective" both for uids and gids.
- * Here we are betting on Uid_t being equal or wider than Gid_t. */
+Perl_cando(pTHX_ Mode_t mode, bool effective, register const Stat_t *statbufp)
+/* effective is a flag, true for EUID, or for checking if the effective gid
+ * is in the list of groups returned from getgroups().
+ */
{
#ifdef DOSISH
/* [Comments and code from Len Reed]
@@ -1926,7 +1927,7 @@ Perl_cando(pTHX_ Mode_t mode, Uid_t effective, register const Stat_t *statbufp)
#endif /* ! VMS */
bool
-Perl_ingroup(pTHX_ Gid_t testgid, Uid_t effective)
+Perl_ingroup(pTHX_ Gid_t testgid, bool effective)
{
#ifdef MACOS_TRADITIONAL
/* This is simply not correct for AppleShare, but fix it yerself. */