|
Chris PeBenito |
32e53ac |
## <summary>Policy for changing the system host name.</summary>
|
|
Chris PeBenito |
15e3d8e |
|
|
Chris PeBenito |
32e53ac |
########################################
|
|
Chris PeBenito |
c429cb5 |
## <summary>
|
|
Chris PeBenito |
414e415 |
## Execute hostname in the hostname domain.
|
|
Chris PeBenito |
c429cb5 |
## </summary>
|
|
Chris PeBenito |
414e415 |
## <param name="domain">
|
|
Chris PeBenito |
414e415 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e415 |
## </param>
|
|
Chris PeBenito |
15e3d8e |
#
|
|
Chris PeBenito |
199895e |
interface(`hostname_domtrans',`
|
|
Chris PeBenito |
139520a |
gen_require(`
|
|
Chris PeBenito |
139520a |
type hostname_t, hostname_exec_t;
|
|
Chris PeBenito |
139520a |
class process sigchld;
|
|
Chris PeBenito |
139520a |
class fd use;
|
|
Chris PeBenito |
139520a |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
139520a |
')
|
|
Chris PeBenito |
0c73cd2 |
|
|
Chris PeBenito |
139520a |
corecmd_search_bin($1)
|
|
Chris PeBenito |
139520a |
domain_auto_trans($1,hostname_exec_t,hostname_t)
|
|
Chris PeBenito |
0c73cd2 |
|
|
Chris PeBenito |
0c73cd2 |
allow $1 hostname_t:fd use;
|
|
Chris PeBenito |
0c73cd2 |
allow hostname_t $1:fd use;
|
|
Chris PeBenito |
0c73cd2 |
allow hostname_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd2 |
allow hostname_t $1:process sigchld;
|
|
Chris PeBenito |
15e3d8e |
')
|
|
Chris PeBenito |
15e3d8e |
|
|
Chris PeBenito |
32e53ac |
########################################
|
|
Chris PeBenito |
c429cb5 |
## <summary>
|
|
Chris PeBenito |
414e415 |
## Execute hostname in the hostname domain, and
|
|
Chris PeBenito |
414e415 |
## allow the specified role the hostname domain.
|
|
Chris PeBenito |
c429cb5 |
## </summary>
|
|
Chris PeBenito |
414e415 |
## <param name="domain">
|
|
Chris PeBenito |
414e415 |
## The type of the process performing this action.
|
|
Chris PeBenito |
414e415 |
## </param>
|
|
Chris PeBenito |
414e415 |
## <param name="role">
|
|
Chris PeBenito |
414e415 |
## The role to be allowed the hostname domain.
|
|
Chris PeBenito |
414e415 |
## </param>
|
|
Chris PeBenito |
414e415 |
## <param name="terminal">
|
|
Chris PeBenito |
414e415 |
## The type of the terminal allow the hostname domain to use.
|
|
Chris PeBenito |
414e415 |
## </param>
|
|
Chris PeBenito |
32e53ac |
#
|
|
Chris PeBenito |
199895e |
interface(`hostname_run',`
|
|
Chris PeBenito |
139520a |
gen_require(`
|
|
Chris PeBenito |
139520a |
type hostname_t;
|
|
Chris PeBenito |
139520a |
class chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
139520a |
')
|
|
Chris PeBenito |
0c73cd2 |
|
|
Chris PeBenito |
c9428d3 |
hostname_domtrans($1)
|
|
Chris PeBenito |
0c73cd2 |
role $2 types hostname_t;
|
|
Chris PeBenito |
0c73cd2 |
allow hostname_t $3:chr_file { getattr read write ioctl };
|
|
Chris PeBenito |
32e53ac |
')
|
|
Chris PeBenito |
32e53ac |
|
|
Chris PeBenito |
3865d6b |
########################################
|
|
Chris PeBenito |
c429cb5 |
## <summary>
|
|
Chris PeBenito |
c429cb5 |
## Execute hostname in the caller domain.
|
|
Chris PeBenito |
c429cb5 |
## </summary>
|
|
Chris PeBenito |
261e0e6 |
## <param name="domain">
|
|
Chris PeBenito |
3865d6b |
## The type of the process performing this action.
|
|
Chris PeBenito |
261e0e6 |
## </param>
|
|
Chris PeBenito |
3865d6b |
#
|
|
Chris PeBenito |
199895e |
interface(`hostname_exec',`
|
|
Chris PeBenito |
139520a |
gen_require(`
|
|
Chris PeBenito |
139520a |
type hostname_exec_t;
|
|
Chris PeBenito |
139520a |
')
|
|
Chris PeBenito |
0c73cd2 |
|
|
Chris PeBenito |
dd82294 |
can_exec($1,hostname_exec_t)
|
|
Chris PeBenito |
15e3d8e |
')
|