1<?xml version="1.0"?>
2
3<!--
4 This script copies the original system.conf from the dbus
5 distribution, but sets paths from $serviceDirectories parameter
6 and suid helper from $suidHelper parameter.
7-->
8
9<xsl:stylesheet version="1.0"
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 xmlns:str="http://exslt.org/strings"
12 extension-element-prefixes="str"
13 >
14
15 <xsl:output method='xml' encoding="UTF-8" doctype-system="busconfig.dtd" />
16
17 <xsl:param name="serviceDirectories" />
18 <xsl:param name="suidHelper" />
19 <xsl:param name="apparmor" />
20
21 <xsl:template match="/busconfig">
22 <busconfig>
23 <xsl:copy-of select="child::node()[name() != 'include' and name() != 'standard_system_servicedirs' and name() != 'servicehelper' and name() != 'servicedir' and name() != 'includedir']" />
24
25 <!-- configure AppArmor -->
26 <apparmor mode="{$apparmor}"/>
27
28 <!-- set suid helper -->
29 <servicehelper><xsl:value-of select="$suidHelper" /></servicehelper>
30
31 <xsl:for-each select="str:tokenize($serviceDirectories)">
32 <servicedir><xsl:value-of select="." />/share/dbus-1/system-services</servicedir>
33 <includedir><xsl:value-of select="." />/etc/dbus-1/system.d</includedir>
34 <includedir><xsl:value-of select="." />/share/dbus-1/system.d</includedir>
35 </xsl:for-each>
36 </busconfig>
37 </xsl:template>
38
39</xsl:stylesheet>