Fix setting supplementar group IDs
This commit is contained in:
parent
f41c4accda
commit
72e0efe7b7
|
@ -0,0 +1,56 @@
|
||||||
|
From 3121d45269f99e4f103ab5b830d517ded30081a8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Manuel Mausz <manuel@mausz.at>
|
||||||
|
Date: Mon, 17 Jun 2019 10:24:03 +0200
|
||||||
|
Subject: [PATCH] Add test for perl #134169
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
t/op/groups.t | 22 +++++++++++++++++++++-
|
||||||
|
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/t/op/groups.t b/t/op/groups.t
|
||||||
|
index e50c50a8c1..7e064cc21f 100644
|
||||||
|
--- a/t/op/groups.t
|
||||||
|
+++ b/t/op/groups.t
|
||||||
|
@@ -51,7 +51,7 @@ sub Test {
|
||||||
|
my %basegroup = basegroups( $pwgid, $pwgnam );
|
||||||
|
my @extracted_supplementary_groups = remove_basegroup( \ %basegroup, \ @extracted_groups );
|
||||||
|
|
||||||
|
- plan 2;
|
||||||
|
+ plan 3;
|
||||||
|
|
||||||
|
|
||||||
|
# Test: The supplementary groups in $( should match the
|
||||||
|
@@ -121,6 +121,26 @@ sub Test {
|
||||||
|
$gid_count->{0} //= 0;
|
||||||
|
ok 0 == $pwgid || $gid_count->{0} < 2, "groupstype should be type short, not long";
|
||||||
|
|
||||||
|
+ SKIP: {
|
||||||
|
+ # try to add a group as supplementary group
|
||||||
|
+ my $root_uid = 0;
|
||||||
|
+ skip "uid!=0", 1 if $< != $root_uid and $> != $root_uid;
|
||||||
|
+ my @groups = split ' ', $);
|
||||||
|
+ my @sup_group;
|
||||||
|
+ setgrent;
|
||||||
|
+ while(my @ent = getgrent) {
|
||||||
|
+ next if grep { $_ == $ent[2] } @groups;
|
||||||
|
+ @sup_group = @ent;
|
||||||
|
+ last;
|
||||||
|
+ }
|
||||||
|
+ endgrent;
|
||||||
|
+ skip "No group found we could add as a supplementary group", 1
|
||||||
|
+ if (!@sup_group);
|
||||||
|
+ $) = "$) @sup_group[2]";
|
||||||
|
+ my $ok = grep { $_ == $sup_group[2] } split ' ', $);
|
||||||
|
+ ok $ok, "Group `$sup_group[0]' added as supplementary group";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
From f83193f25095f9353c8e34c187184bc25fdadf51 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tony Cook <tony@develop-help.com>
|
||||||
|
Date: Wed, 19 Jun 2019 11:25:13 +1000
|
||||||
|
Subject: [PATCH] Manuel Mausz is now a perl author
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
AUTHORS | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/AUTHORS b/AUTHORS
|
||||||
|
index 8d5f5b0ad3..0091100600 100644
|
||||||
|
--- a/AUTHORS
|
||||||
|
+++ b/AUTHORS
|
||||||
|
@@ -772,6 +772,7 @@ Maik Hentsche <maik@mm-double.de>
|
||||||
|
Major Sébastien <sebastien.major@crdp.ac-caen.fr>
|
||||||
|
Makoto MATSUSHITA <matusita@ics.es.osaka-u.ac.jp>
|
||||||
|
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
|
||||||
|
+Manuel Mausz <manuel@mausz.at>
|
||||||
|
Manuel Valente <mvalente@idealx.com>
|
||||||
|
Marc Green <marcgreen@cpan.org>
|
||||||
|
Marc Lehmann <pcg@goof.com>
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
From 79e302e6c3f815bf4cb72a5bacc3012595970db9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Manuel Mausz <manuel@mausz.at>
|
||||||
|
Date: Tue, 4 Jun 2019 00:29:09 +0200
|
||||||
|
Subject: [PATCH] (perl #134169) mg.c reset endptr after use
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Perl_grok_atoUV has been changed so endptr constraints the input. Thus we need to reset the endptr after every use.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
mg.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/mg.c b/mg.c
|
||||||
|
index 26211dd4d0..f235f0ee5a 100644
|
||||||
|
--- a/mg.c
|
||||||
|
+++ b/mg.c
|
||||||
|
@@ -3178,7 +3178,8 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
|
||||||
|
{
|
||||||
|
const char *p = SvPV_const(sv, len);
|
||||||
|
Groups_t *gary = NULL;
|
||||||
|
- const char* endptr = p + len;
|
||||||
|
+ const char* p_end = p + len;
|
||||||
|
+ const char* endptr = p_end;
|
||||||
|
UV uv;
|
||||||
|
#ifdef _SC_NGROUPS_MAX
|
||||||
|
int maxgrp = sysconf(_SC_NGROUPS_MAX);
|
||||||
|
@@ -3201,6 +3202,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
|
||||||
|
if (endptr == NULL)
|
||||||
|
break;
|
||||||
|
p = endptr;
|
||||||
|
+ endptr = p_end;
|
||||||
|
while (isSPACE(*p))
|
||||||
|
++p;
|
||||||
|
if (!*p)
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
12
perl.spec
12
perl.spec
|
@ -201,6 +201,11 @@ Patch32: perl-5.31.0-perl-133936-make-send-a-bit-saner.patch
|
||||||
# RT133989, fixed after 5.31.0
|
# RT133989, fixed after 5.31.0
|
||||||
Patch33: perl-5.31.0-perl-133989-scalar-the-argument-to-readline-if-any.patch
|
Patch33: perl-5.31.0-perl-133989-scalar-the-argument-to-readline-if-any.patch
|
||||||
|
|
||||||
|
# Fix setting supplementar group IDs, RT#134169, fixed after 5.31.0
|
||||||
|
Patch34: perl-5.31.0-perl-134169-mg.c-reset-endptr-after-use.patch
|
||||||
|
Patch35: perl-5.31.0-Add-test-for-perl-134169.patch
|
||||||
|
Patch36: perl-5.31.0-Manuel-Mausz-is-now-a-perl-author.patch
|
||||||
|
|
||||||
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
|
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
|
||||||
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
|
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
|
||||||
|
|
||||||
|
@ -2752,6 +2757,9 @@ Perl extension for Version Objects
|
||||||
%patch31 -p1
|
%patch31 -p1
|
||||||
%patch32 -p1
|
%patch32 -p1
|
||||||
%patch33 -p1
|
%patch33 -p1
|
||||||
|
%patch34 -p1
|
||||||
|
%patch35 -p1
|
||||||
|
%patch36 -p1
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201 -p1
|
%patch201 -p1
|
||||||
|
|
||||||
|
@ -2792,6 +2800,9 @@ perl -x patchlevel.h \
|
||||||
'Fedora Patch31: Fix changing packet destination sent from a UDP IO::Socket object (RT#133936)' \
|
'Fedora Patch31: Fix changing packet destination sent from a UDP IO::Socket object (RT#133936)' \
|
||||||
'Fedora Patch32: Fix changing packet destination sent from a UDP IO::Socket object (RT#133936)' \
|
'Fedora Patch32: Fix changing packet destination sent from a UDP IO::Socket object (RT#133936)' \
|
||||||
'Fedora Patch33: Fix a stack underflow in readline() if passed an empty array as an argument (#RT133989)' \
|
'Fedora Patch33: Fix a stack underflow in readline() if passed an empty array as an argument (#RT133989)' \
|
||||||
|
'Fedora Patch34: Fix setting supplementar group IDs (RT#134169)' \
|
||||||
|
'Fedora Patch35: Fix setting supplementar group IDs (RT#134169)' \
|
||||||
|
'Fedora Patch36: Fix setting supplementar group IDs (RT#134169)' \
|
||||||
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
|
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
|
||||||
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
|
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
@ -5054,6 +5065,7 @@ popd
|
||||||
- Fix changing packet destination sent from a UDP IO::Socket object (RT#133936)
|
- Fix changing packet destination sent from a UDP IO::Socket object (RT#133936)
|
||||||
- Fix a stack underflow in readline() if passed an empty array as an argument
|
- Fix a stack underflow in readline() if passed an empty array as an argument
|
||||||
(#RT133989)
|
(#RT133989)
|
||||||
|
- Fix setting supplementar group IDs (RT#134169)
|
||||||
|
|
||||||
* Tue Jun 11 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.30.0-439
|
* Tue Jun 11 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.30.0-439
|
||||||
- Define %%perl_vendor*, %%perl_archlib, %%perl_privlib, because in rpm
|
- Define %%perl_vendor*, %%perl_archlib, %%perl_privlib, because in rpm
|
||||||
|
|
Loading…
Reference in New Issue