diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2020-12-20 03:10:57 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-12-20 08:59:51 +0100 |
commit | 98f1ac1fd7a1b5643d4040c9d18276576a7d759a (patch) | |
tree | ed148154f5e837b482889bf99527bbc97aa707c0 /source/a/bash/bash-5.1-patches/bash51-004 | |
parent | c9a25f18230e4de74520105a1310ca50c9f30239 (diff) | |
download | current-98f1ac1fd7a1b5643d4040c9d18276576a7d759a.tar.gz current-98f1ac1fd7a1b5643d4040c9d18276576a7d759a.tar.xz |
Sun Dec 20 03:10:57 UTC 202020201220031057
Linus didn't think this was a scary kernel and in spite of skipping a few
branches here before getting to this one, I don't either. Not scary enough
to make me think I need to start it out in /testing, anyway. I have a good
feeling about this kernel. Enjoy! :-)
a/bash-5.1.004-x86_64-1.txz: Upgraded.
a/elogind-246.9-x86_64-1.txz: Upgraded.
Don't make 10-enable-session-power.rules a .new file.
Thanks to Robby Workman.
a/kernel-firmware-20201218_646f159-noarch-1.txz: Upgraded.
a/kernel-generic-5.10.1-x86_64-1.txz: Upgraded.
a/kernel-huge-5.10.1-x86_64-1.txz: Upgraded.
a/kernel-modules-5.10.1-x86_64-1.txz: Upgraded.
a/ndctl-71-x86_64-1.txz: Upgraded.
a/sysvinit-scripts-2.1-noarch-37.txz: Rebuilt.
rc.S: don't start cgmanager/cgproxy.
rc.6: don't stop cgmanager/cgproxy.
d/kernel-headers-5.10.1-x86-1.txz: Upgraded.
k/kernel-source-5.10.1-noarch-1.txz: Upgraded.
l/libtiff-4.2.0-x86_64-1.txz: Upgraded.
l/zstd-1.4.8-x86_64-1.txz: Upgraded.
n/ca-certificates-20201219-noarch-1.txz: Upgraded.
This update provides the latest CA certificates to check for the
authenticity of SSL connections.
xap/libnma-1.8.30-x86_64-1.txz: Upgraded.
isolinux/initrd.img: Rebuilt.
kernels/*: Upgraded.
usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/a/bash/bash-5.1-patches/bash51-004')
-rw-r--r-- | source/a/bash/bash-5.1-patches/bash51-004 | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/source/a/bash/bash-5.1-patches/bash51-004 b/source/a/bash/bash-5.1-patches/bash51-004 new file mode 100644 index 000000000..39a6c647f --- /dev/null +++ b/source/a/bash/bash-5.1-patches/bash51-004 @@ -0,0 +1,126 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.1 +Patch-ID: bash51-004 + +Bug-Reported-by: oguzismailuysal@gmail.com +Bug-Reference-ID: <CAH7i3LoHGmwaghDpCWRUfcY04gQmeDTH3RiG=bf2b=KbU=gyhw@mail.gmail.com> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00039.html + +Bug-Description: + +If a key-value compound array assignment to an associative array is supplied +as an assignment statement argument to the `declare' command that declares the +array, the assignment doesn't perform the correct word expansions. + +This patch makes key-value assignment and subscript assignment perform the +same expansions when they're supplied as an argument to `declare'. + +Patch (apply with `patch -p0'): + +*** ../bash-5.1-patched/arrayfunc.c 2020-10-09 11:38:58.000000000 -0400 +--- arrayfunc.c 2020-12-11 15:12:22.000000000 -0500 +*************** +*** 598,601 **** +--- 598,622 ---- + } + } ++ ++ /* Return non-zero if L appears to be a key-value pair associative array ++ compound assignment. */ ++ int ++ kvpair_assignment_p (l) ++ WORD_LIST *l; ++ { ++ return (l && (l->word->flags & W_ASSIGNMENT) == 0 && l->word->word[0] != '['); /*]*/ ++ } ++ ++ char * ++ expand_and_quote_kvpair_word (w) ++ char *w; ++ { ++ char *t, *r; ++ ++ t = w ? expand_assignment_string_to_string (w, 0) : 0; ++ r = sh_single_quote (t ? t : ""); ++ free (t); ++ return r; ++ } + #endif + +*************** +*** 641,645 **** + + #if ASSOC_KVPAIR_ASSIGNMENT +! if (assoc_p (var) && nlist && (nlist->word->flags & W_ASSIGNMENT) == 0 && nlist->word->word[0] != '[') /*]*/ + { + iflags = flags & ~ASS_APPEND; +--- 662,666 ---- + + #if ASSOC_KVPAIR_ASSIGNMENT +! if (assoc_p (var) && kvpair_assignment_p (nlist)) + { + iflags = flags & ~ASS_APPEND; +*** ../bash-5.1-patched/arrayfunc.h 2020-04-29 17:24:15.000000000 -0400 +--- arrayfunc.h 2020-12-11 14:23:50.000000000 -0500 +*************** +*** 68,71 **** +--- 68,74 ---- + extern void quote_compound_array_list PARAMS((WORD_LIST *, int)); + ++ extern int kvpair_assignment_p PARAMS((WORD_LIST *)); ++ extern char *expand_and_quote_kvpair_word PARAMS((char *)); ++ + extern int unbind_array_element PARAMS((SHELL_VAR *, char *, int)); + extern int skipsubscript PARAMS((const char *, int, int)); +*** ../bash-5.1-patched/subst.c 2020-11-16 10:33:15.000000000 -0500 +--- subst.c 2020-12-11 15:11:10.000000000 -0500 +*************** +*** 11605,11608 **** +--- 11605,11609 ---- + WORD_LIST *l, *nl; + char *t; ++ int kvpair; + + if (flags == 0) +*************** +*** 11619,11622 **** +--- 11620,11627 ---- + /* Associative array */ + l = parse_string_to_word_list (value, 1, "array assign"); ++ #if ASSOC_KVPAIR_ASSIGNMENT ++ kvpair = kvpair_assignment_p (l); ++ #endif ++ + /* For associative arrays, with their arbitrary subscripts, we have to + expand and quote in one step so we don't have to search for the +*************** +*** 11624,11627 **** +--- 11629,11638 ---- + for (nl = l; nl; nl = nl->next) + { ++ #if ASSOC_KVPAIR_ASSIGNMENT ++ if (kvpair) ++ /* keys and values undergo the same set of expansions */ ++ t = expand_and_quote_kvpair_word (nl->word->word); ++ else ++ #endif + if ((nl->word->flags & W_ASSIGNMENT) == 0) + t = sh_single_quote (nl->word->word ? nl->word->word : ""); + +*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 3 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 4 + + #endif /* _PATCHLEVEL_H_ */ |