diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2014-02-10 19:02:04 -0600 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-02-18 17:04:00 +0000 |
commit | 06033cb20fb6b33fc26c2ef3f5bec1bf75596e34 (patch) | |
tree | 548ba7b8c62f81ab3663e6753fa1fcd073a15dba /bus/config-parser-common.c | |
parent | f62bff5bca2c187262a550f6f0a0c2a662adaaf6 (diff) | |
download | dbus-06033cb20fb6b33fc26c2ef3f5bec1bf75596e34.tar.gz |
Add apparmor element support to bus config parsing
The <apparmor> element can contain a single mode attribute that has one
of three values:
"enabled"
"disabled"
"required"
"enabled" means that kernel support is autodetected and, if available,
AppArmor mediation occurs in dbus-daemon. If kernel support is not
detected, mediation is disabled. "disabled" means that mediation does
not occur. "required" means that kernel support must be detected for
dbus-daemon to start.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'bus/config-parser-common.c')
-rw-r--r-- | bus/config-parser-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bus/config-parser-common.c b/bus/config-parser-common.c index c522ff49..5db6b289 100644 --- a/bus/config-parser-common.c +++ b/bus/config-parser-common.c @@ -127,6 +127,10 @@ bus_config_parser_element_name_to_type (const char *name) { return ELEMENT_ALLOW_ANONYMOUS; } + else if (strcmp (name, "apparmor") == 0) + { + return ELEMENT_APPARMOR; + } return ELEMENT_NONE; } @@ -181,6 +185,8 @@ bus_config_parser_element_type_to_name (ElementType type) return "keep_umask"; case ELEMENT_ALLOW_ANONYMOUS: return "allow_anonymous"; + case ELEMENT_APPARMOR: + return "apparmor"; } _dbus_assert_not_reached ("bad element type"); |