Quote ^foo$ on command line to protect it from the shell.

This commit is contained in:
Todd C. Miller
2022-07-07 10:13:22 -06:00
parent f6e4d2765a
commit 41e7532c90

View File

@@ -28,7 +28,7 @@ root ALL = /bin/*at ^/var/log/[^/]+$
EOF
# Command: path, args: args start with escaped ^
$TESTSUDOERS root /usr/bin/grep ^foo$ <<'EOF'
$TESTSUDOERS root /usr/bin/grep '^foo$' <<'EOF'
root ALL = /usr/bin/grep \^foo$
EOF