]> git.ipfire.org Git - people/stevee/selinux-policy.git/blob - policy/modules/services/lircd.if
trunk: whitespace fixes
[people/stevee/selinux-policy.git] / policy / modules / services / lircd.if
1 ## <summary>Linux infared remote control daemon</summary>
2
3 ########################################
4 ## <summary>
5 ## Execute a domain transition to run lircd.
6 ## </summary>
7 ## <param name="domain">
8 ## <summary>
9 ## Domain allowed to transition.
10 ## </summary>
11 ## </param>
12 #
13 interface(`lircd_domtrans',`
14 gen_require(`
15 type lircd_t, lircd_exec_t;
16 ')
17
18 domain_auto_trans($1, lircd_exec_t, lircd_t)
19
20 ')
21
22 ######################################
23 ## <summary>
24 ## Connect to lircd over a unix domain
25 ## stream socket.
26 ## </summary>
27 ## <param name="domain">
28 ## <summary>
29 ## Domain allowed access.
30 ## </summary>
31 ## </param>
32 #
33 interface(`lircd_stream_connect',`
34 gen_require(`
35 type lircd_sock_t, lircd_t;
36 ')
37
38 allow $1 lircd_t:unix_stream_socket connectto;
39 allow $1 lircd_sock_t:sock_file write_sock_file_perms;
40 files_search_pids($1)
41 ')
42
43 #######################################
44 ## <summary>
45 ## Read lircd etc file
46 ## </summary>
47 ## <param name="domain">
48 ## <summary>
49 ## The type of the process performing this action.
50 ## </summary>
51 ## </param>
52 #
53 interface(`lircd_read_config',`
54 gen_require(`
55 type lircd_etc_t;
56 ')
57
58 read_files_pattern($1, lircd_etc_t, lircd_etc_t)
59 ')
60
61 ########################################
62 ## <summary>
63 ## All of the rules required to administrate
64 ## a lircd environment
65 ## </summary>
66 ## <param name="domain">
67 ## <summary>
68 ## Domain allowed access.
69 ## </summary>
70 ## </param>
71 ## <param name="role">
72 ## <summary>
73 ## The role to be allowed to manage the syslog domain.
74 ## </summary>
75 ## </param>
76 ## <rolecap/>
77 #
78 interface(`lircd_admin',`
79 gen_require(`
80 type lircd_t, lircd_var_run_t, lircd_sock_t;
81 type lircd_initrc_exec_t, lircd_etc_t;
82 ')
83
84 allow $1 lircd_t:process { ptrace signal_perms };
85 ps_process_pattern($1, lircd_t)
86
87 init_labeled_script_domtrans($1, lircd_initrc_exec_t)
88 domain_system_change_exemption($1)
89 role_transition $2 lircd_initrc_exec_t system_r;
90 allow $2 system_r;
91
92 files_search_etc($1)
93 admin_pattern($1, lircd_etc_t)
94
95 files_search_pids($1)
96 admin_pattern($1, lircd_var_run_t)
97
98 admin_pattern($1, lircd_sock_t)
99 ')