Karl MacMillan f0c985
## <module name="usermanage" layer="admin">
Chris PeBenito b8fca4
## <summary>Policy for managing user accounts.</summary>
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_domtrans_chfn">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_domtrans_chfn',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	allow $1 chfn_exec_t:file rx_file_perms;
Chris PeBenito 0c73cd
	allow $1 chfn_t:process transition;
Chris PeBenito 0c73cd
	type_transition $1 chfn_exec_t:process chfn_t;
Chris PeBenito 0c73cd
	dontaudit $1 chfn_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 chfn_t:fd use;
Chris PeBenito 0c73cd
	allow chfn_t $1:fd use;
Chris PeBenito 0c73cd
	allow chfn_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow chfn_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_domtrans_chfn_depend',`
Chris PeBenito 0c73cd
	type chfn_t, chfn_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	class file rx_file_perms;
Chris PeBenito 0c73cd
	class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 0c73cd
	class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_run_chfn">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_run_chfn',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_chfn($1)
Chris PeBenito 0c73cd
	role $2 types chfn_t;
Chris PeBenito 0c73cd
	allow chfn_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_run_chfn_depend',`
Chris PeBenito 0c73cd
	type chfn_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_domtrans_groupadd">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_domtrans_groupadd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito 0fd9dc
	domain_auto_trans($1,groupadd_exec_t,groupadd_t)
Chris PeBenito 0fd9dc
Chris PeBenito 0c73cd
	allow $1 groupadd_t:fd use;
Chris PeBenito 0c73cd
	allow groupadd_t $1:fd use;
Chris PeBenito 0c73cd
	allow groupadd_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow groupadd_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_domtrans_groupadd_depend',`
Chris PeBenito 0c73cd
	type groupadd_t, groupadd_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	class file rx_file_perms;
Chris PeBenito 0c73cd
	class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 0c73cd
	class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_run_groupadd">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_run_groupadd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_groupadd($1)
Chris PeBenito 0c73cd
	role $2 types groupadd_t;
Chris PeBenito 0c73cd
	allow groupadd_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_run_groupadd_depend',`
Chris PeBenito 0c73cd
	type groupadd_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_domtrans_passwd">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_domtrans_passwd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	allow $1 passwd_exec_t:file rx_file_perms;
Chris PeBenito 0c73cd
	allow $1 passwd_t:process transition;
Chris PeBenito 0c73cd
	type_transition $1 passwd_exec_t:process passwd_t;
Chris PeBenito 0c73cd
	dontaudit $1 passwd_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 passwd_t:fd use;
Chris PeBenito 0c73cd
	allow passwd_t $1:fd use;
Chris PeBenito 0c73cd
	allow passwd_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow passwd_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_domtrans_passwd_depend',`
Chris PeBenito 0c73cd
	type passwd_t, passwd_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	class file rx_file_perms;
Chris PeBenito 0c73cd
	class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 0c73cd
	class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_run_passwd">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_run_passwd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_passwd($1)
Chris PeBenito 0c73cd
	role $2 types passwd_t;
Chris PeBenito 0c73cd
	allow passwd_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_run_passwd_depend',`
Chris PeBenito 0c73cd
	type passwd_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_domtrans_useradd">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_domtrans_useradd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	allow $1 useradd_exec_t:file rx_file_perms;
Chris PeBenito 0c73cd
	allow $1 useradd_t:process transition;
Chris PeBenito 0c73cd
	type_transition $1 useradd_exec_t:process useradd_t;
Chris PeBenito 0c73cd
	dontaudit $1 useradd_t:process { noatsecure siginh rlimitinh };
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 useradd_t:fd use;
Chris PeBenito 0c73cd
	allow useradd_t $1:fd use;
Chris PeBenito 0c73cd
	allow useradd_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow useradd_t $1:process sigchld;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_domtrans_useradd_depend',`
Chris PeBenito 0c73cd
	type useradd_t, useradd_exec_t;
Chris PeBenito 0c73cd
Chris PeBenito dc67f7
	class file rx_file_perms;
Chris PeBenito 0c73cd
	class process { transition noatsecure siginh rlimitinh sigchld };
Chris PeBenito 0c73cd
	class fd use;
Chris PeBenito 0c73cd
	class fifo_file rw_file_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito c9428d
## <interface name="usermanage_run_useradd">
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
## </interface>
Chris PeBenito b8fca4
#
Chris PeBenito c9428d
define(`usermanage_run_useradd',`
Chris PeBenito 0c73cd
	requires_block_template(`$0'_depend)
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_useradd($1)
Chris PeBenito 0c73cd
	role $2 types useradd_t;
Chris PeBenito 0c73cd
	allow useradd_t $3:chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito c9428d
define(`usermanage_run_useradd_depend',`
Chris PeBenito 0c73cd
	type useradd_t;
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	class chr_file { getattr read write ioctl };
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
## </module>