Add support for matching command and args using regular expressions.

Either the command, its arguments or both may be (separate)
regular expressions.
This commit is contained in:
Todd C. Miller
2022-02-10 18:26:24 -07:00
parent c8bf591042
commit 86d2173937
26 changed files with 3854 additions and 2491 deletions

View File

@@ -24,9 +24,9 @@
#include "sudo_queue.h"
/* Characters that must be quoted in sudoers. */
#define SUDOERS_QUOTED ":\\,=#\""
#define SUDOERS_QUOTED_CMD ":\\,= \t#"
#define SUDOERS_QUOTED_ARG ":\\,=#"
#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)