Hello community, here is the log from the commit of package bash for openSUSE:Factory checked in at 2018-06-13 15:13:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bash (Old) and /work/SRC/openSUSE:Factory/.bash.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bash" Wed Jun 13 15:13:01 2018 rev:147 rq:614491 version:4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/bash/bash.changes 2018-04-22 14:35:35.117770563 +0200 +++ /work/SRC/openSUSE:Factory/.bash.new/bash.changes 2018-06-13 15:13:07.430398490 +0200 @@ -1,0 +2,25 @@ +Mon Jun 4 09:21:15 UTC 2018 - [email protected] + +- In patch bash-4.4.dif avoud setgroups(2) but use initgroups(3) (boo#1095670) + +------------------------------------------------------------------- +Sat Jun 2 17:17:13 UTC 2018 - [email protected] + +- 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) + +------------------------------------------------------------------- Old: ---- bash-4.4-wait-sigint-handler.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bash.spec ++++++ --- /var/tmp/diff_new_pack.FUXHGt/_old 2018-06-13 15:13:09.666316916 +0200 +++ /var/tmp/diff_new_pack.FUXHGt/_new 2018-06-13 15:13:09.670316770 +0200 @@ -23,9 +23,7 @@ BuildRequires: autoconf BuildRequires: bison BuildRequires: fdupes -%if %suse_version > 1220 BuildRequires: makeinfo -%endif BuildRequires: ncurses-devel BuildRequires: patchutils BuildRequires: pkg-config @@ -85,8 +83,6 @@ 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 @@ -228,7 +224,6 @@ %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)) ++++++ bash-4.4-patches.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-4.4-patches/bash44-020 new/bash-4.4-patches/bash44-020 --- old/bash-4.4-patches/bash44-020 1970-01-01 01:00:00.000000000 +0100 +++ new/bash-4.4-patches/bash44-020 2018-06-01 15:37:03.000000000 +0200 @@ -0,0 +1,177 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-020 + +Bug-Reported-by: Graham Northup <[email protected]> +Bug-Reference-ID: <[email protected]> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2017-02/msg00025.html + +Bug-Description: + +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. + +Patch (apply with `patch -p0'): + +*** ../bash-4.4-patched/jobs.c 2016-11-11 13:42:55.000000000 -0500 +--- jobs.c 2017-02-22 15:16:28.000000000 -0500 +*************** +*** 813,818 **** + struct pidstat *ps; + +! bucket = pshash_getbucket (pid); +! psi = bgp_getindex (); + ps = &bgpids.storage[psi]; + +--- 796,815 ---- + struct pidstat *ps; + +! /* bucket == existing chain of pids hashing to same value +! psi = where were going to put this pid/status */ +! +! bucket = pshash_getbucket (pid); /* index into pidstat_table */ +! psi = bgp_getindex (); /* bgpids.head, index into storage */ +! +! /* XXX - what if psi == *bucket? */ +! if (psi == *bucket) +! { +! #ifdef DEBUG +! internal_warning ("hashed pid %d (pid %d) collides with bgpids.head, skipping", psi, pid); +! #endif +! bgpids.storage[psi].pid = NO_PID; /* make sure */ +! psi = bgp_getindex (); /* skip to next one */ +! } +! + ps = &bgpids.storage[psi]; + +*************** +*** 842,845 **** +--- 839,843 ---- + { + struct pidstat *ps; ++ ps_index_t *bucket; + + ps = &bgpids.storage[psi]; +*************** +*** 847,856 **** + return; + +! if (ps->bucket_next != NO_PID) + bgpids.storage[ps->bucket_next].bucket_prev = ps->bucket_prev; +! if (ps->bucket_prev != NO_PID) + bgpids.storage[ps->bucket_prev].bucket_next = ps->bucket_next; + else +! *(pshash_getbucket (ps->pid)) = ps->bucket_next; + } + +--- 845,861 ---- + return; + +! if (ps->bucket_next != NO_PIDSTAT) + bgpids.storage[ps->bucket_next].bucket_prev = ps->bucket_prev; +! if (ps->bucket_prev != NO_PIDSTAT) + bgpids.storage[ps->bucket_prev].bucket_next = ps->bucket_next; + else +! { +! bucket = pshash_getbucket (ps->pid); +! *bucket = ps->bucket_next; /* deleting chain head in hash table */ +! } +! +! /* clear out this cell, just in case */ +! ps->pid = NO_PID; +! ps->bucket_next = ps->bucket_prev = NO_PIDSTAT; + } + +*************** +*** 859,863 **** + pid_t pid; + { +! ps_index_t psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +--- 864,868 ---- + pid_t pid; + { +! ps_index_t psi, orig_psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +*************** +*** 865,871 **** + + /* Search chain using hash to find bucket in pidstat_table */ +! for (psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! if (bgpids.storage[psi].pid == pid) +! break; + + if (psi == NO_PIDSTAT) +--- 870,883 ---- + + /* Search chain using hash to find bucket in pidstat_table */ +! for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! { +! if (bgpids.storage[psi].pid == pid) +! break; +! if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ +! { +! internal_warning ("bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next", psi); +! return 0; +! } +! } + + if (psi == NO_PIDSTAT) +*************** +*** 905,909 **** + pid_t pid; + { +! ps_index_t psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +--- 917,921 ---- + pid_t pid; + { +! ps_index_t psi, orig_psi; + + if (bgpids.storage == 0 || bgpids.nalloc == 0 || bgpids.npid == 0) +*************** +*** 911,917 **** + + /* Search chain using hash to find bucket in pidstat_table */ +! for (psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! if (bgpids.storage[psi].pid == pid) +! return (bgpids.storage[psi].status); + + return -1; +--- 923,936 ---- + + /* Search chain using hash to find bucket in pidstat_table */ +! for (orig_psi = psi = *(pshash_getbucket (pid)); psi != NO_PIDSTAT; psi = bgpids.storage[psi].bucket_next) +! { +! if (bgpids.storage[psi].pid == pid) +! return (bgpids.storage[psi].status); +! if (orig_psi == bgpids.storage[psi].bucket_next) /* catch reported bug */ +! { +! internal_warning ("bgp_search: LOOP: psi (%d) == storage[psi].bucket_next", psi); +! return -1; +! } +! } + + return -1; +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 19 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 20 + + #endif /* _PATCHLEVEL_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-4.4-patches/bash44-021 new/bash-4.4-patches/bash44-021 --- old/bash-4.4-patches/bash44-021 1970-01-01 01:00:00.000000000 +0100 +++ new/bash-4.4-patches/bash44-021 2018-06-01 15:37:12.000000000 +0200 @@ -0,0 +1,57 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-021 + +Bug-Reported-by: [email protected] +Bug-Reference-ID: <[email protected]> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2018-03/msg00196.html + +Bug-Description: + +A SIGINT received inside a SIGINT trap handler can possibly cause the +shell to loop. + +Patch (apply with `patch -p0'): + +*** ../bash-20180329/jobs.c 2018-02-11 18:07:22.000000000 -0500 +--- jobs.c 2018-04-02 14:24:21.000000000 -0400 +*************** +*** 2690,2694 **** + if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) + { +! old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + waiting_for_child = 0; + if (old_sigint_handler == SIG_IGN) +--- 2690,2704 ---- + if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) + { +! 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) +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 20 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 21 + + #endif /* _PATCHLEVEL_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-4.4-patches/bash44-022 new/bash-4.4-patches/bash44-022 --- old/bash-4.4-patches/bash44-022 1970-01-01 01:00:00.000000000 +0100 +++ new/bash-4.4-patches/bash44-022 2018-06-01 15:37:21.000000000 +0200 @@ -0,0 +1,61 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-022 + +Bug-Reported-by: Nuzhna Pomoshch <[email protected]> +Bug-Reference-ID: <[email protected]> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2017-05/msg00005.html + +Bug-Description: + +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. + +Patch (apply with `patch -p0'): + +*** ../bash-4.4-patched/lib/readline/readline.c 2016-04-20 15:53:52.000000000 -0400 +--- lib/readline/readline.c 2018-05-26 17:19:00.000000000 -0400 +*************** +*** 1058,1062 **** + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +--- 1056,1060 ---- + r = _rl_dispatch (ANYOTHERKEY, m); + } +! else if (r < 0 && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to +*************** +*** 1070,1074 **** + return -2; + } +! else if (r && got_subseq) + { + /* OK, back up the chain. */ +--- 1068,1072 ---- + return -2; + } +! else if (r < 0 && got_subseq) /* XXX */ + { + /* OK, back up the chain. */ +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 21 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 22 + + #endif /* _PATCHLEVEL_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-4.4-patches/bash44-023 new/bash-4.4-patches/bash44-023 --- old/bash-4.4-patches/bash44-023 1970-01-01 01:00:00.000000000 +0100 +++ new/bash-4.4-patches/bash44-023 2018-06-01 15:37:31.000000000 +0200 @@ -0,0 +1,52 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-023 + +Bug-Reported-by: Martijn Dekker <[email protected]> +Bug-Reference-ID: <[email protected]> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-11/msg00041.html + +Bug-Description: + +When sourcing a file from an interactive shell, setting the SIGINT handler +to the default and typing ^C will cause the shell to exit. + +Patch (apply with `patch -p0'): + +*** ../bash-4.4-patched/builtins/trap.def 2016-01-25 13:32:38.000000000 -0500 +--- builtins/trap.def 2016-11-06 12:04:35.000000000 -0500 +*************** +*** 99,102 **** +--- 99,103 ---- + + extern int posixly_correct, subshell_environment; ++ extern int sourcelevel, running_trap; + + int +*************** +*** 213,216 **** +--- 214,220 ---- + if (interactive) + set_signal_handler (SIGINT, sigint_sighandler); ++ /* special cases for interactive == 0 */ ++ else if (interactive_shell && (sourcelevel||running_trap)) ++ set_signal_handler (SIGINT, sigint_sighandler); + else + set_signal_handler (SIGINT, termsig_sighandler); +*** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 22 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 23 + + #endif /* _PATCHLEVEL_H_ */ ++++++ bash-4.4.dif ++++++ --- /var/tmp/diff_new_pack.FUXHGt/_old 2018-06-13 15:13:09.914307868 +0200 +++ /var/tmp/diff_new_pack.FUXHGt/_new 2018-06-13 15:13:09.918307722 +0200 @@ -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;
