mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-28 12:57:50 +00:00
Add a regress check for the cvtsudoers filter crash.
GitHub issue #198.
This commit is contained in:
parent
264326de57
commit
b8e9fc1b12
2
MANIFEST
2
MANIFEST
@ -812,6 +812,8 @@ plugins/sudoers/regress/cvtsudoers/test39.out.ok
|
|||||||
plugins/sudoers/regress/cvtsudoers/test39.sh
|
plugins/sudoers/regress/cvtsudoers/test39.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/test40.out.ok
|
||||||
|
plugins/sudoers/regress/cvtsudoers/test40.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test5.out.ok
|
plugins/sudoers/regress/cvtsudoers/test5.out.ok
|
||||||
plugins/sudoers/regress/cvtsudoers/test5.sh
|
plugins/sudoers/regress/cvtsudoers/test5.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test6.out.ok
|
plugins/sudoers/regress/cvtsudoers/test6.out.ok
|
||||||
|
10
plugins/sudoers/regress/cvtsudoers/test40.out.ok
Normal file
10
plugins/sudoers/regress/cvtsudoers/test40.out.ok
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
dn: cn=user0,ou=SUDOers,dc=sudo,dc=ws
|
||||||
|
objectClass: top
|
||||||
|
objectClass: sudoRole
|
||||||
|
cn: user0
|
||||||
|
sudoUser: user0
|
||||||
|
sudoHost: A00
|
||||||
|
sudoRunAsUser: 0
|
||||||
|
sudoCommand: /bin/ls
|
||||||
|
sudoOrder: 1
|
||||||
|
|
29
plugins/sudoers/regress/cvtsudoers/test40.sh
Executable file
29
plugins/sudoers/regress/cvtsudoers/test40.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Test use-after-free in cvtsudoers when filtering by command.
|
||||||
|
#
|
||||||
|
# If compiled with address sanitizer, cvtsudoers will crash without the
|
||||||
|
# fix in 9da99e0e671e.
|
||||||
|
#
|
||||||
|
|
||||||
|
: ${CVTSUDOERS=cvtsudoers}
|
||||||
|
|
||||||
|
$CVTSUDOERS -c "" -i ldif -b "ou=SUDOers,dc=sudo,dc=ws" -m cmd='/bin/ls' -p <<EOF
|
||||||
|
objectClass:sudoRole
|
||||||
|
sudoUser:user0
|
||||||
|
sudoHost:A00
|
||||||
|
sudoCommand:/bin/ls
|
||||||
|
sudoRunAs:0
|
||||||
|
|
||||||
|
objectClass:sudoRole
|
||||||
|
sudoUser:user0
|
||||||
|
sudoHost:A00
|
||||||
|
sudoRunAsUser:
|
||||||
|
sudoCommand:
|
||||||
|
|
||||||
|
objectClass:sudoRole
|
||||||
|
sudoUser:user0
|
||||||
|
sudoHost:A00
|
||||||
|
sudoRunAs:
|
||||||
|
sudoCommand:
|
||||||
|
EOF
|
Loading…
x
Reference in New Issue
Block a user