|
Chris PeBenito |
32e53a |
## <summary>Policy for changing the system host name.</summary>
|
|
Chris PeBenito |
15e3d8 |
|
|
Chris PeBenito |
32e53a |
########################################
|
|
Chris PeBenito |
414e41 |
## <desc>
|
|
Chris PeBenito |
414e41 |
## Execute hostname in the hostname domain.
|
|
Chris PeBenito |
414e41 |
## </desc>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## Has a sigchld signal backchannel.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
15e3d8 |
#
|
|
Chris PeBenito |
199895 |
interface(`hostname_domtrans',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hostname_t, hostname_exec_t;
|
|
Chris PeBenito |
139520 |
class process sigchld;
|
|
Chris PeBenito |
139520 |
class fd use;
|
|
Chris PeBenito |
139520 |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
139520 |
corecmd_search_bin($1)
|
|
Chris PeBenito |
139520 |
domain_auto_trans($1,hostname_exec_t,hostname_t)
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 hostname_t:fd use;
|
|
Chris PeBenito |
0c73cd |
allow hostname_t $1:fd use;
|
|
Chris PeBenito |
0c73cd |
allow hostname_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
allow hostname_t $1:process sigchld;
|
|
Chris PeBenito |
15e3d8 |
')
|
|
Chris PeBenito |
15e3d8 |
|
|
Chris PeBenito |
32e53a |
########################################
|
|
Chris PeBenito |
414e41 |
## <desc>
|
|
Chris PeBenito |
414e41 |
## Execute hostname in the hostname domain, and
|
|
Chris PeBenito |
414e41 |
## allow the specified role the hostname domain.
|
|
Chris PeBenito |
414e41 |
## Has a sigchld signal backchannel.
|
|
Chris PeBenito |
414e41 |
## </desc>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
414e41 |
## The role to be allowed the hostname domain.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the hostname domain to use.
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
32e53a |
#
|
|
Chris PeBenito |
199895 |
interface(`hostname_run',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hostname_t;
|
|
Chris PeBenito |
139520 |
class chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
hostname_domtrans($1)
|
|
Chris PeBenito |
0c73cd |
role $2 types hostname_t;
|
|
Chris PeBenito |
0c73cd |
allow hostname_t $3:chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
32e53a |
')
|
|
Chris PeBenito |
32e53a |
|
|
Chris PeBenito |
3865d6 |
########################################
|
|
Chris PeBenito |
261e0e |
## <desc>
|
|
Chris PeBenito |
3865d6 |
## Execute hostname in the hostname domain, and
|
|
Chris PeBenito |
3865d6 |
## Has a sigchld signal backchannel.
|
|
Chris PeBenito |
261e0e |
## </desc>
|
|
Chris PeBenito |
261e0e |
## <param name="domain">
|
|
Chris PeBenito |
3865d6 |
## The type of the process performing this action.
|
|
Chris PeBenito |
261e0e |
## </param>
|
|
Chris PeBenito |
3865d6 |
#
|
|
Chris PeBenito |
199895 |
interface(`hostname_exec',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type hostname_exec_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
dd8229 |
can_exec($1,hostname_exec_t)
|
|
Chris PeBenito |
15e3d8 |
')
|
|
Chris PeBenito |
32e53a |
|