2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-01 06:45:10 +00:00

Don't escape double quotes (") in a command when printing it.

Previously, cvtsudoers and "sudo -l" would escape double quotes in
a command or command line argument, which is not valid sudoers syntax.
This commit is contained in:
Todd C. Miller
2022-02-08 15:44:18 -07:00
parent 8adad85b4b
commit 10ad934b77
8 changed files with 43 additions and 3 deletions

View File

@@ -24,7 +24,9 @@
#include "sudo_queue.h"
/* Characters that must be quoted in sudoers. */
#define SUDOERS_QUOTED ":\\,=#\""
#define SUDOERS_QUOTED ":\\,=#\""
#define SUDOERS_QUOTED_CMD ":\\,= \t#"
#define SUDOERS_QUOTED_ARG ":\\,=#"
/* Returns true if string 's' contains meta characters. */
#define has_meta(s) (strpbrk(s, "\\?*[]") != NULL)