From 2221fbe2f10a316670e85ecd4575469ddb524ba2 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 30 Aug 2018 07:49:59 -0600 Subject: [PATCH] Add some more ldif -> sudoers tests to verify sudoOrder. --- MANIFEST | 4 + .../sudoers/regress/cvtsudoers/test28.out.ok | 10 +++ plugins/sudoers/regress/cvtsudoers/test28.sh | 73 +++++++++++++++++++ .../sudoers/regress/cvtsudoers/test29.out.ok | 4 + plugins/sudoers/regress/cvtsudoers/test29.sh | 60 +++++++++++++++ 5 files changed, 151 insertions(+) create mode 100644 plugins/sudoers/regress/cvtsudoers/test28.out.ok create mode 100755 plugins/sudoers/regress/cvtsudoers/test28.sh create mode 100644 plugins/sudoers/regress/cvtsudoers/test29.out.ok create mode 100755 plugins/sudoers/regress/cvtsudoers/test29.sh diff --git a/MANIFEST b/MANIFEST index 834f91c47..cd6f510cc 100644 --- a/MANIFEST +++ b/MANIFEST @@ -446,6 +446,10 @@ plugins/sudoers/regress/cvtsudoers/test26.out.ok plugins/sudoers/regress/cvtsudoers/test26.sh plugins/sudoers/regress/cvtsudoers/test27.out.ok plugins/sudoers/regress/cvtsudoers/test27.sh +plugins/sudoers/regress/cvtsudoers/test28.out.ok +plugins/sudoers/regress/cvtsudoers/test28.sh +plugins/sudoers/regress/cvtsudoers/test29.out.ok +plugins/sudoers/regress/cvtsudoers/test29.sh plugins/sudoers/regress/cvtsudoers/test3.out.ok plugins/sudoers/regress/cvtsudoers/test3.sh plugins/sudoers/regress/cvtsudoers/test4.out.ok diff --git a/plugins/sudoers/regress/cvtsudoers/test28.out.ok b/plugins/sudoers/regress/cvtsudoers/test28.out.ok new file mode 100644 index 000000000..ba19cb926 --- /dev/null +++ b/plugins/sudoers/regress/cvtsudoers/test28.out.ok @@ -0,0 +1,10 @@ +Defaults log_output + +# sudoRole millert +millert ALL = (ALL : ALL) ALL + +# sudoRole root +root ALL = (ALL : ALL) NOPASSWD: ALL + +# sudoRole %wheel +%wheel +sudo-hosts = (ALL : ALL) NOPASSWD: ALL diff --git a/plugins/sudoers/regress/cvtsudoers/test28.sh b/plugins/sudoers/regress/cvtsudoers/test28.sh new file mode 100755 index 000000000..c923ef027 --- /dev/null +++ b/plugins/sudoers/regress/cvtsudoers/test28.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# +# Test LDAP sudoOrder when converting to sudoers. +# + +exec 2>&1 +./cvtsudoers -c "" -i ldif -f sudoers <&1 +./cvtsudoers -c "" -i ldif -f sudoers <