From 526b82607c6d5ef342913ced981e3aa110c6f23f Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 4 Jun 2018 11:40:45 +0000 Subject: [PATCH] In patch bash-4.4.dif avoud setgroups(2) but use initgroups(3) OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=263 --- bash-4.4.dif | 6 ++++-- bash.changes | 5 +++++ bash.spec | 2 -- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bash-4.4.dif b/bash-4.4.dif index ff2b1301..85186507 100644 --- a/bash-4.4.dif +++ b/bash-4.4.dif @@ -157,11 +157,13 @@ disable_priv_mode (); /* Need to get the argument to a -c option processed in the -@@ -1277,6 +1278,7 @@ disable_priv_mode () +@@ -1277,6 +1278,9 @@ disable_priv_mode () { int e; -+ setgroups(0, NULL); ++ if (!current_user.user_name) ++ get_current_user_info(); ++ initgroups (current_user.user_name, current_user.gid); if (setuid (current_user.uid) < 0) { e = errno; diff --git a/bash.changes b/bash.changes index 15c990ed..fc52fb3a 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 4 09:21:15 UTC 2018 - werner@suse.de + +- In patch bash-4.4.dif avoud setgroups(2) but use initgroups(3) (boo#1095670) + ------------------------------------------------------------------- Wed Apr 18 10:49:26 UTC 2018 - werner@suse.de diff --git a/bash.spec b/bash.spec index eb77002b..f3bb922e 100644 --- a/bash.spec +++ b/bash.spec @@ -23,9 +23,7 @@ BuildRequires: audit-devel BuildRequires: autoconf BuildRequires: bison BuildRequires: fdupes -%if %suse_version > 1220 BuildRequires: makeinfo -%endif BuildRequires: ncurses-devel BuildRequires: patchutils BuildRequires: pkg-config