1 Subject: [PATCH] Do not quote possible meta characters in shell mode
3 Starting with sudo 1.7.3, possible meta characters are quoted by
4 preceding with a \ when using shell mode. Disable this so that
5 the behavior continues to match that of versions 1.7.0-1.7.2*.
7 For example, without this change the command:
9 sudo -s 'echo "${PWD+a b}"'
11 will produce an error something like:
13 /bin/bash: echo "${PWD+a b}": command not found
15 whereas when using versions 1.7.0-1.7.2*, it will produce output
20 Prior to version 1.7.0, when using shell mode an error would also
21 be produced because "-c" was not being passed to the shell in that
24 OS X expects the 1.7.0-1.7.2* behavior so restore the non-quoting
28 1 file changed, 3 deletions(-)
30 diff --git a/sudo.c b/sudo.c
31 index 041b0e75..22c59654 100644
34 @@ -746,9 +746,6 @@ init_vars(envp)
35 cmnd = dst = emalloc2(cmnd_size, 2);
36 for (av = NewArgv; *av != NULL; av++) {
37 for (src = *av; *src != '\0'; src++) {
38 - /* quote potential meta characters */
39 - if (!isalnum((unsigned char)*src) && *src != '_' && *src != '-')