[ksh/f18] ksh could not enter directories with path containing /.something (#889748)
Michal Hlavinka
mhlavink at fedoraproject.org
Fri Jan 25 14:47:39 UTC 2013
commit 8668f4d7446f179bb6f13a3f45f1c1fa30ccdf28
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Fri Jan 25 15:47:33 2013 +0100
ksh could not enter directories with path containing /.something (#889748)
- file name autocomplete prevented following numeric input (#889745)
ksh-20120801-cdfix.patch | 14 ++++++++++++++
ksh-20120801-tabfix.patch | 15 +++++++++++++++
ksh.spec | 10 +++++++++-
3 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/ksh-20120801-cdfix.patch b/ksh-20120801-cdfix.patch
new file mode 100644
index 0000000..6d6c016
--- /dev/null
+++ b/ksh-20120801-cdfix.patch
@@ -0,0 +1,14 @@
+diff -up ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c.cdfix ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c
+--- ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c.cdfix 2013-01-04 18:54:11.890462334 +0100
++++ ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c 2013-01-04 18:54:11.914462535 +0100
+@@ -214,7 +214,10 @@ int b_cd(int argc, char *argv[],Shbltin_
+ if(*++dp=='.' && (*++dp=='/' || *dp==0))
+ n++;
+ else if(*dp && *dp!='/')
++ {
++ dp--;
+ break;
++ }
+ if(*dp==0)
+ break;
+ }
diff --git a/ksh-20120801-tabfix.patch b/ksh-20120801-tabfix.patch
new file mode 100644
index 0000000..59723ef
--- /dev/null
+++ b/ksh-20120801-tabfix.patch
@@ -0,0 +1,15 @@
+diff -up ksh-20120801/src/cmd/ksh93/edit/emacs.c.tabfix ksh-20120801/src/cmd/ksh93/edit/emacs.c
+--- ksh-20120801/src/cmd/ksh93/edit/emacs.c.tabfix 2013-01-04 16:50:21.124706144 +0100
++++ ksh-20120801/src/cmd/ksh93/edit/emacs.c 2013-01-04 16:50:21.150706365 +0100
+@@ -1011,9 +1011,10 @@ static int escape(register Emacs_t* ep,r
+ ep->ed->e_tabcount=0;
+ else
+ {
++ int oldi = i;
+ i=ed_getchar(ep->ed,0);
+ ed_ungetchar(ep->ed,i);
+- if(isdigit(i))
++ if(oldi=='=' && isdigit(i))
+ ed_ungetchar(ep->ed,ESC);
+ }
+ }
diff --git a/ksh.spec b/ksh.spec
index 2c434b9..2e5ea04 100644
--- a/ksh.spec
+++ b/ksh.spec
@@ -6,7 +6,7 @@ URL: http://www.kornshell.com/
Group: System Environment/Shells
License: EPL
Version: 20120801
-Release: 4%{?dist}
+Release: 5%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source2: kshcomp.conf
@@ -21,6 +21,8 @@ Patch1: ksh-20070328-builtins.patch
#fix regression test suite to be usable during packagebuild - Fedora/RHEL specific
Patch2: ksh-20100826-fixregr.patch
Patch3: rmdirfix.patch
+Patch4: ksh-20120801-cdfix.patch
+Patch5: ksh-20120801-tabfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh
@@ -43,6 +45,8 @@ with "sh" (the Bourne Shell).
%patch1 -p1 -b .builtins
%patch2 -p1 -b .fixregr
%patch3 -p1 -b .rmdirfix
+%patch4 -p1 -b .cdfix
+%patch5 -p1 -b .tabfix
#/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@@ -133,6 +137,10 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Jan 25 2013 Michal Hlavinka <mhlavink at redhat.com> - 20120801-5
+- ksh could not enter directories with path containing /.something (#889748)
+- file name autocomplete prevented following numeric input (#889745)
+
* Thu Nov 22 2012 Michal Hlavinka <mhlavink at redhat.com> - 20120801-4
- bind Home, End, Delete,... key correctly for emacs mode
- do not crash when executed from deleted directory
More information about the scm-commits
mailing list