Add back SUDOERS_NAME_MATCH and enable it when fuzzing.

This avoids the test environment from influencing sudoers matching.
This commit is contained in:
Todd C. Miller
2021-02-21 13:39:56 -07:00
parent ecbe95589a
commit 921097cb67
3 changed files with 75 additions and 5 deletions

View File

@@ -29,6 +29,11 @@
/* Returns true if string 's' contains meta characters. */
#define has_meta(s) (strpbrk(s, "\\?*[]") != NULL)
/* Match by name, not inode, when fuzzing. */
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
# define SUDOERS_NAME_MATCH
#endif
#undef UNSPEC
#define UNSPEC -1
#undef DENY