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

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

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
May 23, 2013 15:33
Subject:
Re: [perl #117539] Fix incorrect assumptions about gids & uids
Message ID:
CAHhgV8jHN9HqCiBsAB26_6WrJRM0oGgqkVu+bW5Sheg9pgYV0g@mail.gmail.com
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.

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


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