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
|
policy_module(sanlock, 1.0.1)
########################################
#
# Declarations
#
## <desc>
## <p>
## Allow confined virtual guests to manage nfs files
## </p>
## </desc>
gen_tunable(sanlock_use_nfs, false)
## <desc>
## <p>
## Allow confined virtual guests to manage cifs files
## </p>
## </desc>
gen_tunable(sanlock_use_samba, false)
type sanlock_t;
type sanlock_exec_t;
init_daemon_domain(sanlock_t, sanlock_exec_t)
type sanlock_var_run_t;
files_pid_file(sanlock_var_run_t)
type sanlock_log_t;
logging_log_file(sanlock_log_t)
type sanlock_initrc_exec_t;
init_script_file(sanlock_initrc_exec_t)
ifdef(`enable_mcs',`
init_ranged_daemon_domain(sanlock_t, sanlock_exec_t, s0 - mcs_systemhigh)
')
ifdef(`enable_mls',`
init_ranged_daemon_domain(sanlock_t, sanlock_exec_t, s0 - mls_systemhigh)
')
########################################
#
# sanlock local policy
#
allow sanlock_t self:capability { chown dac_override ipc_lock kill setgid setuid sys_nice sys_resource };
allow sanlock_t self:process { setsched signull };
allow sanlock_t self:fifo_file rw_fifo_file_perms;
allow sanlock_t self:unix_stream_socket create_stream_socket_perms;
manage_files_pattern(sanlock_t, sanlock_log_t, sanlock_log_t)
logging_log_filetrans(sanlock_t, sanlock_log_t, file)
manage_dirs_pattern(sanlock_t, sanlock_var_run_t, sanlock_var_run_t)
manage_files_pattern(sanlock_t, sanlock_var_run_t, sanlock_var_run_t)
manage_sock_files_pattern(sanlock_t, sanlock_var_run_t, sanlock_var_run_t)
files_pid_filetrans(sanlock_t, sanlock_var_run_t, { file dir sock_file })
kernel_read_system_state(sanlock_t)
domain_use_interactive_fds(sanlock_t)
files_read_etc_files(sanlock_t)
storage_raw_rw_fixed_disk(sanlock_t)
dev_read_urand(sanlock_t)
init_read_utmp(sanlock_t)
init_dontaudit_write_utmp(sanlock_t)
logging_send_syslog_msg(sanlock_t)
miscfiles_read_localization(sanlock_t)
tunable_policy(`sanlock_use_nfs',`
fs_manage_nfs_dirs(sanlock_t)
fs_manage_nfs_files(sanlock_t)
fs_manage_nfs_named_sockets(sanlock_t)
fs_read_nfs_symlinks(sanlock_t)
')
tunable_policy(`sanlock_use_samba',`
fs_manage_cifs_dirs(sanlock_t)
fs_manage_cifs_files(sanlock_t)
fs_manage_cifs_named_sockets(sanlock_t)
fs_read_cifs_symlinks(sanlock_t)
')
optional_policy(`
virt_manage_lib_files(sanlock_t)
')
|