From edd6960fe5c0dff10af7dc90d112df368594b190 Mon Sep 17 00:00:00 2001 From: "Vojtech Vitek (V-Teq)" Date: Mon, 24 Jan 2011 16:16:20 +0100 Subject: [PATCH] - Don't set $REMOTEHOST on the local machine Resolves: #669176 --- tcsh-6.17.00-dont-set-empty-remotehost.patch | 18 ++++++++++++++++++ tcsh.spec | 8 ++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 tcsh-6.17.00-dont-set-empty-remotehost.patch diff --git a/tcsh-6.17.00-dont-set-empty-remotehost.patch b/tcsh-6.17.00-dont-set-empty-remotehost.patch new file mode 100644 index 0000000..8fa96c8 --- /dev/null +++ b/tcsh-6.17.00-dont-set-empty-remotehost.patch @@ -0,0 +1,18 @@ +--- tcsh-6.17.00-orig/tc.func.c 2009-06-25 23:15:38.000000000 +0200 ++++ tcsh-6.17.00/tc.func.c 2011-01-14 12:48:54.959051220 +0100 +@@ -2025,12 +2025,13 @@ remotehost(void) + } + wait_options = 0; + done: ++ cleanup_push(&hostname, strbuf_cleanup); + xclose(fds[0]); + while ((wait_res = waitpid(pid, &status, wait_options)) == -1 + && errno == EINTR) + handle_pending_signals(); +- cleanup_push(&hostname, strbuf_cleanup); +- if (wait_res == pid && WIFEXITED(status) && WEXITSTATUS(status) == 0) { ++ if (hostname.len > 0 && wait_res == pid && WIFEXITED(status) ++ && WEXITSTATUS(status) == 0) { + strbuf_terminate(&hostname); + tsetenv(STRREMOTEHOST, str2short(hostname.s)); + } diff --git a/tcsh.spec b/tcsh.spec index 100503b..786ae66 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -28,8 +28,10 @@ Patch16: tcsh-6.17.00-printexitvalue.patch Patch17: tcsh-6.17.00-testsuite.patch # Accepted by upstream: Patch18: tcsh-6.17.00-extrafork.patch -# Proposed to upstream: http://bugs.gw.com/view.php?id=109 +# Proposed to upstream (http://bugs.gw.com/view.php?id=109): Patch19: tcsh-6.17.00-wait-intr.patch +# Accepted by upstream (tcsh-6.17.02b http://bugs.gw.com/view.php?id=112): +Patch21: tcsh-6.17.00-dont-set-empty-remotehost.patch Provides: csh = %{version} Requires(post): grep Requires(postun): coreutils, grep @@ -64,6 +66,7 @@ like syntax. %patch17 -p1 -b .testsuite %patch18 -p1 -b .extrafork %patch19 -p1 -b .wait-intr +%patch21 -p1 -b .dont-set-empty-remotehost for i in Fixes WishList; do iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \ @@ -137,9 +140,10 @@ fi %{_mandir}/man1/*.1* %changelog -* Tue Dec 21 2010 Vojtech Vitek (V-Teq) - 6.17-10 - Make wait builtin command interruptible Resolves: #440465 +- Don't set $REMOTEHOST on the local machine + Resolves: #669176 * Wed Oct 6 2010 Vitezslav Crhonek - 6.17-9 - Remove fork when tcsh processes backquotes