[ksh/f21] cd builtin file descriptor operations messed with IO redirections (#1133586)
Michal Hlavinka
mhlavink at fedoraproject.org
Wed Aug 27 07:52:54 UTC 2014
commit 3dbaa9340f41ac11307ad7e98de4dc39ed2a3f15
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Wed Aug 27 09:52:54 2014 +0200
cd builtin file descriptor operations messed with IO redirections (#1133586)
ksh-20130613-cdfix4.patch | 15 +++++++++++++++
ksh.spec | 7 ++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/ksh-20130613-cdfix4.patch b/ksh-20130613-cdfix4.patch
new file mode 100644
index 0000000..5b29017
--- /dev/null
+++ b/ksh-20130613-cdfix4.patch
@@ -0,0 +1,15 @@
+diff -up ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c.cdfix4 ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c
+--- ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c.cdfix4 2014-08-26 15:24:57.276953822 +0200
++++ ksh-20120801/src/cmd/ksh93/bltins/cd_pwd.c 2014-08-26 15:25:34.738770361 +0200
+@@ -143,9 +143,9 @@ int sh_diropenat(Shell_t *shp, int dir,
+ }
+
+ /* Move fd to a number > 10 and *register* the fd number with the shell */
+- shfd = sh_fcntl(fd, F_dupfd_cloexec, 10);
++ shfd = fcntl(fd, F_dupfd_cloexec, 10);
+ savederrno=errno;
+- sh_close(fd);
++ close(fd);
+ errno=savederrno;
+ return(shfd);
+ }
diff --git a/ksh.spec b/ksh.spec
index 01cd180..3653c76 100644
--- a/ksh.spec
+++ b/ksh.spec
@@ -9,7 +9,7 @@ Group: System Environment/Shells
#CPL everywhere else (for KSH itself)
License: CPL
Version: %{releasedate}
-Release: 20%{?dist}
+Release: 21%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz
Source2: kshcomp.conf
@@ -118,6 +118,7 @@ Patch49: ksh-20120801-cdfix3.patch
# sent upstream, rhbz#1116506
Patch50: ksh-20120801-locking.patch
+Patch100: ksh-20130613-cdfix4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh
@@ -173,6 +174,7 @@ with "sh" (the Bourne Shell).
%patch48 -p1 -b .fununset
%patch49 -p1 -b .cdfix3
%patch50 -p1 -b .locking
+%patch100 -p1 -b .cdfix4
#/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@@ -273,6 +275,9 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Aug 27 2014 Michal Hlavinka <mhlavink at redhat.com> - 20120801-21
+- cd builtin file descriptor operations messed with IO redirections (#1133586)
+
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20120801-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list