From 9c92e72c7f307f82febc88f505202dc537c964f4 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Wed, 8 Jan 2003 10:50:08 +0000 Subject: [PATCH] Do not strip CTL* escapes from redirection filenames in exptilde(), expari(), expbackq() and evalvar(). Similar to revision 1.39. Patch from Tor Egge. PR: 45349 MFC after: 2 weeks --- bin/sh/expand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/sh/expand.c b/bin/sh/expand.c index d6d34c402e27..c4ee6f83604d 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -278,7 +278,7 @@ exptilde(char *p, int flag) char c, *startp = p; struct passwd *pw; char *home; - int quotes = flag & (EXP_FULL | EXP_CASE); + int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); while ((c = *p) != '\0') { switch(c) { @@ -369,7 +369,7 @@ expari(int flag) char *p, *start; int result; int begoff; - int quotes = flag & (EXP_FULL | EXP_CASE); + int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); int quoted; @@ -436,7 +436,7 @@ expbackq(union node *cmd, int quoted, int flag) int startloc = dest - stackblock(); char const *syntax = quoted? DQSYNTAX : BASESYNTAX; int saveherefd; - int quotes = flag & (EXP_FULL | EXP_CASE); + int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); INTOFF; saveifs = ifsfirst; @@ -635,7 +635,7 @@ evalvar(char *p, int flag) int startloc; int varlen; int easy; - int quotes = flag & (EXP_FULL | EXP_CASE); + int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); varflags = *p++; subtype = varflags & VSTYPE;