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

[perl #134195] [PATCH] setgroups() regression in perl 5.30

Thread Previous
From:
James E Keenan via RT
Date:
June 14, 2019 22:10
Subject:
[perl #134195] [PATCH] setgroups() regression in perl 5.30
Message ID:
rt-4.0.24-11941-1560550202-1549.134195-15-0@perl.org
On Fri, 14 Jun 2019 12:34:50 GMT, richard.purdie@linuxfoundation.org wrote:
> This is a bug report for perl from richard.purdie@linuxfoundation.org,
> generated with the help of perlbug 1.41 running under perl 5.30.0.
> 
> 
> -----------------------------------------------------------------
> We found that after upgrading from perl 5.28 to 5.30, the acl "make
> check"
> tests started failing. The problem can be simpified down to:
> 
> #!/usr/bin/env perl
> $) = "2 2";
> print $!;
> 
> Result from perl 5.28 under strace:
> 
> setgroups(1, [2])                       = 0
> setresgid(-1, 2, -1)                    = 0
> 
> Result from perl 5.30 under strace:
> 
> setgroups(1, [-1])                      = -1 EINVAL (Invalid argument)
> setresgid(-1, 2, -1)                    = 0
> 
> and we isolated this to this change:
> 
> https://perl5.git.perl.org/perl.git/commitdiff/5d4a52b5c68a11bfc97c2e24806993b84a61eade
> 
> The issue is that the new function changes the endptr to the end of
> the
>  scanned number and needs to be reset to the end of the string for
> each iteration of the loop.
> 
> A patch which fixes the issue for us is attached.
> 
> [Just for reference/completeness, this is a cross compiled perl built
> using the
> Yocto Project/OpenEmbedded]
> 
> 

For your program, I get the following results:

#####
$ perlbrew use perl-5.30.0
[p5p] $ perl 134195-acl.pl 
Operation not permitted[p5p] $ perlbrew use perl-5.28.0
[p5p] perl 134195-acl.pl 
Operation not permitted[p5p] $ perlbrew use perl-5.26.2
[p5p] $ perl 134195-acl.pl 
Operation not permitted
##### 

So I'm unsure how you got your results.

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=134195

Thread Previous


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