author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:48:56 +0100 | |
branch | GCC_SURGE |
changeset 45 | 4b03adbd26ca |
parent 18 | 47c74d1534e1 |
parent 34 | 5fae379060a7 |
permissions | -rw-r--r-- |
34
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1 |
/* selinux.h SELinux security check headers for D-BUS |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
2 |
* Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
3 |
* Author: Matthew Rickard <mjricka@epoch.ncsc.mil> |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
4 |
* |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
5 |
* Licensed under the Academic Free License version 2.1 |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
6 |
* |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
7 |
* This program is free software; you can redistribute it and/or modify |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
8 |
* it under the terms of the GNU General Public License as published by |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
9 |
* the Free Software Foundation; either version 2 of the License, or |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
10 |
* (at your option) any later version. |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
11 |
* |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
12 |
* This program is distributed in the hope that it will be useful, |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
15 |
* GNU General Public License for more details. |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
16 |
* |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
18 |
* along with this program; if not, write to the Free Software |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
20 |
* |
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
21 |
*/ |
31 | 22 |
|
23 |
||
24 |
||
25 |
#ifndef BUS_SELINUX_H |
|
26 |
#define BUS_SELINUX_H |
|
27 |
||
28 |
#ifndef __SYMBIAN32__ |
|
29 |
#include <dbus/dbus-hash.h> |
|
30 |
#else |
|
31 |
#include "dbus-hash.h" |
|
32 |
#endif //__SYMBIAN32__ |
|
33 |
#include <dbus/dbus-connection.h> |
|
34 |
#include "services.h" |
|
35 |
||
36 |
dbus_bool_t bus_selinux_pre_init (void); |
|
37 |
dbus_bool_t bus_selinux_full_init(void); |
|
38 |
void bus_selinux_shutdown (void); |
|
39 |
||
40 |
dbus_bool_t bus_selinux_enabled (void); |
|
41 |
||
42 |
void bus_selinux_id_ref (BusSELinuxID *sid); |
|
43 |
void bus_selinux_id_unref (BusSELinuxID *sid); |
|
44 |
||
45 |
DBusHashTable* bus_selinux_id_table_new (void); |
|
46 |
BusSELinuxID* bus_selinux_id_table_lookup (DBusHashTable *service_table, |
|
47 |
const DBusString *service_name); |
|
48 |
dbus_bool_t bus_selinux_id_table_insert (DBusHashTable *service_table, |
|
49 |
const char *service_name, |
|
50 |
const char *service_context); |
|
51 |
void bus_selinux_id_table_print (DBusHashTable *service_table); |
|
52 |
const char* bus_selinux_get_policy_root (void); |
|
53 |
||
54 |
dbus_bool_t bus_selinux_append_context (DBusMessage *message, |
|
55 |
BusSELinuxID *context, |
|
56 |
DBusError *error); |
|
57 |
||
58 |
dbus_bool_t bus_selinux_allows_acquire_service (DBusConnection *connection, |
|
59 |
BusSELinuxID *service_sid, |
|
60 |
const char *service_name, |
|
61 |
DBusError *error); |
|
62 |
||
63 |
dbus_bool_t bus_selinux_allows_send (DBusConnection *sender, |
|
64 |
DBusConnection *proposed_recipient, |
|
65 |
const char *msgtype, /* Supplementary audit data */ |
|
66 |
const char *interface, |
|
67 |
const char *member, |
|
68 |
const char *error_name, |
|
69 |
const char *destination, |
|
70 |
DBusError *error); |
|
71 |
||
72 |
BusSELinuxID* bus_selinux_init_connection_id (DBusConnection *connection, |
|
73 |
DBusError *error); |
|
74 |
||
75 |
||
76 |
||
77 |
#endif /* BUS_SELINUX_H */ |