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

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

Thread Next
From:
Tony Cook via RT
Date:
June 3, 2013 11:17
Subject:
[perl #117539] Fix incorrect assumptions about gids & uids
Message ID:
rt-3.6.HEAD-2552-1370258228-1254.117539-15-0@perl.org
On Thu May 23 08:33:42 2013, LeonT wrote:
> On Thu, May 23, 2013 at 6:08 AM, Brian Fraser via RT
> <perlbug-followup@perl.org> 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
887d29384f0bc4b6197573ce19ff42abfe67fa51.

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.

Tony



---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=117539

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About