diff options
author | tjr <tjr@FreeBSD.org> | 2003-01-08 10:50:08 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-01-08 10:50:08 +0000 |
commit | d53165c37bbaebc8f350ae259d1209efa6882be4 (patch) | |
tree | 3b69f2916c7305690bd4f0e9b1ea233d7a0a751f /bin/sh | |
parent | 83e0ce13e683860e80969a15c0b3c5597fc6e0bf (diff) | |
download | FreeBSD-src-d53165c37bbaebc8f350ae259d1209efa6882be4.zip FreeBSD-src-d53165c37bbaebc8f350ae259d1209efa6882be4.tar.gz |
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
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/expand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index d6d34c4..c4ee6f8 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; |