summaryrefslogtreecommitdiffstats
path: root/sudoers
diff options
context:
space:
mode:
authorSumit Bose <sbose@nb.localdomain>2008-10-20 11:14:54 +0200
committerSumit Bose <sbose@nb.localdomain>2008-10-20 11:14:54 +0200
commit98824689e3f11cac83e9ee785ecd76616490d21c (patch)
tree68cc9207523a5e5e361f42edc4f4251e7be6f543 /sudoers
parentbc009a849c81888f45f123f3bea473df8fd494f6 (diff)
downloadipa_policy-98824689e3f11cac83e9ee785ecd76616490d21c.tar.gz
ipa_policy-98824689e3f11cac83e9ee785ecd76616490d21c.tar.xz
ipa_policy-98824689e3f11cac83e9ee785ecd76616490d21c.zip
added ipaaction example
Diffstat (limited to 'sudoers')
-rw-r--r--sudoers/policy_metadata.rng7
-rw-r--r--sudoers/sudoers.rng5
-rw-r--r--sudoers/sudoers.xslt6
-rw-r--r--sudoers/sudoers_example_policy.xml3
4 files changed, 15 insertions, 6 deletions
diff --git a/sudoers/policy_metadata.rng b/sudoers/policy_metadata.rng
index ca5ac19..404d64d 100644
--- a/sudoers/policy_metadata.rng
+++ b/sudoers/policy_metadata.rng
@@ -8,7 +8,7 @@ xmlns:pa="http://freeipa.org/xml/rng/ns/plugable_architecture/1.0">
<define name="policy_metadata">
<element name="metadata">
- <a:doc>The metadata information should be generic for all policies. The RelaxNG schema can be found in a separate file (this file :) and can be included by the schema file of a specific policy with the externalRef pattern. With this separation the policy and the metadata schema can be modified independently and the metadata schema can be used by the UI to render a separate page for the metadata of a policy.</a:doc>
+ <a:doc>The metadata information should be generic for all policies. The RelaxNG schema can be found in a separate file (this file :) and can be included by the schema file of a specific policy with the include pattern. With this separation the policy and the metadata schema can be modified independently and the metadata schema can be used by the UI to render a separate page for the metadata of a policy.</a:doc>
<element name="name">
<text/>
@@ -34,6 +34,11 @@ xmlns:pa="http://freeipa.org/xml/rng/ns/plugable_architecture/1.0">
<ref name="xslt_filename"/>
</element>
+ <element name="app" pa:label="Name of the application">
+ <a:doc>should be added automatically from RelaxNG metadata</a:doc>
+ <ref name="application_name"/>
+ </element>
+
<optional>
<element name="mergeStrategyXML" pa:label="Howto merge with other policies">
<choice>
diff --git a/sudoers/sudoers.rng b/sudoers/sudoers.rng
index d916e2d..3526252 100644
--- a/sudoers/sudoers.rng
+++ b/sudoers/sudoers.rng
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<grammar ns="http://freeipa.org/xml/rng/sudo/sudoers/1.0"
+<grammar ns="http://freeipa.org/xml/rng/sudo/1.0"
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
@@ -16,9 +16,10 @@ xmlns:pa="http://freeipa.org/xml/rng/ns/plugable_architecture/1.0">
<define name="rng_filename"><value>sudoers.rng</value></define>
<define name="xslt_filename"><value>sudoers.xslt</value></define>
+ <define name="application_name"><value>sudo</value></define>
<include href="policy_metadata.rng"/>
- <start ns="http://freeipa.org/xml/rng/sudo/sudoers/1.0">
+ <start ns="http://freeipa.org/xml/rng/sudo/1.0">
<element name="ipa">
<a:documentation>Doc test.</a:documentation>
diff --git a/sudoers/sudoers.xslt b/sudoers/sudoers.xslt
index f767335..3690f81 100644
--- a/sudoers/sudoers.xslt
+++ b/sudoers/sudoers.xslt
@@ -3,9 +3,11 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:md="http://freeipa.org/xsl/metadata/1.0"
- xmlns:sudoers="http://freeipa.org/xml/rng/sudo/sudoers/1.0">
+ xmlns:sudoers="http://freeipa.org/xml/rng/sudo/1.0">
- <md:output_file name="/etc/sudoers" owner="root" group="root" permission="440"/>
+ <md:output_handler>
+ <file name="/etc/sudoers" owner="root" group="root" permission="440"/>
+ </md:output_handler>
<xsl:output method="text" indent="no"/>
<xsl:strip-space elements="*"/>
diff --git a/sudoers/sudoers_example_policy.xml b/sudoers/sudoers_example_policy.xml
index 10d097a..1323ff1 100644
--- a/sudoers/sudoers_example_policy.xml
+++ b/sudoers/sudoers_example_policy.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<ipa xmlns="http://freeipa.org/xml/rng/sudo/sudoers/1.0">
+<ipa xmlns="http://freeipa.org/xml/rng/sudo/1.0">
<metadata>
<name>simple sudoers example, allowing mount/umount of a CD-ROM</name>
<author>sbose@redhat.com</author>
<version>0.7071</version>
<RNGfile>sudoers.rng</RNGfile>
<XSLTfile>sudoers.xslt</XSLTfile>
+ <app>sudo</app>
</metadata>
<ipaconfig>