This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hos-userdom.if
150 lines (150 loc) · 4.65 KB
/
hos-userdom.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
####################################################
# USERDOM
####################################################
#---------------------------------------------------
interface(`hos_userdom_list_user_home_dirs',`
gen_require(`
type user_home_dir_t;
')
files_search_home($1)
hos_list_dir_perms($1, user_home_dir_t)
')
#---------------------------------------------------
interface(`hos_userdom_manage_tmp_dirs',`
gen_require(`
type user_tmp_t;
')
hos_manage_dirs_pattern($1, user_tmp_t, user_tmp_t)
')
#---------------------------------------------------
interface(`hos_userdom_manage_tmp_files',`
gen_require(`
type user_tmp_t;
')
hos_manage_files_pattern($1, user_tmp_t, user_tmp_t)
')
#---------------------------------------------------
interface(`hos_userdom_manage_tmp_sockets',`
gen_require(`
type user_tmp_t;
')
hos_manage_sock_files_pattern($1, user_tmp_t, user_tmp_t)
')
#---------------------------------------------------
interface(`hos_userdom_manage_tmpfs_files',`
gen_require(`
type user_tmpfs_t;
')
hos_manage_files_pattern($1, user_tmpfs_t, user_tmpfs_t)
')
#---------------------------------------------------
interface(`hos_userdom_read_all_users_state',`
gen_require(`
attribute userdomain;
')
hos_read_files_pattern($1, userdomain, userdomain)
kernel_search_proc($1)
read_lnk_files_pattern($1,userdomain,userdomain)
')
#---------------------------------------------------
interface(`hos_userdom_rw_stream',`
gen_require(`
attribute userdomain;
')
hos_rw_socket_perms($1, userdomain, unix_stream_socket)
')
#---------------------------------------------------
interface(`hos_userdom_tmpfs_filetrans',`
gen_require(`
type user_tmpfs_t;
')
hos_fs_tmpfs_filetrans($1, user_tmpfs_t, $2, $3)
')
#---------------------------------------------------
interface(`hos_userdom_manage_user_home_content_dirs',`
gen_require(`
type user_home_dir_t, user_home_t;
')
files_search_home($1)
hos_manage_dirs_pattern($1, user_home_dir_t, user_home_t)
hos_manage_dirs_pattern($1, user_home_t, user_home_t)
')
#---------------------------------------------------
interface(`hos_userdom_manage_user_home_content_files',`
gen_require(`
type user_home_dir_t, user_home_t;
')
files_search_home($1)
hos_manage_files_pattern($1, user_home_t, user_home_t)
allow $1 user_home_dir_t:dir { search_dir_perms };
allow $1 user_home_t:file { map };
')
#---------------------------------------------------
interface(`hos_userdom_manage_user_tmp_chr_files',`
gen_require(`
type user_tmp_t;
')
hos_manage_chr_files_pattern($1, user_tmp_t, user_tmp_t)
')
#---------------------------------------------------
interface(`hos_userdom_manage_user_tmp_pipes',`
gen_require(`
type user_tmp_t;
')
hos_manage_fifo_files_pattern($1, user_tmp_t, user_tmp_t)
')
#---------------------------------------------------
interface(`hos_userdom_manage_user_tmp_symlinks',`
gen_require(`
type user_tmp_t;
')
hos_manage_lnk_files_pattern($1, user_tmp_t, user_tmp_t)
')
#---------------------------------------------------
interface(`hos_userdom_read_home_audio_files',`
gen_require(`
type audio_home_t;
')
hos_list_dir_perms($1, audio_home_t)
hos_read_files_pattern($1, audio_home_t, audio_home_t)
userdom_search_user_home_dirs($1)
read_lnk_files_pattern($1, audio_home_t, audio_home_t)
')
#---------------------------------------------------
interface(`hos_userdom_use_inherited_user_ptys',`
gen_require(`
type user_devpts_t;
')
hos_rw_inherited_term_perms($1, user_devpts_t, chr_file)
')
#---------------------------------------------------
interface(`hos_userdom_use_inherited_user_ttys',`
gen_require(`
type user_tty_device_t;
')
hos_rw_inherited_term_perms($1, user_tty_device_t, chr_file)
')
#---------------------------------------------------
interface(`hos_userdom_user_home_dir_filetrans',`
gen_require(`
type user_home_dir_t;
')
files_search_home($1)
hos_filetrans_pattern($1, user_home_dir_t, $2, $3, $4)
')
#---------------------------------------------------
interface(`hos_userdom_user_tmp_filetrans',`
gen_require(`
type user_tmp_t;
')
hos_filetrans_pattern($1, user_tmp_t, $2, $3, $4)
files_search_tmp($1)
')
#---------------------------------------------------
interface(`hos_userdom_write_user_tmp_files',`
gen_require(`
type user_tmp_t;
')
hos_read_files_pattern($1, user_tmp_t, user_tmp_t)
allow $1 user_tmp_t:file { append write };
')