Chris PeBenito b8fca4
## <module name="usermanage" layer="system">
Chris PeBenito b8fca4
## <summary>Policy for managing user accounts.</summary>
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_chfn_transition">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute chfn in the chfn domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_chfn_transition',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
allow $1 chfn_exec_t:file { getattr read execute };
Chris PeBenito b8fca4
allow $1 chfn_t:process transition;
Chris PeBenito b8fca4
type_transition $1 chfn_exec_t:process chfn_t;
Chris PeBenito b8fca4
dontaudit $1 chfn_t:process { noatsecure siginh rlimitinh };
Chris PeBenito b8fca4
allow $1 chfn_t:fd use;
Chris PeBenito b8fca4
allow chfn_t $1:fd use;
Chris PeBenito b8fca4
allow chfn_t $1:fifo_file rw_file_perms;
Chris PeBenito b8fca4
allow chfn_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_chfn_transition_depend',`
Chris PeBenito b8fca4
type chfn_t, chfn_exec_t;
Chris PeBenito b8fca4
class file { getattr read execute };
Chris PeBenito b8fca4
class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito b8fca4
class fd use;
Chris PeBenito b8fca4
class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_chfn_transition_add_role_use_terminal">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute chfn in the chfn domain, and
Chris PeBenito b8fca4
##		allow the specified role the chfn domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="role">
Chris PeBenito b8fca4
##		The role to be allowed the chfn domain.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="terminal">
Chris PeBenito b8fca4
##		The type of the terminal allow the chfn domain to use.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_chfn_transition_add_role_use_terminal',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
usermanage_chfn_transition($1)
Chris PeBenito b8fca4
role $2 types chfn_t;
Chris PeBenito b8fca4
allow chfn_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_chfn_transition_add_role_use_terminal_depend',`
Chris PeBenito b8fca4
type chfn_t;
Chris PeBenito b8fca4
class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_groupadd_transition">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute groupadd in the groupadd domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_groupadd_transition',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
allow $1 groupadd_exec_t:file { getattr read execute };
Chris PeBenito b8fca4
allow $1 groupadd_t:process transition;
Chris PeBenito b8fca4
type_transition $1 groupadd_exec_t:process groupadd_t;
Chris PeBenito b8fca4
dontaudit $1 groupadd_t:process { noatsecure siginh rlimitinh };
Chris PeBenito b8fca4
allow $1 groupadd_t:fd use;
Chris PeBenito b8fca4
allow groupadd_t $1:fd use;
Chris PeBenito b8fca4
allow groupadd_t $1:fifo_file rw_file_perms;
Chris PeBenito b8fca4
allow groupadd_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_groupadd_transition_depend',`
Chris PeBenito b8fca4
type groupadd_t, groupadd_exec_t;
Chris PeBenito b8fca4
class file { getattr read execute };
Chris PeBenito b8fca4
class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito b8fca4
class fd use;
Chris PeBenito b8fca4
class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_groupadd_transition_add_role_use_terminal">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute groupadd in the groupadd domain, and
Chris PeBenito b8fca4
##		allow the specified role the groupadd domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="role">
Chris PeBenito b8fca4
##		The role to be allowed the groupadd domain.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="terminal">
Chris PeBenito b8fca4
##		The type of the terminal allow the groupadd domain to use.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_groupadd_transition_add_role_use_terminal',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
usermanage_groupadd_transition($1)
Chris PeBenito b8fca4
role $2 types groupadd_t;
Chris PeBenito b8fca4
allow groupadd_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_groupadd_transition_add_role_use_terminal_depend',`
Chris PeBenito b8fca4
type groupadd_t;
Chris PeBenito b8fca4
class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_passwd_transition">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute passwd in the passwd domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_passwd_transition',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
allow $1 passwd_exec_t:file { getattr read execute };
Chris PeBenito b8fca4
allow $1 passwd_t:process transition;
Chris PeBenito b8fca4
type_transition $1 passwd_exec_t:process passwd_t;
Chris PeBenito b8fca4
dontaudit $1 passwd_t:process { noatsecure siginh rlimitinh };
Chris PeBenito b8fca4
allow $1 passwd_t:fd use;
Chris PeBenito b8fca4
allow passwd_t $1:fd use;
Chris PeBenito b8fca4
allow passwd_t $1:fifo_file rw_file_perms;
Chris PeBenito b8fca4
allow passwd_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_passwd_transition_depend',`
Chris PeBenito b8fca4
type passwd_t, passwd_exec_t;
Chris PeBenito b8fca4
class file { getattr read execute };
Chris PeBenito b8fca4
class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito b8fca4
class fd use;
Chris PeBenito b8fca4
class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_passwd_transition_add_role_use_terminal">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute passwd in the passwd domain, and
Chris PeBenito b8fca4
##		allow the specified role the passwd domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="role">
Chris PeBenito b8fca4
##		The role to be allowed the passwd domain.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="terminal">
Chris PeBenito b8fca4
##		The type of the terminal allow the passwd domain to use.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_passwd_transition_add_role_use_terminal',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
usermanage_passwd_transition($1)
Chris PeBenito b8fca4
role $2 types passwd_t;
Chris PeBenito b8fca4
allow passwd_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_passwd_transition_add_role_use_terminal_depend',`
Chris PeBenito b8fca4
type passwd_t;
Chris PeBenito b8fca4
class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_useradd_transition">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute useradd in the useradd domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_useradd_transition',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
allow $1 useradd_exec_t:file { getattr read execute };
Chris PeBenito b8fca4
allow $1 useradd_t:process transition;
Chris PeBenito b8fca4
type_transition $1 useradd_exec_t:process useradd_t;
Chris PeBenito b8fca4
dontaudit $1 useradd_t:process { noatsecure siginh rlimitinh };
Chris PeBenito b8fca4
allow $1 useradd_t:fd use;
Chris PeBenito b8fca4
allow useradd_t $1:fd use;
Chris PeBenito b8fca4
allow useradd_t $1:fifo_file rw_file_perms;
Chris PeBenito b8fca4
allow useradd_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_useradd_transition_depend',`
Chris PeBenito b8fca4
type useradd_t, useradd_exec_t;
Chris PeBenito b8fca4
class file { getattr read execute };
Chris PeBenito b8fca4
class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito b8fca4
class fd use;
Chris PeBenito b8fca4
class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito b8fca4
## <interface name="usermanage_useradd_transition_add_role_use_terminal">
Chris PeBenito b8fca4
##	<description>
Chris PeBenito b8fca4
##		Execute useradd in the useradd domain, and
Chris PeBenito b8fca4
##		allow the specified role the useradd domain.
Chris PeBenito b8fca4
##	</description>
Chris PeBenito b8fca4
##	<parameter name="domain">
Chris PeBenito b8fca4
##		The type of the process performing this action.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="role">
Chris PeBenito b8fca4
##		The role to be allowed the useradd domain.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<parameter name="terminal">
Chris PeBenito b8fca4
##		The type of the terminal allow the useradd domain to use.
Chris PeBenito b8fca4
##	</parameter>
Chris PeBenito b8fca4
##	<infoflow type="write" weight="10"/>
Chris PeBenito b8fca4
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito b8fca4
define(`usermanage_useradd_transition_add_role_use_terminal',`
Chris PeBenito b8fca4
requires_block_template(`$0'_depend)
Chris PeBenito b8fca4
usermanage_useradd_transition($1)
Chris PeBenito b8fca4
role $2 types useradd_t;
Chris PeBenito b8fca4
allow useradd_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
define(`usermanage_useradd_transition_add_role_use_terminal_depend',`
Chris PeBenito b8fca4
type useradd_t;
Chris PeBenito b8fca4
class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
## </module>