mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 05:48:18 +00:00
If a Defaults value contains a blank, double-quote the string.
This commit is contained in:
parent
9cf8213c26
commit
c6cf39cdfd
6
parse.c
6
parse.c
@ -320,7 +320,11 @@ display_defaults(pw)
|
||||
lbuf_append(&lbuf, prefix, NULL);
|
||||
if (d->val != NULL) {
|
||||
lbuf_append(&lbuf, d->var, d->op == '+' ? " += " :
|
||||
d->op == '-' ? "-=" : "=", d->val, NULL);
|
||||
d->op == '-' ? " -= " : " = ", NULL);
|
||||
if (strpbrk(d->val, " \t") != NULL)
|
||||
lbuf_append(&lbuf, "\"", d->val, "\"", NULL);
|
||||
else
|
||||
lbuf_append(&lbuf, d->val, NULL);
|
||||
} else
|
||||
lbuf_append(&lbuf, d->op == FALSE ? "!" : "", d->var, NULL);
|
||||
prefix = ", ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user