}
policy {
- #
- # Outputs the contents of the control list in debugging (-X) mode
- #
- debug_control {
- if("%{debug_attr:control[*]}" == '') {
- noop
- }
- }
-
- #
- # Outputs the contents of the request list in debugging (-X) mode
- #
- debug_request {
- if("%{debug_attr:request[*]}" == '') {
- noop
- }
- }
-
- #
- # Outputs the contents of the reply list in debugging (-X) mode
- #
- debug_reply {
- if("%{debug_attr:reply[*]}" == '') {
- noop
- }
- }
-
- #
- # Outputs the contents of the main lists in debugging (-X) mode
- #
- debug_all {
- debug_control
- debug_request
- debug_reply
- }
-
- #
- # Set the test to successful, but only if there are no failures.
- #
- success {
- if (!&reply.Result-Status) {
- update reply {
- &Result-Status := "success"
- }
- }
- }
-
- test_fail {
- update reply {
- &Result-Status += "Failure in test at line %{interpreter:...line}"
- }
-
- if (&parent.request.User-Name) {
- update parent.reply {
- &Result-Status += "Failure in test at line %{interpreter:...line}"
- }
- }
- }
+$INCLUDE policy.conf
}
instantiate {
--- /dev/null
+#
+# Common policies for the test cases.
+#
+
+#
+# Outputs the contents of the control list in debugging (-X) mode
+#
+debug_control {
+ if("%{debug_attr:control[*]}" == '') {
+ noop
+ }
+}
+
+#
+# Outputs the contents of the request list in debugging (-X) mode
+#
+debug_request {
+ if("%{debug_attr:request[*]}" == '') {
+ noop
+ }
+}
+
+#
+# Outputs the contents of the reply list in debugging (-X) mode
+#
+debug_reply {
+ if("%{debug_attr:reply[*]}" == '') {
+ noop
+ }
+}
+
+#
+# Outputs the contents of the main lists in debugging (-X) mode
+#
+debug_all {
+ debug_control
+ debug_request
+ debug_reply
+}
+
+#
+# Just check that this can be referred to as "virtual_policy.post-auth"
+#
+virtual_policy {
+ ok
+}
+
+with.dots {
+ ok
+}
+
+#
+# Set the test to successful, but only if there are no failures.
+#
+success {
+ if (!&reply.Result-Status) {
+ update reply {
+ &Result-Status := "success"
+ }
+ }
+
+ if (&parent.request.User-Name && !&parent.reply.Result-Status) {
+ update parent.reply {
+ &Result-Status := "success"
+ }
+ }
+}
+
+test_fail {
+ update reply {
+ &Result-Status += "Failure in test at line %{interpreter:...line}"
+ }
+
+ if (&parent.request.User-Name) {
+ update parent.reply {
+ &Result-Status += "Failure in test at line %{interpreter:...line}"
+ }
+ }
+}
}
policy {
- #
- # Outputs the contents of the control list in debugging (-X) mode
- #
- debug_control {
- if("%{debug_attr:control[*]}" == '') {
- noop
- }
- }
-
- #
- # Outputs the contents of the request list in debugging (-X) mode
- #
- debug_request {
- if("%{debug_attr:request[*]}" == '') {
- noop
- }
- }
-
- #
- # Outputs the contents of the reply list in debugging (-X) mode
- #
- debug_reply {
- if("%{debug_attr:reply[*]}" == '') {
- noop
- }
- }
-
- #
- # Outputs the contents of the main lists in debugging (-X) mode
- #
- debug_all {
- debug_control
- debug_request
- debug_reply
- }
-
- #
- # Just check that this can be referred to as "virtual_policy.post-auth"
- #
- virtual_policy {
- ok
- }
-
- with.dots {
- ok
- }
-
- #
- # Set the test to successful, but only if there are no failures.
- #
- success {
- if (!&reply.Result-Status) {
- update reply {
- &Result-Status := "success"
- }
- }
-
- if (&parent.request.User-Name && !&parent.reply.Result-Status) {
- update parent.reply {
- &Result-Status := "success"
- }
- }
- }
-
- test_fail {
- update reply {
- &Result-Status += "Failure in test at line %{interpreter:...line}"
- }
-
- if (&parent.request.User-Name) {
- update parent.reply {
- &Result-Status += "Failure in test at line %{interpreter:...line}"
- }
- }
- }
+$INCLUDE policy.conf
#
# Return within a policy