selinux-policy/refpolicy/policy/modules/system/hostname.if
2005-06-17 17:59:26 +00:00

81 lines
2.0 KiB
Plaintext

## <module name="hostname" layer="system">
## <summary>Policy for changing the system host name.</summary>
########################################
## <interface name="hostname_domtrans">
## <description>
## Execute hostname in the hostname domain.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## Has a sigchld signal backchannel.
## </parameter>
## </interface>
#
define(`hostname_domtrans',`
gen_require(`
type hostname_t, hostname_exec_t;
class process sigchld;
class fd use;
class fifo_file rw_file_perms;
')
corecmd_search_bin($1)
domain_auto_trans($1,hostname_exec_t,hostname_t)
allow $1 hostname_t:fd use;
allow hostname_t $1:fd use;
allow hostname_t $1:fifo_file rw_file_perms;
allow hostname_t $1:process sigchld;
')
########################################
## <interface name="hostname_run">
## <description>
## Execute hostname in the hostname domain, and
## allow the specified role the hostname domain.
## Has a sigchld signal backchannel.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <parameter name="role">
## The role to be allowed the hostname domain.
## </parameter>
## <parameter name="terminal">
## The type of the terminal allow the hostname domain to use.
## </parameter>
## </interface>
#
define(`hostname_run',`
gen_require(`
type hostname_t;
class chr_file { getattr read write ioctl };
')
hostname_domtrans($1)
role $2 types hostname_t;
allow hostname_t $3:chr_file { getattr read write ioctl };
')
########################################
## <interface name="hostname_exec">
## <description>
## Execute hostname in the hostname domain, and
## Has a sigchld signal backchannel.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## </interface>
#
define(`hostname_exec',`
gen_require(`
type hostname_exec_t;
')
can_exec($1,hostname_exec_t)
')
## </module>