blob: 6723697eec3c834e81ccef48d8fec54f5c948eda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
## <summary>D-Bus service providing high-level OBEX client and server side functionality.</summary>
#######################################
## <summary>
## The role template for obex.
## </summary>
## <param name="role_prefix">
## <summary>
## The prefix of the user domain (e.g., user
## is the prefix for user_t).
## </summary>
## </param>
## <param name="user_role">
## <summary>
## The role associated with the user domain.
## </summary>
## </param>
## <param name="user_domain">
## <summary>
## The type of the user domain.
## </summary>
## </param>
#
template(`obex_role_template',`
gen_require(`
attribute_role obex_roles;
type obex_t, obex_exec_t;
')
########################################
#
# Declarations
#
roleattribute $2 obex_roles;
########################################
#
# Policy
#
allow $3 obex_t:process { ptrace signal_perms };
ps_process_pattern($3, obex_t)
dbus_spec_session_domain($1, obex_t, obex_exec_t)
obex_dbus_chat($3)
')
########################################
## <summary>
## Execute obex in the obex domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`obex_domtrans',`
gen_require(`
type obex_t, obex_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, obex_exec_t, obex_t)
')
########################################
## <summary>
## Send and receive messages from
## obex over dbus.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`obex_dbus_chat',`
gen_require(`
type obex_t;
class dbus send_msg;
')
allow $1 obex_t:dbus send_msg;
allow obex_t $1:dbus send_msg;
')
|