diff options
author | Sumit Bose <sbose@nb.localdomain> | 2008-10-27 22:30:21 +0100 |
---|---|---|
committer | Sumit Bose <sbose@nb.localdomain> | 2008-10-27 22:30:21 +0100 |
commit | 21b61ddd859b7baa1bbf192084926ad9927e5092 (patch) | |
tree | bc7c344a1f4d20bb31895196442937417257551e | |
parent | 70afe35e769ffbee508a2ca7d0114ec35a8b12aa (diff) | |
download | ipa_policy-21b61ddd859b7baa1bbf192084926ad9927e5092.tar.gz ipa_policy-21b61ddd859b7baa1bbf192084926ad9927e5092.tar.xz ipa_policy-21b61ddd859b7baa1bbf192084926ad9927e5092.zip |
added condition and cleanup flag to ipaaction
-rw-r--r-- | ipaaction/ipaaction.rng | 21 | ||||
-rw-r--r-- | ipaaction/ipaaction_example_policy.xml | 4 | ||||
-rw-r--r-- | sudoers/sudoers.rng | 7 | ||||
-rw-r--r-- | sudoers/sudoers.xslt | 8 |
4 files changed, 37 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> diff --git a/sudoers/sudoers.rng b/sudoers/sudoers.rng index 3526252..3fa8507 100644 --- a/sudoers/sudoers.rng +++ b/sudoers/sudoers.rng @@ -85,6 +85,13 @@ xmlns:pa="http://freeipa.org/xml/rng/ns/plugable_architecture/1.0"> <choice> <!-- flag options --> <element name="always_set_home" a:defaultValue="off"> + <a:documentation> + If set, sudo will set the HOME environment variable to + the home directory of the target user (which is root + unless the -u option is used). This effectively means + that the -H flag is always implied. This flag is off by + default. + </a:documentation> <choice> <value>on</value> <value>off</value> diff --git a/sudoers/sudoers.xslt b/sudoers/sudoers.xslt index 3690f81..7fc4748 100644 --- a/sudoers/sudoers.xslt +++ b/sudoers/sudoers.xslt @@ -2,6 +2,7 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xd="http://www.pnp-software.com/XSLTdoc" xmlns:md="http://freeipa.org/xsl/metadata/1.0" xmlns:sudoers="http://freeipa.org/xml/rng/sudo/1.0"> @@ -33,6 +34,13 @@ <xsl:template match="sudoers:metadata"> </xsl:template> + <xd:doc> + <xd:short>This is the short description with <code>HTML tags</code>.</xd:short> + <xd:detail> + And here comes a <b>more detailed</b> + description showed only in the detailed view of the documentation. + </xd:detail> + </xd:doc> <xsl:template match="sudoers:sudoers"> <xsl:variable name="name"> <xsl:apply-templates select="sudoers:subject"> |