bash/bash-tilda-race-condition.patch

45 lines
1.4 KiB
Diff

From 262639471df23c1e898b3e74d68db23b02dbbefc Mon Sep 17 00:00:00 2001
From: Siteshwar Vashisht <svashisht@redhat.com>
Date: Tue, 17 May 2016 18:05:03 +0530
Subject: [PATCH] Do not set terminate_immediately and interrupt_immediately
while expanding tilda
---
general.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/general.c b/general.c
index 087689e..220543c 100644
--- a/general.c
+++ b/general.c
@@ -983,16 +983,6 @@ bash_tilde_expand (s, assign_p)
int old_immed, old_term, r;
char *ret;
- old_immed = interrupt_immediately;
- old_term = terminate_immediately;
- /* We want to be able to interrupt tilde expansion. Ordinarily, we can just
- jump to top_level, but we don't want to run any trap commands in a signal
- handler context. We might be able to get away with just checking for
- things like SIGINT and SIGQUIT. */
- if (any_signals_trapped () < 0)
- interrupt_immediately = 1;
- terminate_immediately = 1;
-
tilde_additional_prefixes = assign_p == 0 ? (char **)0
: (assign_p == 2 ? bash_tilde_prefixes2 : bash_tilde_prefixes);
if (assign_p == 2)
@@ -1001,9 +991,6 @@ bash_tilde_expand (s, assign_p)
r = (*s == '~') ? unquoted_tilde_word (s) : 1;
ret = r ? tilde_expand (s) : savestring (s);
- interrupt_immediately = old_immed;
- terminate_immediately = old_term;
-
QUIT;
return (ret);
--
2.5.5