2005-05-31 20:39:15 +00:00
|
|
|
## <summary>Policy for managing user accounts.</summary>
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute chfn in the chfn domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_domtrans_chfn',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type chfn_t, chfn_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 18:27:08 +00:00
|
|
|
corecmd_search_bin($1)
|
2008-07-23 21:38:39 +00:00
|
|
|
domtrans_pattern($1, chfn_exec_t, chfn_t)
|
2010-07-06 14:56:20 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms',`
|
|
|
|
dontaudit chfn_t $1:socket_class_set { read write };
|
|
|
|
')
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute chfn in the chfn domain, and
|
|
|
|
## allow the specified role the chfn domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_run_chfn',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type chfn_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
usermanage_domtrans_chfn($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types chfn_t;
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute groupadd in the groupadd domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_domtrans_groupadd',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type groupadd_t, groupadd_exec_t;
|
|
|
|
')
|
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2008-07-23 21:38:39 +00:00
|
|
|
domtrans_pattern($1, groupadd_exec_t, groupadd_t)
|
2010-07-06 14:56:20 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms',`
|
|
|
|
dontaudit groupadd_t $1:socket_class_set { read write };
|
|
|
|
')
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute groupadd in the groupadd domain, and
|
|
|
|
## allow the specified role the groupadd domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_run_groupadd',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type groupadd_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
usermanage_domtrans_groupadd($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types groupadd_t;
|
2007-10-15 18:16:00 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
nscd_run(groupadd_t, $2)
|
2007-10-15 18:16:00 +00:00
|
|
|
')
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute passwd in the passwd domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_domtrans_passwd',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type passwd_t, passwd_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 18:27:08 +00:00
|
|
|
corecmd_search_bin($1)
|
2008-07-23 21:38:39 +00:00
|
|
|
domtrans_pattern($1, passwd_exec_t, passwd_t)
|
2010-07-06 14:56:20 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms',`
|
|
|
|
dontaudit passwd_t $1:socket_class_set { read write };
|
|
|
|
')
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
2009-03-19 17:56:10 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send sigkills to passwd.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 12:56:31 +00:00
|
|
|
## Domain allowed access.
|
2009-03-19 17:56:10 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`usermanage_kill_passwd',`
|
|
|
|
gen_require(`
|
|
|
|
type passwd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 passwd_t:process sigkill;
|
|
|
|
')
|
|
|
|
|
2005-05-31 20:39:15 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute passwd in the passwd domain, and
|
|
|
|
## allow the specified role the passwd domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_run_passwd',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type passwd_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
usermanage_domtrans_passwd($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types passwd_t;
|
2009-03-19 17:56:10 +00:00
|
|
|
auth_run_chk_passwd(passwd_t, $2)
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
2005-09-23 22:15:04 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute password admin functions in
|
|
|
|
## the admin passwd domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-09-23 22:15:04 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`usermanage_domtrans_admin_passwd',`
|
|
|
|
gen_require(`
|
|
|
|
type sysadm_passwd_t, admin_passwd_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
2008-07-23 21:38:39 +00:00
|
|
|
domtrans_pattern($1, admin_passwd_exec_t, sysadm_passwd_t)
|
2005-09-23 22:15:04 +00:00
|
|
|
')
|
|
|
|
|
2005-11-25 15:51:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute passwd admin functions in the admin
|
|
|
|
## passwd domain, and allow the specified role
|
|
|
|
## the admin passwd domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-25 15:51:50 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-11-25 15:51:50 +00:00
|
|
|
#
|
|
|
|
interface(`usermanage_run_admin_passwd',`
|
|
|
|
gen_require(`
|
|
|
|
type sysadm_passwd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
usermanage_domtrans_admin_passwd($1)
|
|
|
|
role $2 types sysadm_passwd_t;
|
2007-10-15 18:16:00 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
nscd_run(sysadm_passwd_t, $2)
|
2007-10-15 18:16:00 +00:00
|
|
|
')
|
2005-11-25 15:51:50 +00:00
|
|
|
')
|
|
|
|
|
2007-10-18 19:31:14 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Do not audit attempts to use useradd fds.
|
2007-10-18 19:31:14 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Domain to not audit.
|
2007-10-18 19:31:14 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`usermanage_dontaudit_use_useradd_fds',`
|
|
|
|
gen_require(`
|
|
|
|
type useradd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 useradd_t:fd use;
|
|
|
|
')
|
|
|
|
|
2005-05-31 20:39:15 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute useradd in the useradd domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_domtrans_useradd',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type useradd_t, useradd_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_search_bin($1)
|
2008-07-23 21:38:39 +00:00
|
|
|
domtrans_pattern($1, useradd_exec_t, useradd_t)
|
2010-07-06 14:56:20 +00:00
|
|
|
|
|
|
|
ifdef(`hide_broken_symptoms',`
|
|
|
|
dontaudit useradd_t $1:socket_class_set { read write };
|
|
|
|
')
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute useradd in the useradd domain, and
|
|
|
|
## allow the specified role the useradd domain.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-05 12:45:31 +00:00
|
|
|
## Domain allowed to transition.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-03 13:20:22 +00:00
|
|
|
## Role allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-31 20:39:15 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`usermanage_run_useradd',`
|
2005-06-17 18:27:08 +00:00
|
|
|
gen_require(`
|
|
|
|
type useradd_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
usermanage_domtrans_useradd($1)
|
2005-06-03 12:25:14 +00:00
|
|
|
role $2 types useradd_t;
|
2007-10-15 18:16:00 +00:00
|
|
|
|
2010-07-06 14:56:20 +00:00
|
|
|
seutil_run_semanage(useradd_t, $2)
|
|
|
|
|
2007-10-15 18:16:00 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
nscd_run(useradd_t, $2)
|
2007-10-15 18:16:00 +00:00
|
|
|
')
|
2005-05-31 20:39:15 +00:00
|
|
|
')
|
|
|
|
|
2005-06-29 20:53:53 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read the crack database.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2010-08-02 13:22:09 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-29 20:53:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`usermanage_read_crack_db',`
|
|
|
|
gen_require(`
|
|
|
|
type crack_db_t;
|
|
|
|
')
|
|
|
|
|
2010-10-04 18:23:54 +00:00
|
|
|
files_search_var($1)
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern($1, crack_db_t, crack_db_t)
|
2005-06-29 20:53:53 +00:00
|
|
|
')
|