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

75 lines
2.1 KiB
Plaintext
Raw Normal View History

2005-05-09 13:26:33 +00:00
# Copyright (C) 2005 Tresys Technology, LLC
2005-05-27 21:56:01 +00:00
## <module name="hostname" layer="keyservices">
## <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
########################################
## <interface name="hostname_transition">
## <description>
## Execute hostname in the hostname domain.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="write" weight="10"/>
## </interface>
2005-05-09 13:26:33 +00:00
#
define(`hostname_transition',`
requires_block_template(`$0'_depend)
allow $1 hostname_exec_t:file { getattr read execute };
allow $1 hostname_t:process transition;
type_transition $1 hostname_exec_t:process hostname_t;
2005-05-09 13:26:33 +00:00
dontaudit $1 hostname_t:process { noatsecure siginh rlimitinh };
')
define(`hostname_transition_depend',`
type hostname_t, hostname_exec_t;
class file { getattr read execute };
class process { transition noatsecure siginh rlimitinh };
')
2005-05-27 21:56:01 +00:00
########################################
## <interface name="hostname_transition_add_role_use_terminal">
## <description>
## Execute hostname in the hostname domain, and
## allow the specified role the hostname domain.
## </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>
## <infoflow type="write" weight="10"/>
## </interface>
#
define(`hostname_transition_add_role_use_terminal',`
requires_block_template(`$0'_depend)
hostname_transition($1)
role $2 types hostname_t;
allow hostname_t $3:chr_file { getattr read write ioctl };
')
define(`hostname_transition_add_role_use_terminal_depend',`
type hostname_t;
class chr_file { getattr read write ioctl };
')
2005-05-09 13:26:33 +00:00
#######################################
#
# hostname_execute(domain)
#
define(`hostname_execute',`
requires_block_template(`$0'_depend)
allow $1 hostname_exec_t:file { getattr read execute execute_no_trans };
')
define(`hostname_execute_depend',`
type hostname_exec_t;
class file { getattr read execute execute_no_trans };
')
2005-05-27 21:56:01 +00:00
## </module>