|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
7f2e39 |
files_search_usr($1)
|
|
Chris PeBenito |
7f2e39 |
corecmd_search_bin($1)
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($1,chfn_exec_t,chfn_t)
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The role to be allowed the chfn domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the chfn domain to use.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
')
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
')
|
|
Chris PeBenito |
7f2e39 |
|
|
Chris PeBenito |
7f2e39 |
files_search_usr($1)
|
|
Chris PeBenito |
8021cb |
corecmd_search_bin($1)
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($1,groupadd_exec_t,groupadd_t)
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The role to be allowed the groupadd domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the groupadd domain to use.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
b8fca4 |
#
|
|
Chris PeBenito |
199895 |
interface(`usermanage_run_groupadd',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type groupadd_t;
|
|
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 |
366270 |
|
|
Chris PeBenito |
366270 |
optional_policy(`
|
|
Chris PeBenito |
366270 |
nscd_run(groupadd_t, $2, $3)
|
|
Chris PeBenito |
366270 |
')
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
7f2e39 |
files_search_usr($1)
|
|
Chris PeBenito |
7f2e39 |
corecmd_search_bin($1)
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($1,passwd_exec_t,passwd_t)
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The role to be allowed the passwd domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the passwd domain to use.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
')
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
9edc28 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
c0868a |
domtrans_pattern($1,admin_passwd_exec_t,sysadm_passwd_t)
|
|
Chris PeBenito |
9edc28 |
')
|
|
Chris PeBenito |
9edc28 |
|
|
Chris PeBenito |
9edc28 |
########################################
|
|
Chris PeBenito |
9edc28 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## Execute passwd admin functions in the admin
|
|
Chris PeBenito |
2629c6 |
## passwd domain, and allow the specified role
|
|
Chris PeBenito |
2629c6 |
## the admin passwd domain.
|
|
Chris PeBenito |
2629c6 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## </param>
|
|
Chris PeBenito |
2629c6 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## The role to be allowed the admin passwd domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## </param>
|
|
Chris PeBenito |
2629c6 |
## <param name="terminal">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
2629c6 |
## The type of the terminal allow the admin passwd domain to use.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
2629c6 |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
2629c6 |
#
|
|
Chris PeBenito |
2629c6 |
interface(`usermanage_run_admin_passwd',`
|
|
Chris PeBenito |
2629c6 |
gen_require(`
|
|
Chris PeBenito |
2629c6 |
type sysadm_passwd_t;
|
|
Chris PeBenito |
2629c6 |
')
|
|
Chris PeBenito |
2629c6 |
|
|
Chris PeBenito |
2629c6 |
usermanage_domtrans_admin_passwd($1)
|
|
Chris PeBenito |
2629c6 |
role $2 types sysadm_passwd_t;
|
|
Chris PeBenito |
2629c6 |
allow sysadm_passwd_t $3:chr_file rw_term_perms;
|
|
Chris PeBenito |
366270 |
|
|
Chris PeBenito |
366270 |
optional_policy(`
|
|
Chris PeBenito |
366270 |
nscd_run(sysadm_passwd_t, $2, $3)
|
|
Chris PeBenito |
366270 |
')
|
|
Chris PeBenito |
2629c6 |
')
|
|
Chris PeBenito |
2629c6 |
|
|
Chris PeBenito |
2629c6 |
########################################
|
|
Chris PeBenito |
2629c6 |
## <summary>
|
|
Chris PeBenito |
2f2716 |
## Dontaudit attempts to use useradd fds
|
|
Chris PeBenito |
2f2716 |
## </summary>
|
|
Chris PeBenito |
2f2716 |
## <param name="domain">
|
|
Chris PeBenito |
2f2716 |
## <summary>
|
|
Chris PeBenito |
2f2716 |
## The type of the process performing this action.
|
|
Chris PeBenito |
2f2716 |
## </summary>
|
|
Chris PeBenito |
2f2716 |
## </param>
|
|
Chris PeBenito |
2f2716 |
#
|
|
Chris PeBenito |
2f2716 |
interface(`usermanage_dontaudit_use_useradd_fds',`
|
|
Chris PeBenito |
2f2716 |
gen_require(`
|
|
Chris PeBenito |
2f2716 |
type useradd_t;
|
|
Chris PeBenito |
2f2716 |
')
|
|
Chris PeBenito |
2f2716 |
|
|
Chris PeBenito |
2f2716 |
dontaudit $1 useradd_t:fd use;
|
|
Chris PeBenito |
2f2716 |
')
|
|
Chris PeBenito |
2f2716 |
|
|
Chris PeBenito |
2f2716 |
########################################
|
|
Chris PeBenito |
2f2716 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute useradd in the useradd domain.
|
|
Chris PeBenito |
f7ebea |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
7f2e39 |
files_search_usr($1)
|
|
Chris PeBenito |
8021cb |
corecmd_search_bin($1)
|
|
Chris PeBenito |
c0868a |
domtrans_pattern($1,useradd_exec_t,useradd_t)
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The role to be allowed the useradd domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the useradd domain to use.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
b8fca4 |
#
|
|
Chris PeBenito |
199895 |
interface(`usermanage_run_useradd',`
|
|
Chris PeBenito |
7f2e39 |
gen_require(`
|
|
Chris PeBenito |
7f2e39 |
type useradd_t;
|
|
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 |
366270 |
|
|
Chris PeBenito |
366270 |
optional_policy(`
|
|
Chris PeBenito |
366270 |
nscd_run(useradd_t, $2, $3)
|
|
Chris PeBenito |
366270 |
')
|
|
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 |
885b83 |
## <summary>
|
|
Chris PeBenito |
ebdc3b |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
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 |
')
|
|
Chris PeBenito |
ebdc3b |
|
|
Chris PeBenito |
0a0b80 |
read_files_pattern($1,crack_db_t,crack_db_t)
|
|
Chris PeBenito |
ebdc3b |
')
|