From ce2abbd36f07c882f5aa9bd6083f0160ad4aa481d4dc8c9ff90c9a93c0d40edf Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 4 Jun 2018 11:40:45 +0000 Subject: [PATCH 1/2] 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 7aef483..c954c10 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 a3484c8..53feaa4 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 daf4da0..c5fa82d 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 From 0a8d78f8cba454f5deba836a3ef5d126d00f69b6077eb6c5da5c36d6a2877338 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 6 Jun 2018 08:34:03 +0000 Subject: [PATCH 2/2] Accepting request 613679 from home:avindra:branches:Base:System - Add patch 20, 21, 22 and 23 to bash-4.4-patches.tar.bz2 * 20: In circumstances involving long-running scripts that create and reap many processes, it is possible for the hash table bash uses to store exit statuses from asynchronous processes to develop loops. This patch fixes the loop causes and adds code to detect any future loops. * 21: A SIGINT received inside a SIGINT trap handler can possibly cause the shell to loop. * 22: There are cases where a failing readline command (e.g., delete-char at the end of a line) can cause a multi-character key sequence to `back up' and attempt to re-read some of the characters in the sequence. * 23: When sourcing a file from an interactive shell, setting the SIGINT handler to the default and typing ^C will cause the shell to exit. - remove bash-4.4-wait-sigint-handler.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/613679 OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=264 --- bash-4.4-patches.tar.bz2 | 4 ++-- bash-4.4-wait-sigint-handler.patch | 29 ----------------------------- bash.changes | 20 ++++++++++++++++++++ bash.spec | 3 --- 4 files changed, 22 insertions(+), 34 deletions(-) delete mode 100644 bash-4.4-wait-sigint-handler.patch diff --git a/bash-4.4-patches.tar.bz2 b/bash-4.4-patches.tar.bz2 index ca2c85f..9522b6a 100644 --- a/bash-4.4-patches.tar.bz2 +++ b/bash-4.4-patches.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d86684f8611c66689730646c48392d47ce52c680da9b3269178778097fac57fc -size 10625 +oid sha256:8c161f78c916668078676da505aad2756202cbfee895d714091bfdc5c836e1fd +size 12693 diff --git a/bash-4.4-wait-sigint-handler.patch b/bash-4.4-wait-sigint-handler.patch deleted file mode 100644 index c2f57a0..0000000 --- a/bash-4.4-wait-sigint-handler.patch +++ /dev/null @@ -1,29 +0,0 @@ -Repeating self-calling of traps due the combination of a non-interactive -shell, a trap handler for SIGINT, an external process in the trap handler, -and a SIGINT within the trap after the external process runs. - ---- - jobs.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - ---- jobs.c -+++ jobs.c 2018-04-02 18:24:21.000000000 +0000 -@@ -2662,7 +2662,17 @@ wait_for (pid) - wait_sigint_received = child_caught_sigint = 0; - if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) - { -- old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); -+ SigHandler *temp_sigint_handler; -+ -+ temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); -+ if (temp_sigint_handler == wait_sigint_handler) -+ { -+#if defined (DEBUG) -+ internal_warning ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap); -+#endif -+ } -+ else -+ old_sigint_handler = temp_sigint_handler; - waiting_for_child = 0; - if (old_sigint_handler == SIG_IGN) - set_signal_handler (SIGINT, old_sigint_handler); diff --git a/bash.changes b/bash.changes index 53feaa4..821463d 100644 --- a/bash.changes +++ b/bash.changes @@ -3,6 +3,26 @@ 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) +------------------------------------------------------------------- +Sat Jun 2 17:17:13 UTC 2018 - avindra@opensuse.org + +- Add patch 20, 21, 22 and 23 to bash-4.4-patches.tar.bz2 + * 20: In circumstances involving long-running scripts that create + and reap many processes, it is possible for the hash table bash + uses to store exit statuses from asynchronous processes to + develop loops. This patch fixes the loop causes and adds code + to detect any future loops. + * 21: A SIGINT received inside a SIGINT trap handler can possibly + cause the shell to loop. + * 22: There are cases where a failing readline command (e.g., + delete-char at the end of a line) can cause a multi-character + key sequence to `back up' and attempt to re-read some of the + characters in the sequence. + * 23: When sourcing a file from an interactive shell, setting the + SIGINT handler to the default and typing ^C will cause the + shell to exit. +- remove bash-4.4-wait-sigint-handler.patch (upstreamed) + ------------------------------------------------------------------- Wed Apr 18 10:49:26 UTC 2018 - werner@suse.de diff --git a/bash.spec b/bash.spec index c5fa82d..801a84b 100644 --- a/bash.spec +++ b/bash.spec @@ -83,8 +83,6 @@ Patch47: bash-4.3-perl522.patch Patch48: bash-4.3-extra-import-func.patch # PATCH-EXTEND-SUSE Allow root to clean file system if filled up Patch49: bash-4.3-pathtemp.patch -# PATCH-FIX-UPSTREAM bnc#1086247 -Patch50: bash-4.4-wait-sigint-handler.patch %global _sysconfdir /etc %global _incdir %{_includedir} %global _ldldir /%{_lib}/bash @@ -226,7 +224,6 @@ done %patch48 -b .eif %endif %patch49 -p0 -b .pthtmp -%patch50 -p0 -b .trap %patch0 -p0 -b .0 # This has to be always the same version as included in the bash its self rl1=($(sed -rn '/RL_READLINE_VERSION/p' lib/readline/readline.h))