1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 * apparmor.c AppArmor security checks for D-Bus
4 * Authors: John Johansen <john.johansen@canonical.com>
5 * Tyler Hicks <tyhicks@canonical.com>
6 * Based on: selinux.h by Matthew Rickard
8 * Licensed under the Academic Free License version 2.1
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 #ifndef BUS_APPARMOR_H
27 #define BUS_APPARMOR_H
29 #include <dbus/dbus.h>
32 dbus_bool_t bus_apparmor_pre_init (void);
33 dbus_bool_t bus_apparmor_set_mode_from_config (const char *mode,
35 dbus_bool_t bus_apparmor_full_init (DBusError *error);
36 void bus_apparmor_shutdown (void);
37 dbus_bool_t bus_apparmor_enabled (void);
39 void bus_apparmor_confinement_unref (BusAppArmorConfinement *confinement);
40 void bus_apparmor_confinement_ref (BusAppArmorConfinement *confinement);
41 BusAppArmorConfinement* bus_apparmor_init_connection_confinement (DBusConnection *connection,
44 dbus_bool_t bus_apparmor_allows_acquire_service (DBusConnection *connection,
46 const char *service_name,
48 dbus_bool_t bus_apparmor_allows_send (DBusConnection *sender,
49 DBusConnection *proposed_recipient,
50 dbus_bool_t requested_reply,
54 const char *interface,
56 const char *error_name,
57 const char *destination,
59 BusActivationEntry *activation_entry,
62 dbus_bool_t bus_apparmor_allows_eavesdropping (DBusConnection *connection,
66 #endif /* BUS_APPARMOR_H */