mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 09:57:41 +00:00
Add regress test for bug #853
This commit is contained in:
parent
8aad365082
commit
8bf279b11e
2
MANIFEST
2
MANIFEST
@ -452,6 +452,8 @@ plugins/sudoers/regress/cvtsudoers/test29.out.ok
|
|||||||
plugins/sudoers/regress/cvtsudoers/test29.sh
|
plugins/sudoers/regress/cvtsudoers/test29.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test3.out.ok
|
plugins/sudoers/regress/cvtsudoers/test3.out.ok
|
||||||
plugins/sudoers/regress/cvtsudoers/test3.sh
|
plugins/sudoers/regress/cvtsudoers/test3.sh
|
||||||
|
plugins/sudoers/regress/cvtsudoers/test30.out.ok
|
||||||
|
plugins/sudoers/regress/cvtsudoers/test30.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test4.out.ok
|
plugins/sudoers/regress/cvtsudoers/test4.out.ok
|
||||||
plugins/sudoers/regress/cvtsudoers/test4.sh
|
plugins/sudoers/regress/cvtsudoers/test4.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test5.out.ok
|
plugins/sudoers/regress/cvtsudoers/test5.out.ok
|
||||||
|
26
plugins/sudoers/regress/cvtsudoers/test30.out.ok
Normal file
26
plugins/sudoers/regress/cvtsudoers/test30.out.ok
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"User_Specs": [
|
||||||
|
{
|
||||||
|
"User_List": [
|
||||||
|
{ "username": "user1" },
|
||||||
|
{ "username": "user2" },
|
||||||
|
{ "username": "user3" }
|
||||||
|
],
|
||||||
|
"Host_List": [
|
||||||
|
{ "hostname": "ALL" }
|
||||||
|
],
|
||||||
|
"Cmnd_Specs": [
|
||||||
|
{
|
||||||
|
"Commands": [
|
||||||
|
{ "command": "/path/to/cmda" },
|
||||||
|
{
|
||||||
|
"command": "/path/to/cmdb",
|
||||||
|
"negated": true
|
||||||
|
},
|
||||||
|
{ "command": "/path/to/cmdc" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
14
plugins/sudoers/regress/cvtsudoers/test30.sh
Executable file
14
plugins/sudoers/regress/cvtsudoers/test30.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Test alias expasion when converting to JSON.
|
||||||
|
# See https://bugzilla.sudo.ws/show_bug.cgi?id=853
|
||||||
|
#
|
||||||
|
|
||||||
|
exec 2>&1
|
||||||
|
./cvtsudoers -c "" -e -f json <<EOF
|
||||||
|
Cmnd_Alias CMDA=/path/to/cmda
|
||||||
|
Cmnd_Alias CMDB=/path/to/cmdb
|
||||||
|
Cmnd_Alias CMDC=/path/to/cmdc
|
||||||
|
User_Alias USERS=user1,user2,user3
|
||||||
|
USERS ALL=CMDA,!CMDB,CMDC
|
||||||
|
EOF
|
Loading…
x
Reference in New Issue
Block a user