]> granicus.if.org Git - sudo/commitdiff
Check that uids work in per-user and per-runas Defaults
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 24 Mar 2011 14:40:03 +0000 (10:40 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 24 Mar 2011 14:40:03 +0000 (10:40 -0400)
Check that uids and gids work in a Command_Spec

plugins/sudoers/regress/sudoers/test6.in [new file with mode: 0644]
plugins/sudoers/regress/sudoers/test6.out.ok [new file with mode: 0644]
plugins/sudoers/regress/sudoers/test6.toke.ok [new file with mode: 0644]

diff --git a/plugins/sudoers/regress/sudoers/test6.in b/plugins/sudoers/regress/sudoers/test6.in
new file mode 100644 (file)
index 0000000..e804571
--- /dev/null
@@ -0,0 +1,15 @@
+# Check that uids work in per-user and per-runas Defaults
+Defaults:#123 set_home
+Defaults>#123 set_home
+Defaults:"#123" set_home
+Defaults>"#123" set_home
+
+# Check that uids work in a Command_Spec
+#0 ALL = ALL
+#0 ALL = (#0 : #0) ALL
+"#0" ALL = ALL
+"#0" ALL = ("#0" : "#0") ALL
+
+# Check that gids work in a Command_Spec
+%#0 ALL = ALL
+"%#0" ALL = ALL
diff --git a/plugins/sudoers/regress/sudoers/test6.out.ok b/plugins/sudoers/regress/sudoers/test6.out.ok
new file mode 100644 (file)
index 0000000..1cc6506
--- /dev/null
@@ -0,0 +1,14 @@
+Parses OK.
+
+Defaults:#123  set_home
+Defaults>#123  set_home
+Defaults:#123  set_home
+Defaults>#123  set_home
+
+
+#0     ALL = ALL
+#0     ALL = (#0) ALL
+#0     ALL = ALL
+#0     ALL = (#0) ALL
+%#0    ALL = ALL
+%#0    ALL = ALL
diff --git a/plugins/sudoers/regress/sudoers/test6.toke.ok b/plugins/sudoers/regress/sudoers/test6.toke.ok
new file mode 100644 (file)
index 0000000..a9c0522
--- /dev/null
@@ -0,0 +1,15 @@
+#
+DEFAULTS_USER WORD(5) DEFVAR 
+DEFAULTS_RUNAS WORD(5) DEFVAR 
+DEFAULTS_USER BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR 
+DEFAULTS_RUNAS BEGINSTR STRBODY ENDSTR WORD(4) DEFVAR 
+
+#
+WORD(5) ALL = ALL 
+WORD(5) ALL = ( WORD(5) : WORD(5) ) ALL 
+BEGINSTR STRBODY ENDSTR WORD(4) ALL = ALL 
+BEGINSTR STRBODY ENDSTR WORD(4) ALL = ( BEGINSTR STRBODY ENDSTR WORD(4) : BEGINSTR STRBODY ENDSTR WORD(4) ) ALL 
+
+#
+USERGROUP ALL = ALL 
+BEGINSTR STRBODY ENDSTR USERGROUP ALL = ALL