aboutsummaryrefslogtreecommitdiff
blob: 91ba721f1db48edf1410115cefda67aa52fe7bfb (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
policy_module(hostname, 1.12.0)

########################################
#
# Declarations
#

type hostname_t;
type hostname_exec_t;
init_system_domain(hostname_t, hostname_exec_t)
role system_r types hostname_t;

########################################
#
# Local policy
#

# sys_admin : for setting the hostname
allow hostname_t self:capability sys_admin;
allow hostname_t self:process { sigchld sigkill signal signull sigstop };
allow hostname_t self:unix_stream_socket create_stream_socket_perms;
dontaudit hostname_t self:capability sys_tty_config;

kernel_list_proc(hostname_t)
kernel_read_proc_symlinks(hostname_t)
# for when /usr is not mounted:
kernel_dontaudit_search_unlabeled(hostname_t)

dev_read_sysfs(hostname_t)
# Early devtmpfs, before udev relabel
dev_dontaudit_rw_generic_chr_files(hostname_t)

domain_use_interactive_fds(hostname_t)

files_read_etc_files(hostname_t)
files_dontaudit_search_var(hostname_t)

fs_getattr_xattr_fs(hostname_t)
fs_search_auto_mountpoints(hostname_t)
fs_dontaudit_use_tmpfs_chr_dev(hostname_t)

term_dontaudit_use_console(hostname_t)
term_use_all_ttys(hostname_t)
term_use_all_ptys(hostname_t)

init_use_fds(hostname_t)
init_use_script_fds(hostname_t)
init_use_script_ptys(hostname_t)

logging_send_syslog_msg(hostname_t)

miscfiles_read_localization(hostname_t)

sysnet_dontaudit_rw_dhcpc_udp_sockets(hostname_t)
sysnet_dontaudit_rw_dhcpc_unix_stream_sockets(hostname_t)
sysnet_read_config(hostname_t)
sysnet_dns_name_resolve(hostname_t)

userdom_use_inherited_user_terminals(hostname_t)

optional_policy(`
	nis_use_ypbind(hostname_t)
')

optional_policy(`
	xen_append_log(hostname_t)
	xen_dontaudit_use_fds(hostname_t)
')

optional_policy(`
	unconfined_dontaudit_rw_pipes(hostname_t)
')