summaryrefslogtreecommitdiff
path: root/policychecker
diff options
context:
space:
mode:
authorAdrian Szyndela <adrian.s@samsung.com>2018-08-16 14:40:21 +0200
committerAdrian Szyndela <adrian.s@samsung.com>2018-08-20 11:41:51 +0200
commitee717c82f5b676e1309f7b174466ddd58a877db9 (patch)
tree1afac348f22d75a7f0d6eeaae9ef15c354c23260 /policychecker
parent15ab63956560f4d994d3d22478d8877d98cc46e6 (diff)
downloaddbus-tools-ee717c82f5b676e1309f7b174466ddd58a877db9.tar.gz
dbus-tools-ee717c82f5b676e1309f7b174466ddd58a877db9.tar.bz2
dbus-tools-ee717c82f5b676e1309f7b174466ddd58a877db9.zip
At_console has its own "deprecated" checking rule, so we assume that at_console rules are those to be removed. Thus, there is no point in showing "duplicate" warning for duplicate rules in other contexts. Change-Id: Ifdf7e3745d7ece49772ba3a3aad01a213b657d0c
Diffstat (limited to 'policychecker')
-rw-r--r--policychecker/same.xsl24
1 files changed, 2 insertions, 22 deletions
diff --git a/policychecker/same.xsl b/policychecker/same.xsl
index c90a4d9..c7a3f2c 100644
--- a/policychecker/same.xsl
+++ b/policychecker/same.xsl
@@ -57,41 +57,21 @@
</xsl:if>
</xsl:template>
- <!-- user vs context, at_console -->
+ <!-- user vs context -->
<xsl:template match="//policy[@user]/*">
<!-- we cannot compare with group policies as we don't know which group rules will be applied to the current user (TODO? supply a user->groups mapping )-->
<xsl:call-template name="find-duplicates">
<xsl:with-param name="curr_rule" select="."/>
<xsl:with-param name="other_rules" select="//policy[@context]/*"/>
</xsl:call-template>
- <xsl:call-template name="find-duplicates">
- <xsl:with-param name="curr_rule" select="."/>
- <xsl:with-param name="other_rules" select="//policy[@at_console]/*"/>
- </xsl:call-template>
</xsl:template>
- <!-- group vs context, at_console -->
+ <!-- group vs context -->
<xsl:template match="//policy[@group]/*">
<xsl:call-template name="find-duplicates">
<xsl:with-param name="curr_rule" select="."/>
<xsl:with-param name="other_rules" select="//policy[@context]/*"/>
</xsl:call-template>
- <xsl:call-template name="find-duplicates">
- <xsl:with-param name="curr_rule" select="."/>
- <xsl:with-param name="other_rules" select="//policy[@at_console]/*"/>
- </xsl:call-template>
- </xsl:template>
-
- <!-- at_console='true' vs context, at_console='false' -->
- <xsl:template match="//policy[@at_console='true']/*">
- <xsl:call-template name="find-duplicates">
- <xsl:with-param name="curr_rule" select="."/>
- <xsl:with-param name="other_rules" select="//policy[@context]/*"/>
- </xsl:call-template>
- <xsl:call-template name="find-duplicates">
- <xsl:with-param name="curr_rule" select="."/>
- <xsl:with-param name="other_rules" select="//policy[@at_console='false']/*"/>
- </xsl:call-template>
</xsl:template>
<!-- context='default' vs context='mandatory' -->