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

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

Thread Previous | Thread Next
Leon Timmermans
May 23, 2013 15:33
Re: [perl #117539] Fix incorrect assumptions about gids & uids
Message ID:
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

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).

Otherwise, the patch looks ok to me.

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