summaryrefslogtreecommitdiffstats
path: root/ipaaction
diff options
context:
space:
mode:
authorSumit Bose <sbose@nb.localdomain>2008-10-27 22:30:21 +0100
committerSumit Bose <sbose@nb.localdomain>2008-10-27 22:30:21 +0100
commit21b61ddd859b7baa1bbf192084926ad9927e5092 (patch)
treebc7c344a1f4d20bb31895196442937417257551e /ipaaction
parent70afe35e769ffbee508a2ca7d0114ec35a8b12aa (diff)
downloadipa_policy-21b61ddd859b7baa1bbf192084926ad9927e5092.tar.gz
ipa_policy-21b61ddd859b7baa1bbf192084926ad9927e5092.tar.xz
ipa_policy-21b61ddd859b7baa1bbf192084926ad9927e5092.zip
added condition and cleanup flag to ipaaction
Diffstat (limited to 'ipaaction')
-rw-r--r--ipaaction/ipaaction.rng21
-rw-r--r--ipaaction/ipaaction_example_policy.xml4
2 files changed, 22 insertions, 3 deletions
diff --git a/ipaaction/ipaaction.rng b/ipaaction/ipaaction.rng
index 8500275..2f6fb57 100644
--- a/ipaaction/ipaaction.rng
+++ b/ipaaction/ipaaction.rng
@@ -39,9 +39,16 @@ xmlns:pa="http://freeipa.org/xml/rng/ns/plugable_architecture/1.0">
</s:pattern>
<optional>
<element name="condition">
- <data type="string">
- <param name="pattern">/.*</param>
- </data>
+ <element name="command">
+ <data type="string">
+ <param name="pattern">/.*</param>
+ </data>
+ </element>
+ <optional>
+ <element name="expected_output">
+ <text/>
+ </element>
+ </optional>
</element>
</optional>
<oneOrMore>
@@ -81,6 +88,14 @@ xmlns:pa="http://freeipa.org/xml/rng/ns/plugable_architecture/1.0">
</element>
</oneOrMore>
</optional>
+ <optional>
+ <element name="cleanup">
+ <choice>
+ <value>yes</value>
+ <value>no</value>
+ </choice>
+ </element>
+ </optional>
</element> <!-- file -->
<element name="run">
<element name="command">
diff --git a/ipaaction/ipaaction_example_policy.xml b/ipaaction/ipaaction_example_policy.xml
index e545703..061bc21 100644
--- a/ipaaction/ipaaction_example_policy.xml
+++ b/ipaaction/ipaaction_example_policy.xml
@@ -10,6 +10,9 @@
</metadata>
<ipaaction>
+ <condition>
+ <command>test -e /etc/redhat-release</command>
+ </condition>
<file>
<url>http://my.server.org/something.txt</url>
<path>/tmp/something.txt</path>
@@ -19,6 +22,7 @@
<selinux_context>unconfined_u:object_r:user_home_t:s0</selinux_context>
<acl>user:dummy:rw-</acl>
<acl>user:admin:rw-</acl>
+ <cleanup>no</cleanup>
</file>
<run>
<command>/bin/rm /tmp/something.txt</command>