Chris PeBenito b8fca4
## <summary>Policy for managing user accounts.</summary>
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute chfn in the chfn domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_domtrans_chfn',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type chfn_t, chfn_exec_t;
Chris PeBenito 7f2e39
		class process sigchld;
Chris PeBenito 7f2e39
		class fd use;
Chris PeBenito 7f2e39
		class fifo_file rw_file_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito 7f2e39
	files_search_usr($1)
Chris PeBenito 7f2e39
	corecmd_search_bin($1)
Chris PeBenito 7f2e39
	domain_auto_trans($1,chfn_exec_t,chfn_t)
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 b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute chfn in the chfn domain, and
Chris PeBenito 414e41
##	allow the specified role the chfn domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="role">
Chris PeBenito 414e41
##	The role to be allowed the chfn domain.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="terminal">
Chris PeBenito 414e41
##	The type of the terminal allow the chfn domain to use.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_run_chfn',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type chfn_t;
Chris PeBenito 7f2e39
		class chr_file rw_term_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_chfn($1)
Chris PeBenito 0c73cd
	role $2 types chfn_t;
Chris PeBenito 7f2e39
	allow chfn_t $3:chr_file rw_term_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute groupadd in the groupadd domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_domtrans_groupadd',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type groupadd_t, groupadd_exec_t;
Chris PeBenito 7f2e39
		class process sigchld;
Chris PeBenito 7f2e39
		class fd use;
Chris PeBenito 7f2e39
		class fifo_file rw_file_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 7f2e39
Chris PeBenito 7f2e39
	files_search_usr($1)
Chris PeBenito 7f2e39
	corecmd_search_sbin($1)
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 b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute groupadd in the groupadd domain, and
Chris PeBenito 414e41
##	allow the specified role the groupadd domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="role">
Chris PeBenito 414e41
##	The role to be allowed the groupadd domain.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="terminal">
Chris PeBenito 414e41
##	The type of the terminal allow the groupadd domain to use.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_run_groupadd',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type groupadd_t;
Chris PeBenito 7f2e39
		class chr_file rw_term_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_groupadd($1)
Chris PeBenito 0c73cd
	role $2 types groupadd_t;
Chris PeBenito 7f2e39
	allow groupadd_t $3:chr_file rw_term_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute passwd in the passwd domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_domtrans_passwd',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type passwd_t, passwd_exec_t;
Chris PeBenito 7f2e39
		class process sigchld;
Chris PeBenito 7f2e39
		class fd use;
Chris PeBenito 7f2e39
		class fifo_file rw_file_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito 7f2e39
	files_search_usr($1)
Chris PeBenito 7f2e39
	corecmd_search_bin($1)
Chris PeBenito 7f2e39
	domain_auto_trans($1,passwd_exec_t,passwd_t)
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 b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute passwd in the passwd domain, and
Chris PeBenito 414e41
##	allow the specified role the passwd domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="role">
Chris PeBenito 414e41
##	The role to be allowed the passwd domain.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="terminal">
Chris PeBenito 414e41
##	The type of the terminal allow the passwd domain to use.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_run_passwd',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type passwd_t;
Chris PeBenito 7f2e39
		class chr_file rw_term_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_passwd($1)
Chris PeBenito 0c73cd
	role $2 types passwd_t;
Chris PeBenito 7f2e39
	allow passwd_t $3:chr_file rw_term_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 9edc28
##	Execute password admin functions in
Chris PeBenito 9edc28
##	the admin passwd domain.
Chris PeBenito 9edc28
## </summary>
Chris PeBenito 9edc28
## <param name="domain">
Chris PeBenito 9edc28
##	Domain allowed access.
Chris PeBenito 9edc28
## </param>
Chris PeBenito 9edc28
#
Chris PeBenito 9edc28
interface(`usermanage_domtrans_admin_passwd',`
Chris PeBenito 9edc28
	gen_require(`
Chris PeBenito 9edc28
		type sysadm_passwd_t, admin_passwd_exec_t;
Chris PeBenito 9edc28
	')
Chris PeBenito 9edc28
Chris PeBenito 9edc28
	files_search_usr($1)
Chris PeBenito 9edc28
	corecmd_search_bin($1)
Chris PeBenito 9edc28
	domain_auto_trans($1,admin_passwd_exec_t,sysadm_passwd_t)
Chris PeBenito 9edc28
Chris PeBenito 9edc28
	allow $1 sysadm_passwd_t:fd use;
Chris PeBenito 9edc28
	allow sysadm_passwd_t $1:fd use;
Chris PeBenito 9edc28
	allow sysadm_passwd_t $1:fifo_file rw_file_perms;
Chris PeBenito 9edc28
	allow sysadm_passwd_t $1:process sigchld;
Chris PeBenito 9edc28
')
Chris PeBenito 9edc28
Chris PeBenito 9edc28
########################################
Chris PeBenito 9edc28
## <summary>
Chris PeBenito 414e41
##	Execute useradd in the useradd domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_domtrans_useradd',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type useradd_t, useradd_exec_t;
Chris PeBenito 7f2e39
		class process sigchld;
Chris PeBenito 7f2e39
		class fd use;
Chris PeBenito 7f2e39
		class fifo_file rw_file_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito 7f2e39
	files_search_usr($1)
Chris PeBenito 7f2e39
	corecmd_search_sbin($1)
Chris PeBenito 7f2e39
	domain_auto_trans($1,useradd_exec_t,useradd_t)
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 b8fca4
########################################
Chris PeBenito f7ebea
## <summary>
Chris PeBenito 414e41
##	Execute useradd in the useradd domain, and
Chris PeBenito 414e41
##	allow the specified role the useradd domain.
Chris PeBenito f7ebea
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="role">
Chris PeBenito 414e41
##	The role to be allowed the useradd domain.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="terminal">
Chris PeBenito 414e41
##	The type of the terminal allow the useradd domain to use.
Chris PeBenito 414e41
## </param>
Chris PeBenito b8fca4
#
Chris PeBenito 199895
interface(`usermanage_run_useradd',`
Chris PeBenito 7f2e39
	gen_require(`
Chris PeBenito 7f2e39
		type useradd_t;
Chris PeBenito 7f2e39
		class chr_file rw_term_perms;
Chris PeBenito 7f2e39
	')
Chris PeBenito 0c73cd
Chris PeBenito c9428d
	usermanage_domtrans_useradd($1)
Chris PeBenito 0c73cd
	role $2 types useradd_t;
Chris PeBenito 7f2e39
	allow useradd_t $3:chr_file rw_term_perms;
Chris PeBenito b8fca4
')
Chris PeBenito b8fca4
Chris PeBenito ebdc3b
########################################
Chris PeBenito ebdc3b
## <summary>
Chris PeBenito ebdc3b
##	Read the crack database.
Chris PeBenito ebdc3b
## </summary>
Chris PeBenito ebdc3b
## <param name="domain">
Chris PeBenito ebdc3b
##	The type of the process performing this action.
Chris PeBenito ebdc3b
## </param>
Chris PeBenito ebdc3b
#
Chris PeBenito ebdc3b
interface(`usermanage_read_crack_db',`
Chris PeBenito ebdc3b
	gen_require(`
Chris PeBenito ebdc3b
		type crack_db_t;
Chris PeBenito ebdc3b
		class file r_file_perms;
Chris PeBenito ebdc3b
	')
Chris PeBenito ebdc3b
Chris PeBenito ebdc3b
	allow $1 crack_db_t:file r_file_perms;
Chris PeBenito ebdc3b
')