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/apparmor.h | |
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/apparmor.h')
-rw-r--r-- | bus/apparmor.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bus/apparmor.h b/bus/apparmor.h new file mode 100644 index 00000000..0d6f2746 --- /dev/null +++ b/bus/apparmor.h @@ -0,0 +1,34 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- + * apparmor.c AppArmor security checks for D-Bus + * + * Authors: John Johansen <john.johansen@canonical.com> + * Tyler Hicks <tyhicks@canonical.com> + * Based on: selinux.h by Matthew Rickard + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef BUS_APPARMOR_H +#define BUS_APPARMOR_H + +#include <dbus/dbus.h> + +dbus_bool_t bus_apparmor_set_mode_from_config (const char *mode, + DBusError *error); + +#endif /* BUS_APPARMOR_H */ |