ingroup() is a boolean flag, not a GID or UID.
p4raw-id: //depot/perl@25969
/* 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]
#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. */
p |void |boot_core_UNIVERSAL
p |void |boot_core_PerlIO
Ap |void |call_list |I32 oldscope|NN AV* av_list
-pR |bool |cando |Mode_t mode|Uid_t effective|NN const Stat_t* statbufp
+pR |bool |cando |Mode_t mode|bool effective|NN const Stat_t* statbufp
ApR |U32 |cast_ulong |NV f
ApR |I32 |cast_i32 |NV f
ApR |IV |cast_iv |NV f
ApP |I32 |ibcmp_locale |NN const char* a|NN const char* b|I32 len
Apd |I32 |ibcmp_utf8 |NN const char* a|NULLOK char **pe1|UV l1|bool u1 \
|NN const char* b|NULLOK char **pe2|UV l2|bool u2
-pR |bool |ingroup |Gid_t testgid|Uid_t effective
+pR |bool |ingroup |Gid_t testgid|bool effective
p |void |init_argv_symbols|int argc|NN char **argv
p |void |init_debugger
Ap |void |init_stacks
PERL_CALLCONV void Perl_call_list(pTHX_ I32 oldscope, AV* av_list)
__attribute__nonnull__(pTHX_2);
-PERL_CALLCONV bool Perl_cando(pTHX_ Mode_t mode, Uid_t effective, const Stat_t* statbufp)
+PERL_CALLCONV bool Perl_cando(pTHX_ Mode_t mode, bool effective, const Stat_t* statbufp)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_3);
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_5);
-PERL_CALLCONV bool Perl_ingroup(pTHX_ Gid_t testgid, Uid_t effective)
+PERL_CALLCONV bool Perl_ingroup(pTHX_ Gid_t testgid, bool effective)
__attribute__warn_unused_result__;
PERL_CALLCONV void Perl_init_argv_symbols(pTHX_ int argc, char **argv)