Blame SOURCES/sudo-1.8.18-testsuitefix.patch

0e1944
From ea44d916b9dffe0f33c3c62d1677567bf64a26b8 Mon Sep 17 00:00:00 2001
0e1944
From: Radovan Sroka <rsroka@redhat.com>
0e1944
Date: Tue, 20 Sep 2016 15:07:53 +0200
0e1944
Subject: [PATCH 10/10] Fix upstream testsuite
0e1944
0e1944
---
0e1944
 plugins/sudoers/regress/sudoers/test2.in      | 60 ---------------------------
0e1944
 plugins/sudoers/regress/sudoers/test2.in_     | 60 +++++++++++++++++++++++++++
0e1944
 plugins/sudoers/regress/testsudoers/test3.sh  | 13 ------
0e1944
 plugins/sudoers/regress/testsudoers/test3.sh_ | 13 ++++++
0e1944
 4 files changed, 73 insertions(+), 73 deletions(-)
0e1944
 delete mode 100644 plugins/sudoers/regress/sudoers/test2.in
0e1944
 create mode 100644 plugins/sudoers/regress/sudoers/test2.in_
0e1944
 delete mode 100755 plugins/sudoers/regress/testsudoers/test3.sh
0e1944
 create mode 100755 plugins/sudoers/regress/testsudoers/test3.sh_
0e1944
0e1944
diff --git a/plugins/sudoers/regress/sudoers/test2.in b/plugins/sudoers/regress/sudoers/test2.in
0e1944
deleted file mode 100644
0e1944
index cfdfaa3..0000000
0e1944
--- a/plugins/sudoers/regress/sudoers/test2.in
0e1944
+++ /dev/null
0e1944
@@ -1,60 +0,0 @@
0e1944
-# Check quoted user name in User_Alias
0e1944
-User_Alias UA1 = "foo"
0e1944
-User_Alias UA2 = "foo.bar"
0e1944
-User_Alias UA3 = "foo\""
0e1944
-User_Alias UA4 = "foo:bar"
0e1944
-User_Alias UA5 = "foo:bar\""
0e1944
-
0e1944
-# Check quoted group name in User_Alias
0e1944
-User_Alias UA6 = "%baz"
0e1944
-User_Alias UA7 = "%baz.biz"
0e1944
-
0e1944
-# Check quoted non-Unix group name in User_Alias
0e1944
-User_Alias UA8 = "%:C/non UNIX 0 c"
0e1944
-User_Alias UA9 = "%:C/non\'UNIX\'1 c"
0e1944
-User_Alias UA10 = "%:C/non\"UNIX\"0 c"
0e1944
-User_Alias UA11 = "%:C/non_UNIX_0 c"
0e1944
-User_Alias UA12 = "%:C/non\'UNIX_3 c"
0e1944
-
0e1944
-# Check quoted user name in Runas_Alias
0e1944
-Runas_Alias RA1 = "foo"
0e1944
-Runas_Alias RA2 = "foo\""
0e1944
-Runas_Alias RA3 = "foo:bar"
0e1944
-Runas_Alias RA4 = "foo:bar\""
0e1944
-
0e1944
-# Check quoted host name in Defaults
0e1944
-Defaults@"somehost" set_home
0e1944
-Defaults@"quoted\"" set_home
0e1944
-
0e1944
-# Check quoted user name in Defaults
0e1944
-Defaults:"you" set_home
0e1944
-Defaults:"us\"" set_home
0e1944
-Defaults:"%them" set_home
0e1944
-Defaults:"%: non UNIX 0 c" set_home
0e1944
-Defaults:"+net" set_home
0e1944
-
0e1944
-# Check quoted runas name in Defaults
0e1944
-Defaults>"someone" set_home
0e1944
-Defaults>"some one" set_home
0e1944
-
0e1944
-# Check quoted command in Defaults
0e1944
-# XXX - not currently supported
0e1944
-#Defaults!"/bin/ls -l" set_home
0e1944
-#Defaults!"/bin/ls -l \"foo\"" set_home
0e1944
-
0e1944
-# Check quoted user, runas and host name in Cmnd_Spec
0e1944
-"foo"		"hosta" = ("root") ALL
0e1944
-"foo.bar"	"hostb" = ("root") ALL
0e1944
-"foo\""		"hostc" = ("root") ALL
0e1944
-"foo:bar"	"hostd" = ("root") ALL
0e1944
-"foo:bar\""	"hoste" = ("root") ALL
0e1944
-
0e1944
-# Check quoted group/netgroup name in Cmnd_Spec
0e1944
-"%baz"			"hosta" = ("root") ALL
0e1944
-"%baz.biz"		"hostb" = ("root") ALL
0e1944
-"%:C/non UNIX 0 c"	"hostc" = ("root") ALL
0e1944
-"%:C/non\'UNIX\'1 c"	"hostd" = ("root") ALL
0e1944
-"%:C/non\"UNIX\"0 c"	"hoste" = ("root") ALL
0e1944
-"%:C/non_UNIX_0 c"	"hostf" = ("root") ALL
0e1944
-"%:C/non\'UNIX_3 c"	"hostg" = ("root") ALL
0e1944
-"+netgr"		"hosth" = ("root") ALL
0e1944
diff --git a/plugins/sudoers/regress/sudoers/test2.in_ b/plugins/sudoers/regress/sudoers/test2.in_
0e1944
new file mode 100644
0e1944
index 0000000..cfdfaa3
0e1944
--- /dev/null
0e1944
+++ b/plugins/sudoers/regress/sudoers/test2.in_
0e1944
@@ -0,0 +1,60 @@
0e1944
+# Check quoted user name in User_Alias
0e1944
+User_Alias UA1 = "foo"
0e1944
+User_Alias UA2 = "foo.bar"
0e1944
+User_Alias UA3 = "foo\""
0e1944
+User_Alias UA4 = "foo:bar"
0e1944
+User_Alias UA5 = "foo:bar\""
0e1944
+
0e1944
+# Check quoted group name in User_Alias
0e1944
+User_Alias UA6 = "%baz"
0e1944
+User_Alias UA7 = "%baz.biz"
0e1944
+
0e1944
+# Check quoted non-Unix group name in User_Alias
0e1944
+User_Alias UA8 = "%:C/non UNIX 0 c"
0e1944
+User_Alias UA9 = "%:C/non\'UNIX\'1 c"
0e1944
+User_Alias UA10 = "%:C/non\"UNIX\"0 c"
0e1944
+User_Alias UA11 = "%:C/non_UNIX_0 c"
0e1944
+User_Alias UA12 = "%:C/non\'UNIX_3 c"
0e1944
+
0e1944
+# Check quoted user name in Runas_Alias
0e1944
+Runas_Alias RA1 = "foo"
0e1944
+Runas_Alias RA2 = "foo\""
0e1944
+Runas_Alias RA3 = "foo:bar"
0e1944
+Runas_Alias RA4 = "foo:bar\""
0e1944
+
0e1944
+# Check quoted host name in Defaults
0e1944
+Defaults@"somehost" set_home
0e1944
+Defaults@"quoted\"" set_home
0e1944
+
0e1944
+# Check quoted user name in Defaults
0e1944
+Defaults:"you" set_home
0e1944
+Defaults:"us\"" set_home
0e1944
+Defaults:"%them" set_home
0e1944
+Defaults:"%: non UNIX 0 c" set_home
0e1944
+Defaults:"+net" set_home
0e1944
+
0e1944
+# Check quoted runas name in Defaults
0e1944
+Defaults>"someone" set_home
0e1944
+Defaults>"some one" set_home
0e1944
+
0e1944
+# Check quoted command in Defaults
0e1944
+# XXX - not currently supported
0e1944
+#Defaults!"/bin/ls -l" set_home
0e1944
+#Defaults!"/bin/ls -l \"foo\"" set_home
0e1944
+
0e1944
+# Check quoted user, runas and host name in Cmnd_Spec
0e1944
+"foo"		"hosta" = ("root") ALL
0e1944
+"foo.bar"	"hostb" = ("root") ALL
0e1944
+"foo\""		"hostc" = ("root") ALL
0e1944
+"foo:bar"	"hostd" = ("root") ALL
0e1944
+"foo:bar\""	"hoste" = ("root") ALL
0e1944
+
0e1944
+# Check quoted group/netgroup name in Cmnd_Spec
0e1944
+"%baz"			"hosta" = ("root") ALL
0e1944
+"%baz.biz"		"hostb" = ("root") ALL
0e1944
+"%:C/non UNIX 0 c"	"hostc" = ("root") ALL
0e1944
+"%:C/non\'UNIX\'1 c"	"hostd" = ("root") ALL
0e1944
+"%:C/non\"UNIX\"0 c"	"hoste" = ("root") ALL
0e1944
+"%:C/non_UNIX_0 c"	"hostf" = ("root") ALL
0e1944
+"%:C/non\'UNIX_3 c"	"hostg" = ("root") ALL
0e1944
+"+netgr"		"hosth" = ("root") ALL
0e1944
diff --git a/plugins/sudoers/regress/testsudoers/test3.sh b/plugins/sudoers/regress/testsudoers/test3.sh
0e1944
deleted file mode 100755
0e1944
index c1251b9..0000000
0e1944
--- a/plugins/sudoers/regress/testsudoers/test3.sh
0e1944
+++ /dev/null
0e1944
@@ -1,13 +0,0 @@
0e1944
-#!/bin/sh
0e1944
-#
0e1944
-# Test #include facility
0e1944
-#
0e1944
-
0e1944
-MYUID=`\ls -lnd $TESTDIR/test3.d | awk '{print $3}'`
0e1944
-MYGID=`\ls -lnd $TESTDIR/test3.d | awk '{print $4}'`
0e1944
-exec 2>&1
0e1944
-./testsudoers -U $MYUID -G $MYGID root id <
0e1944
-#includedir $TESTDIR/test3.d
0e1944
-EOF
0e1944
-
0e1944
-exit 0
0e1944
diff --git a/plugins/sudoers/regress/testsudoers/test3.sh_ b/plugins/sudoers/regress/testsudoers/test3.sh_
0e1944
new file mode 100755
0e1944
index 0000000..c1251b9
0e1944
--- /dev/null
0e1944
+++ b/plugins/sudoers/regress/testsudoers/test3.sh_
0e1944
@@ -0,0 +1,13 @@
0e1944
+#!/bin/sh
0e1944
+#
0e1944
+# Test #include facility
0e1944
+#
0e1944
+
0e1944
+MYUID=`\ls -lnd $TESTDIR/test3.d | awk '{print $3}'`
0e1944
+MYGID=`\ls -lnd $TESTDIR/test3.d | awk '{print $4}'`
0e1944
+exec 2>&1
0e1944
+./testsudoers -U $MYUID -G $MYGID root id <
0e1944
+#includedir $TESTDIR/test3.d
0e1944
+EOF
0e1944
+
0e1944
+exit 0
0e1944
-- 
0e1944
2.7.4
0e1944