!11 update version to 5.8
From: @zou_lin77 Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
18a45165b4
@ -1,79 +0,0 @@
|
|||||||
From a531a1ec2dce97c1507a45abd4795b1aea1edc9e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Oliver Kiddle <okiddle@yahoo.co.uk>
|
|
||||||
Date: Thu, 23 May 2019 01:05:01 +0200
|
|
||||||
Subject: [PATCH 225/262] 44345: fix wordcode traversal where ! without a
|
|
||||||
following command could result in a crash
|
|
||||||
|
|
||||||
---
|
|
||||||
ChangeLog | 5 +++++
|
|
||||||
Src/text.c | 9 +++++++--
|
|
||||||
Test/A01grammar.ztst | 33 +++++++++++++++++++++++++++++++++
|
|
||||||
3 files changed, 45 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Src/text.c b/Src/text.c
|
|
||||||
index 3658b1bc6..a4191bf1a 100644
|
|
||||||
--- a/Src/text.c
|
|
||||||
+++ b/Src/text.c
|
|
||||||
@@ -470,8 +470,13 @@ gettext2(Estate state)
|
|
||||||
" || " : " && ");
|
|
||||||
s->code = *state->pc++;
|
|
||||||
s->pop = (WC_SUBLIST_TYPE(s->code) == WC_SUBLIST_END);
|
|
||||||
- if (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_NOT)
|
|
||||||
- taddstr("! ");
|
|
||||||
+ if (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_NOT) {
|
|
||||||
+ if (WC_SUBLIST_SKIP(s->code) == 0)
|
|
||||||
+ stack = 1;
|
|
||||||
+ taddstr((stack || (!(WC_SUBLIST_FLAGS(s->code) &
|
|
||||||
+ WC_SUBLIST_SIMPLE) && wc_code(*state->pc) !=
|
|
||||||
+ WC_PIPE)) ? "!" : "! ");
|
|
||||||
+ }
|
|
||||||
if (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_COPROC)
|
|
||||||
taddstr("coproc ");
|
|
||||||
}
|
|
||||||
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
|
|
||||||
index 1ed3cb6b7..c8600d4cb 100644
|
|
||||||
--- a/Test/A01grammar.ztst
|
|
||||||
+++ b/Test/A01grammar.ztst
|
|
||||||
@@ -76,6 +76,39 @@
|
|
||||||
0:Basic current shell list with error
|
|
||||||
>false
|
|
||||||
|
|
||||||
+ fn() { : && ! ; : }
|
|
||||||
+ functions -x3 fn
|
|
||||||
+ fn
|
|
||||||
+0:End of sublist containing ! with no command
|
|
||||||
+>fn () {
|
|
||||||
+> : && !
|
|
||||||
+> :
|
|
||||||
+>}
|
|
||||||
+
|
|
||||||
+ if [[ m -eq y ]]; then
|
|
||||||
+ : && !
|
|
||||||
+ :
|
|
||||||
+ fi
|
|
||||||
+0:! followed by no further commands
|
|
||||||
+
|
|
||||||
+ fn() { ! {!} && ! (!) || ! {!} }
|
|
||||||
+ functions -x2 fn
|
|
||||||
+ fn
|
|
||||||
+0:exclamation marks without following commands
|
|
||||||
+>fn () {
|
|
||||||
+> ! {
|
|
||||||
+> !
|
|
||||||
+> } && ! (
|
|
||||||
+> !
|
|
||||||
+> ) || ! {
|
|
||||||
+> !
|
|
||||||
+> }
|
|
||||||
+>}
|
|
||||||
+
|
|
||||||
+ ! | true
|
|
||||||
+1:! followed by no command but by a pipe
|
|
||||||
+?(eval):1: parse error near `|'
|
|
||||||
+
|
|
||||||
#
|
|
||||||
# Tests for `Precommand Modifiers'
|
|
||||||
#
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
1330
CVE-2019-20044.patch
1330
CVE-2019-20044.patch
File diff suppressed because it is too large
Load Diff
67
backport-Simplify-N-cond-test.patch
Normal file
67
backport-Simplify-N-cond-test.patch
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
From 80ddc46e54f6116235e68d3fc039ef775e72d1c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: dana <dana@dana.is>
|
||||||
|
Date: Wed, 11 Mar 2020 21:17:12 -0500
|
||||||
|
Subject: [PATCH] 45470: C02cond: Simplify '-N cond' test
|
||||||
|
|
||||||
|
This fixes an (intermittent?) issue with the test on macOS+APFS, and hopefully
|
||||||
|
makes it simpler and faster in general
|
||||||
|
---
|
||||||
|
Test/C02cond.ztst | 36 ++++++++++++------------------------
|
||||||
|
1 files changed, 12 insertions(+), 24 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
|
||||||
|
index 4b1ec02f0..5b105b2a0 100644
|
||||||
|
--- a/Test/C02cond.ztst
|
||||||
|
+++ b/Test/C02cond.ztst
|
||||||
|
@@ -146,39 +146,27 @@
|
||||||
|
|
||||||
|
# can't be bothered with -S
|
||||||
|
|
||||||
|
- if [[ ${mtab::="$({mount || /sbin/mount || /usr/sbin/mount} 2>/dev/null)"} = *[(]?*[)] ]]; then
|
||||||
|
- print -u $ZTST_fd 'This test takes two seconds...'
|
||||||
|
- else
|
||||||
|
- unmodified_ls="$(ls -lu $unmodified)"
|
||||||
|
- print -u $ZTST_fd 'This test takes up to 60 seconds...'
|
||||||
|
- fi
|
||||||
|
- sleep 2
|
||||||
|
+ print -ru $ZTST_fd 'This test may take two seconds...'
|
||||||
|
touch $newnewnew
|
||||||
|
if [[ $OSTYPE == "cygwin" ]]; then
|
||||||
|
ZTST_skip="[[ -N file ]] not supported on Cygwin"
|
||||||
|
elif (( isnfs )); then
|
||||||
|
ZTST_skip="[[ -N file ]] not supported with NFS"
|
||||||
|
- elif { (( ! $+unmodified_ls )) &&
|
||||||
|
- cat $unmodified &&
|
||||||
|
- { df -k -- ${$(print -r -- "$mtab" |
|
||||||
|
- awk '/noatime/ {print $1,$3}'):-""} | tr -s ' ' |
|
||||||
|
- fgrep -- "$(df -k . | tail -1 | tr -s ' ')" } >&/dev/null } ||
|
||||||
|
- { (( $+unmodified_ls )) && SECONDS=0 &&
|
||||||
|
- ! until (( SECONDS >= 58 )); do
|
||||||
|
- ZTST_hashmark; sleep 2; cat $unmodified
|
||||||
|
- [[ $unmodified_ls != "$(ls -lu $unmodified)" ]] && break
|
||||||
|
- done }; then
|
||||||
|
- ZTST_skip="[[ -N file ]] not supported with noatime file system"
|
||||||
|
+ elif ! zmodload -F zsh/stat b:zstat 2> /dev/null; then
|
||||||
|
+ ZTST_skip='[[ -N file ]] not tested; zsh/stat not available'
|
||||||
|
+ elif ! { sleep 2; touch -a $unmodified 2> /dev/null }; then
|
||||||
|
+ ZTST_skip='[[ -N file ]] not tested; touch failed'
|
||||||
|
+ elif [[ "$(zstat +atime $unmodified)" == "$(zstat +mtime $unmodified)" ]]; then
|
||||||
|
+ ZTST_skip='[[ -N file ]] not supported on this file system'
|
||||||
|
else
|
||||||
|
[[ -N $newnewnew && ! -N $unmodified ]]
|
||||||
|
fi
|
||||||
|
0:-N cond
|
||||||
|
-F:This test can fail on NFS-mounted filesystems as the access and
|
||||||
|
-F:modification times are not updated separately. The test will fail
|
||||||
|
-F:on HFS+ (Apple Mac OS X default) filesystems because access times
|
||||||
|
-F:are not recorded. Also, Linux ext3 filesystems may be mounted
|
||||||
|
-F:with the noatime option which does not update access times.
|
||||||
|
-F:Failures in these cases do not indicate a problem in the shell.
|
||||||
|
+F:This test relies on the file system supporting atime updates. It
|
||||||
|
+F:should automatically detect whether this is the case, and skip
|
||||||
|
+F:without failing if it isn't, but it's possible that some
|
||||||
|
+F:configurations may elude this detection. Please report this
|
||||||
|
+F:scenario if you encounter it.
|
||||||
|
|
||||||
|
[[ $newnewnew -nt $zlnfs && ! ($unmodified -nt $zlnfs) ]]
|
||||||
|
0:-nt cond
|
||||||
BIN
zsh-5.7.1.tar.xz
BIN
zsh-5.7.1.tar.xz
Binary file not shown.
BIN
zsh-5.8.tar.xz
Normal file
BIN
zsh-5.8.tar.xz
Normal file
Binary file not shown.
13
zsh.spec
13
zsh.spec
@ -1,8 +1,8 @@
|
|||||||
%define _bindir /bin
|
%define _bindir /bin
|
||||||
|
|
||||||
Name: zsh
|
Name: zsh
|
||||||
Version: 5.7.1
|
Version: 5.8
|
||||||
Release: 5
|
Release: 1
|
||||||
Summary: A shell designed for interactive use
|
Summary: A shell designed for interactive use
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://zsh.sourceforge.net
|
URL: http://zsh.sourceforge.net
|
||||||
@ -26,8 +26,7 @@ Requires(postun): coreutils grep
|
|||||||
|
|
||||||
Provides: /bin/zsh
|
Provides: /bin/zsh
|
||||||
|
|
||||||
Patch0000: 0225-44345-fix-wordcode-traversal-where-without-a-followi.patch
|
Patch0: backport-Simplify-N-cond-test.patch
|
||||||
Patch0001: CVE-2019-20044.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The zsh is a shell designed for interactive use, and it is also a powerful scripting language. Many of
|
The zsh is a shell designed for interactive use, and it is also a powerful scripting language. Many of
|
||||||
@ -131,6 +130,12 @@ fi
|
|||||||
%{_infodir}/*
|
%{_infodir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 29 2021 zoulin <zoulin13@huawei.com> - 5.8-1
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:update version to 5.8
|
||||||
|
|
||||||
* Wed Jun 24 2020 xuping <xuping21@huawei.com> - 5.7.1-5
|
* Wed Jun 24 2020 xuping <xuping21@huawei.com> - 5.7.1-5
|
||||||
- Type:cves
|
- Type:cves
|
||||||
- ID:CVE-2019-20044
|
- ID:CVE-2019-20044
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user