Add IgnoreOnIsolate=yes to dbus.service
[platform/upstream/dbus.git] / bus / apparmor.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2  * apparmor.c  AppArmor security checks for D-Bus
3  *
4  * Authors: John Johansen <john.johansen@canonical.com>
5  *          Tyler Hicks <tyhicks@canonical.com>
6  * Based on: selinux.h by Matthew Rickard
7  *
8  * Licensed under the Academic Free License version 2.1
9  *
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.
14  *
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.
19  *
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
23  *
24  */
25
26 #ifndef BUS_APPARMOR_H
27 #define BUS_APPARMOR_H
28
29 #include <dbus/dbus.h>
30 #include "bus.h"
31
32 dbus_bool_t bus_apparmor_pre_init (void);
33 dbus_bool_t bus_apparmor_set_mode_from_config (const char *mode,
34                                                DBusError *error);
35 dbus_bool_t bus_apparmor_full_init (DBusError *error);
36 void bus_apparmor_shutdown (void);
37 dbus_bool_t bus_apparmor_enabled (void);
38
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,
42                                                                   DBusError      *error);
43
44 dbus_bool_t bus_apparmor_allows_acquire_service (DBusConnection *connection,
45                                                  const char     *bustype,
46                                                  const char     *service_name,
47                                                  DBusError      *error);
48 dbus_bool_t bus_apparmor_allows_send (DBusConnection     *sender,
49                                       DBusConnection     *proposed_recipient,
50                                       dbus_bool_t         requested_reply,
51                                       const char         *bustype,
52                                       int                 msgtype,
53                                       const char         *path,
54                                       const char         *interface,
55                                       const char         *member,
56                                       const char         *error_name,
57                                       const char         *destination,
58                                       const char         *source,
59                                       BusActivationEntry *activation_entry,
60                                       DBusError          *error);
61
62 dbus_bool_t bus_apparmor_allows_eavesdropping (DBusConnection     *connection,
63                                                const char         *bustype,
64                                                DBusError          *error);
65
66 #endif /* BUS_APPARMOR_H */