-
Notifications
You must be signed in to change notification settings - Fork 0
/
oracle.if
190 lines (168 loc) · 4.07 KB
/
oracle.if
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
## <summary>policy for oracle</summary>
########################################
## <summary>
## Transition to execute oracle_exec_t in the oracle domain.
## </summary>
## <param name="role">
## <summary>
## Role allowed to transition into oracle domain
## </summary>
## </param>
## <param name="type">
## <summary>
## Type allowed to transition into oracle domain
## </summary>
## </param>
#
interface(`oracle_exec_roletrans_from',`
gen_require(`
role oracle_r;
type oracle_t, oracle_exec_t;
')
allow $1 oracle_r;
role_transition $1 oracle_exec_t oracle_r;
domtrans_pattern($2, oracle_exec_t, oracle_t)
')
## <summary>policy for oracle</summary>
########################################
## <summary>
## Transition to execute oracle_lsnr_exec_t in the oracle_lsnr domain.
## </summary>
## <param name="role">
## <summary>
## Role allowed to transition into oracle listener domain
## </summary>
## </param>
## <param name="type">
## <summary>
## Type allowed to transition into oracle listener domain
## </summary>
## </param>
#
interface(`oracle_lsnr_exec_roletrans_from',`
gen_require(`
role oracle_lsnr_r;
type oracle_lsnr_t, oracle_lsnr_exec_t;
')
allow $1 oracle_lsnr_r;
role_transition $1 oracle_lsnr_exec_t oracle_lsnr_r;
domtrans_pattern($2, oracle_lsnr_exec_t, oracle_lsnr_t)
')
########################################
## <summary>
## Execute oracle_exec_t in the oracle domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`oracle_domtrans',`
gen_require(`
type oracle_t, oracle_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, oracle_exec_t, oracle_t)
')
######################################
## <summary>
## Execute oracle in the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`oracle_exec',`
gen_require(`
type oracle_exec_t;
')
corecmd_search_bin($1)
can_exec($1, oracle_exec_t)
')
######################################
## <summary>
## Allow oracle to list process of the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Oracle can list process of domain
## </summary>
## </param>
#
interface(`oracle_list_proc',`
gen_require(`
type oracle_t;
')
ps_process_pattern(oracle_t, $1)
')
######################################
## <summary>
## Allow oracle listener to list process of the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Oracle listener can list process of domain
## </summary>
## </param>
#
interface(`oracle_lsnr_list_proc',`
gen_require(`
type oracle_lsnr_t;
')
ps_process_pattern(oracle_lsnr_t, $1)
')
######################################
## <summary>
## Allow domain to use oracle libraries
## </summary>
## <param name="domain">
## <summary>
## Domain permitted to exec libraries
## </summary>
## </param>
#
interface(`oracle_use_libs',`
gen_require(`
type oracle_lib_t;
')
allow $1 oracle_lib_t:file execmod;
list_dirs_pattern($1, oracle_lib_t, oracle_lib_t)
read_files_pattern($1, oracle_lib_t, oracle_lib_t)
read_lnk_files_pattern($1, oracle_lib_t, oracle_lib_t)
mmap_exec_files_pattern($1, oracle_lib_t, oracle_lib_t)
')
########################################
## <summary>
## Connect to oracle unix stream socket.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`oracle_noatsecure',`
gen_require(`
type oracle_t, oracle_lsnr_t;
')
allow $1 { oracle_t oracle_lsnr_t }:process { noatsecure rlimitinh siginh };
')
########################################
## <summary>
## Allow domain to execute oracle process transitions even if the filesystem is marked nosuid
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`oracle_nosuid_transition',`
gen_require(`
type oracle_t, oracle_lsnr_t;
')
allow $1 { oracle_t oracle_lsnr_t }:process2 nosuid_transition;
')