diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:37:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:37:38 +0000 |
commit | ae581a19fbe896a797450b9d9573fb66f2735227 (patch) | |
tree | 56c40be8518a29c9351364d13a9676aa83932dc0 /plugins/sudoers/regress/sudoers/test28.in | |
parent | Initial commit. (diff) | |
download | sudo-ae581a19fbe896a797450b9d9573fb66f2735227.tar.xz sudo-ae581a19fbe896a797450b9d9573fb66f2735227.zip |
Adding upstream version 1.9.13p3.upstream/1.9.13p3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/sudoers/regress/sudoers/test28.in')
-rw-r--r-- | plugins/sudoers/regress/sudoers/test28.in | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/sudoers/regress/sudoers/test28.in b/plugins/sudoers/regress/sudoers/test28.in new file mode 100644 index 0000000..e546aed --- /dev/null +++ b/plugins/sudoers/regress/sudoers/test28.in @@ -0,0 +1,36 @@ +# Test passprompt_regex +Defaults passprompt_regex="(?i)password: *" + +# Test simple command with regex args +user ALL = /bin/ls ^/etc/(hosts|motd|issue)$ + +# Test wildcard command with regex args +user ALL = /usr/bin/c* ^/etc/(hosts|motd|issue)$ + +# Test regex command with no args +user ALL = ^/usr/bin/(who|w|id|whoami)$ + +# Test regex command with empty args +user ALL = ^/usr/bin/(who|w|id|whoami)$ "" + +# Test regex command with simple args +user ALL = ^/usr/bin/(who|w|id|whoami)$ root + +# Test regex command with wildcard args +user ALL = ^/usr/bin/(who|w|id|whoami)$ -* + +# Test regex command with regex args +user ALL = ^/usr/bin/(who|w|id|whoami)$ ^(-[ahi] ?)+$ + +# Test sudoedit with regex args +user ALL = sudoedit ^/etc/(hosts|motd|issue)$ + +# Test regex command with escapted '$', no args +user ALL = ^/usr/bin/\$tree$ + +# Combined entry +user host1 = /bin/ls ^/etc/(hosts|motd|issue)$, \ + /usr/bin/c* ^/etc/(hosts|motd|issue)$ : \ + host2 = ^/usr/bin/(who|w|id|whoami)$ "", \ + ^/usr/bin/(who|w|id|whoami)$ root : \ + host3 = /bin/echo ^\$foo$ |