develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #117539] Fix incorrect assumptions about gids & uids

Thread Next
Tony Cook via RT
June 3, 2013 11:17
[perl #117539] Fix incorrect assumptions about gids & uids
Message ID:
On Thu May 23 08:33:42 2013, LeonT wrote:
> On Thu, May 23, 2013 at 6:08 AM, Brian Fraser via RT
> <> wrote:
> > Attached patch adds the suggested macros (SvUID, SvGID, sv_setuid,
> sv_setgid), and not only
> > reworks the bits the original patch changed, but also simplifies &
> fixes other parts of the core
> > that were checking [GU]id_t_size, sometimes erroneously.
> > Turns out that now the patch ends up removing more lines than it
> adds, which is always nice.
> >
> > Adding mPUSHuid & mPUSHgid seemed like overkill for how few times
> they end up being used,
> > so I didn't do that.
> >
> > TonyC++, great feedback!
> I think the �Uid_t_size > IVSIZE� case is crazy and can be safely
> removed. I can't imagine any platform having bigger uid_t than
> pointers.

That isn't a new check - it was added in 1999 by jhi - see

Brian's patch simply reproduces it.

> Also, I find sv_setuid/sv_setgid rather confusing names, given the
> setuid/setgid syscalls. I'd prefer to see it being called something
> else (sv_setid may be a good one, I can't imagine the signedness of
> uids not matching gids).

POSIX provides two types, Configure probes for both types.

I consider it unlikely for them to be different, but both POSIX and
Configure treats them different, so treating them as the same time feels
fragile to me.


via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About