selinux-policy/policy/modules/system/hostname.if

76 lines
1.5 KiB
Plaintext
Raw Normal View History

2005-05-27 21:56:01 +00:00
## <summary>Policy for changing the system host name.</summary>
2005-05-09 13:26:33 +00:00
2005-05-27 21:56:01 +00:00
########################################
2005-07-14 20:02:53 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Execute hostname in the hostname domain.
2005-07-14 20:02:53 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-05-09 13:26:33 +00:00
#
interface(`hostname_domtrans',`
2005-06-17 17:59:26 +00:00
gen_require(`
type hostname_t, hostname_exec_t;
')
2005-06-17 17:59:26 +00:00
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;
2005-05-09 13:26:33 +00:00
')
2005-05-27 21:56:01 +00:00
########################################
2005-07-14 20:02:53 +00:00
## <summary>
2005-06-23 21:30:57 +00:00
## Execute hostname in the hostname domain, and
## allow the specified role the hostname domain.
2005-07-14 20:02:53 +00:00
## </summary>
2005-06-23 21:30:57 +00:00
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
## <param name="role">
## <summary>
2005-06-23 21:30:57 +00:00
## The role to be allowed the hostname domain.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
## <param name="terminal">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the terminal allow the hostname domain to use.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-05-27 21:56:01 +00:00
#
interface(`hostname_run',`
2005-06-17 17:59:26 +00:00
gen_require(`
type hostname_t;
')
2005-06-13 17:35:46 +00:00
hostname_domtrans($1)
role $2 types hostname_t;
allow hostname_t $3:chr_file { getattr read write ioctl };
2005-05-27 21:56:01 +00:00
')
2005-06-07 22:36:07 +00:00
########################################
## <summary>
## Execute hostname in the caller domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
2005-06-07 22:36:07 +00:00
#
interface(`hostname_exec',`
2005-06-17 17:59:26 +00:00
gen_require(`
type hostname_exec_t;
')
2006-01-06 22:51:40 +00:00
corecmd_search_bin($1)
2005-06-09 14:50:48 +00:00
can_exec($1,hostname_exec_t)
2005-05-09 13:26:33 +00:00
')