]> git.ipfire.org Git - people/stevee/selinux-policy.git/blame - refpolicy/policy/modules/services/ntop.te
add ddclient, bug 1523
[people/stevee/selinux-policy.git] / refpolicy / policy / modules / services / ntop.te
CommitLineData
e3e37e85
CP
1
2policy_module(ntop,1.0.0)
3
4########################################
5#
6# Declarations
7#
8
9type ntop_t;
10type ntop_exec_t;
11init_daemon_domain(ntop_t,ntop_exec_t)
12
13type ntop_etc_t;
14files_config_file(ntop_etc_t)
15
16type ntop_http_content_t;
17files_type(ntop_http_content_t)
18
19type ntop_tmp_t;
20files_tmp_file(ntop_tmp_t)
21
22type ntop_var_lib_t;
23files_type(ntop_var_lib_t)
24
25type ntop_var_run_t;
26files_pid_file(ntop_var_run_t)
27
28########################################
29#
30# Local Policy
31#
32
33allow ntop_t self:capability { net_raw setgid setuid sys_admin net_admin };
34dontaudit ntop_t self:capability sys_tty_config;
35allow ntop_t self:process signal_perms;
36allow ntop_t self:fifo_file { read write };
37allow ntop_t self:tcp_socket create_stream_socket_perms;
38allow ntop_t self:udp_socket create_socket_perms;
39allow ntop_t self:packet_socket create_socket_perms;
40
41allow ntop_t ntop_etc_t:file r_file_perms;
42allow ntop_t ntop_etc_t:dir r_dir_perms;
43allow ntop_t ntop_etc_t:lnk_file { getattr read };
44
45allow ntop_t ntop_http_content_t:file r_file_perms;
46allow ntop_t ntop_http_content_t:dir r_dir_perms;
47
48allow ntop_t ntop_tmp_t:dir create_dir_perms;
49allow ntop_t ntop_tmp_t:file create_file_perms;
50files_tmp_filetrans(ntop_t, ntop_tmp_t, { file dir })
51
52allow ntop_t ntop_var_lib_t:file create_file_perms;
53allow ntop_t ntop_var_lib_t:dir { create rw_dir_perms };
54files_var_lib_filetrans(ntop_t,ntop_var_lib_t,file)
55
56allow ntop_t ntop_var_run_t:file manage_file_perms;
57allow ntop_t ntop_var_run_t:dir rw_dir_perms;
58files_pid_filetrans(ntop_t,ntop_var_run_t,file)
59
60kernel_read_network_state(ntop_t)
61kernel_read_kernel_sysctls(ntop_t)
62kernel_list_proc(ntop_t)
63kernel_read_proc_symlinks(ntop_t)
64
65corenet_tcp_sendrecv_generic_if(ntop_t)
66corenet_udp_sendrecv_generic_if(ntop_t)
67corenet_raw_sendrecv_generic_if(ntop_t)
68corenet_tcp_sendrecv_all_nodes(ntop_t)
69corenet_udp_sendrecv_all_nodes(ntop_t)
70corenet_raw_sendrecv_all_nodes(ntop_t)
71corenet_tcp_sendrecv_all_ports(ntop_t)
72corenet_udp_sendrecv_all_ports(ntop_t)
73corenet_non_ipsec_sendrecv(ntop_t)
74corenet_tcp_bind_all_nodes(ntop_t)
75corenet_udp_bind_all_nodes(ntop_t)
76
77dev_read_sysfs(ntop_t)
78
79domain_use_interactive_fds(ntop_t)
80
81files_read_etc_files(ntop_t)
82
83fs_getattr_all_fs(ntop_t)
84fs_search_auto_mountpoints(ntop_t)
85
86term_dontaudit_use_console(ntop_t)
87
88init_use_fds(ntop_t)
89init_use_script_ptys(ntop_t)
90
91libs_use_ld_so(ntop_t)
92libs_use_shared_libs(ntop_t)
93
94logging_send_syslog_msg(ntop_t)
95
96miscfiles_read_localization(ntop_t)
97
98sysnet_read_config(ntop_t)
99
100userdom_dontaudit_use_unpriv_user_fds(ntop_t)
101userdom_dontaudit_search_sysadm_home_dirs(ntop_t)
102
103ifdef(`targeted_policy',`
104 term_dontaudit_use_unallocated_ttys(ntop_t)
105 term_dontaudit_use_generic_ptys(ntop_t)
106 files_dontaudit_read_root_files(ntop_t)
107')
108
109optional_policy(`
110 seutil_sigchld_newrole(ntop_t)
111')
112
113optional_policy(`
114 udev_read_db(ntop_t)
115')