[selinux-policy: 475/3172] add tun and bool descriptions
Daniel J Walsh
dwalsh at fedoraproject.org
Thu Oct 7 19:45:43 UTC 2010
commit 4d7511ba57b8125b58980749e0fac554846ef0b7
Author: Chris PeBenito <cpebenito at tresys.com>
Date: Mon Jul 11 13:49:15 2005 +0000
add tun and bool descriptions
refpolicy/Changelog | 1 +
refpolicy/doc/templates/global_bool_list.html | 7 +++++--
refpolicy/doc/templates/global_tun_list.html | 7 +++++--
refpolicy/support/sedoctool.py | 8 ++++++--
4 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/refpolicy/Changelog b/refpolicy/Changelog
index 513fb34..77cfb61 100644
--- a/refpolicy/Changelog
+++ b/refpolicy/Changelog
@@ -1,3 +1,4 @@
+ * Doc tool now creates pages for global Booleans and global tunables.
* Doc tool now links directly to the interface/template in the
module page when it is selected in the interface/template index.
* Added support for layer summaries.
diff --git a/refpolicy/doc/templates/global_bool_list.html b/refpolicy/doc/templates/global_bool_list.html
index 4272ddd..9a31b2b 100644
--- a/refpolicy/doc/templates/global_bool_list.html
+++ b/refpolicy/doc/templates/global_bool_list.html
@@ -2,7 +2,10 @@
[[for bool in booleans]]
<div id="interfacesmall">
-Name: [[bool['bool_name']]]<p/>
-Default Value: [[bool['def_val']]]<p/>
+<h4>[[bool['bool_name']]]</h4>
+<p>Default Value: [[bool['def_val']]]</p>
+[[if bool['desc']]]
+<p>[[bool['desc']]]</p>
+[[end]]
</div>
[[end]]
diff --git a/refpolicy/doc/templates/global_tun_list.html b/refpolicy/doc/templates/global_tun_list.html
index 9a8c62e..895acfa 100644
--- a/refpolicy/doc/templates/global_tun_list.html
+++ b/refpolicy/doc/templates/global_tun_list.html
@@ -2,7 +2,10 @@
[[for tun in tunables]]
<div id="interfacesmall">
-Name: [[tun['tun_name']]]<p/>
-Default Value: [[tun['def_val']]]<p/>
+<h4>[[tun['tun_name']]]</h4>
+<p>Default Value: [[tun['def_val']]]</p>
+[[if tun['desc']]]
+<p>[[tun['desc']]]</p>
+[[end]]
</div>
[[end]]
diff --git a/refpolicy/support/sedoctool.py b/refpolicy/support/sedoctool.py
index d0d981b..b2a83b5 100755
--- a/refpolicy/support/sedoctool.py
+++ b/refpolicy/support/sedoctool.py
@@ -565,8 +565,10 @@ def gen_docs(doc, working_dir, templatedir):
if tunable.parentNode.nodeName == "policy":
tunable_name = tunable.getAttribute("name")
default_value = tunable.getAttribute("dftval")
+ description = format_html_desc(tunable)
global_tun_buf.append( { "tun_name" : tunable_name,
- "def_val" : default_value } )
+ "def_val" : default_value,
+ "desc" : description } )
global_tun_buf.sort(tun_cmp)
global_tun_tpl = pyplate.Template(tunlistdata)
global_tun_buf = global_tun_tpl.execute_string({"tunables" : global_tun_buf})
@@ -587,8 +589,10 @@ def gen_docs(doc, working_dir, templatedir):
if boolean.parentNode.nodeName == "policy":
bool_name = boolean.getAttribute("name")
default_value = boolean.getAttribute("dftval")
+ description = format_html_desc(boolean)
global_bool_buf.append( { "bool_name" : bool_name,
- "def_val" : default_value } )
+ "def_val" : default_value,
+ "desc" : description } )
global_bool_buf.sort(bool_cmp)
global_bool_tpl = pyplate.Template(boollistdata)
global_bool_buf = global_bool_tpl.execute_string({"booleans" : global_bool_buf})
More information about the scm-commits
mailing list