From c11958bd0f239e42a0bdc835f3b734521e35bc1d Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Fri, 8 Jul 2005 14:22:17 +0000 Subject: [PATCH] support for global booleans --- refpolicy/doc/policy.dtd | 6 +++++- refpolicy/support/segenxml.py | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/refpolicy/doc/policy.dtd b/refpolicy/doc/policy.dtd index b415fd4b..4cffe9f3 100644 --- a/refpolicy/doc/policy.dtd +++ b/refpolicy/doc/policy.dtd @@ -1,6 +1,6 @@ - + @@ -14,6 +14,10 @@ + + diff --git a/refpolicy/support/segenxml.py b/refpolicy/support/segenxml.py index 407dae6a..7222249e 100755 --- a/refpolicy/support/segenxml.py +++ b/refpolicy/support/segenxml.py @@ -279,20 +279,22 @@ def getTunableXML(file_name): # Get the parameters of a TUNABLE style line. params = getParams(line,TUNABLE) + tag = "tunable" # If the line is not a TUNABLE style declaration, try BOOLEAN. if not params: params = getParams(line,BOOLEAN) + tag = "boolean" # If the line is one of the two styles above, add a tunable tag # and give it the data from the temprorary buffer. if params: tunable_buf.append\ - ("\n" - % (params[0], params[1])) + ("<%s name=\"%s\" dftval=\"%s\">\n" + % (tag, params[0], params[1])) tunable_buf += temp_buf temp_buf = [] - tunable_buf.append("\n") + tunable_buf.append("\n" % tag) # If there are XML comments at the end of the file, they arn't # attributed to anything. These are ignored.