258 lines
6.8 KiB
Plaintext
258 lines
6.8 KiB
Plaintext
## <module name="usermanage" layer="admin">
|
|
## <summary>Policy for managing user accounts.</summary>
|
|
|
|
########################################
|
|
## <interface name="usermanage_domtrans_chfn">
|
|
## <description>
|
|
## Execute chfn in the chfn domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_domtrans_chfn',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 chfn_exec_t:file rx_file_perms;
|
|
allow $1 chfn_t:process transition;
|
|
type_transition $1 chfn_exec_t:process chfn_t;
|
|
dontaudit $1 chfn_t:process { noatsecure siginh rlimitinh };
|
|
|
|
allow $1 chfn_t:fd use;
|
|
allow chfn_t $1:fd use;
|
|
allow chfn_t $1:fifo_file rw_file_perms;
|
|
allow chfn_t $1:process sigchld;
|
|
')
|
|
|
|
define(`usermanage_domtrans_chfn_depend',`
|
|
type chfn_t, chfn_exec_t;
|
|
|
|
class file rx_file_perms;
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
class fd use;
|
|
class fifo_file rw_file_perms;
|
|
')
|
|
|
|
########################################
|
|
## <interface name="usermanage_run_chfn">
|
|
## <description>
|
|
## Execute chfn in the chfn domain, and
|
|
## allow the specified role the chfn domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## <parameter name="role">
|
|
## The role to be allowed the chfn domain.
|
|
## </parameter>
|
|
## <parameter name="terminal">
|
|
## The type of the terminal allow the chfn domain to use.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_run_chfn',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
usermanage_domtrans_chfn($1)
|
|
role $2 types chfn_t;
|
|
allow chfn_t $3:chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
define(`usermanage_run_chfn_depend',`
|
|
type chfn_t;
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
########################################
|
|
## <interface name="usermanage_domtrans_groupadd">
|
|
## <description>
|
|
## Execute groupadd in the groupadd domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_domtrans_groupadd',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
domain_auto_trans($1,groupadd_exec_t,groupadd_t)
|
|
|
|
allow $1 groupadd_t:fd use;
|
|
allow groupadd_t $1:fd use;
|
|
allow groupadd_t $1:fifo_file rw_file_perms;
|
|
allow groupadd_t $1:process sigchld;
|
|
')
|
|
|
|
define(`usermanage_domtrans_groupadd_depend',`
|
|
type groupadd_t, groupadd_exec_t;
|
|
|
|
class file rx_file_perms;
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
class fd use;
|
|
class fifo_file rw_file_perms;
|
|
')
|
|
|
|
########################################
|
|
## <interface name="usermanage_run_groupadd">
|
|
## <description>
|
|
## Execute groupadd in the groupadd domain, and
|
|
## allow the specified role the groupadd domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## <parameter name="role">
|
|
## The role to be allowed the groupadd domain.
|
|
## </parameter>
|
|
## <parameter name="terminal">
|
|
## The type of the terminal allow the groupadd domain to use.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_run_groupadd',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
usermanage_domtrans_groupadd($1)
|
|
role $2 types groupadd_t;
|
|
allow groupadd_t $3:chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
define(`usermanage_run_groupadd_depend',`
|
|
type groupadd_t;
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
########################################
|
|
## <interface name="usermanage_domtrans_passwd">
|
|
## <description>
|
|
## Execute passwd in the passwd domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_domtrans_passwd',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 passwd_exec_t:file rx_file_perms;
|
|
allow $1 passwd_t:process transition;
|
|
type_transition $1 passwd_exec_t:process passwd_t;
|
|
dontaudit $1 passwd_t:process { noatsecure siginh rlimitinh };
|
|
|
|
allow $1 passwd_t:fd use;
|
|
allow passwd_t $1:fd use;
|
|
allow passwd_t $1:fifo_file rw_file_perms;
|
|
allow passwd_t $1:process sigchld;
|
|
')
|
|
|
|
define(`usermanage_domtrans_passwd_depend',`
|
|
type passwd_t, passwd_exec_t;
|
|
|
|
class file rx_file_perms;
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
class fd use;
|
|
class fifo_file rw_file_perms;
|
|
')
|
|
|
|
########################################
|
|
## <interface name="usermanage_run_passwd">
|
|
## <description>
|
|
## Execute passwd in the passwd domain, and
|
|
## allow the specified role the passwd domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## <parameter name="role">
|
|
## The role to be allowed the passwd domain.
|
|
## </parameter>
|
|
## <parameter name="terminal">
|
|
## The type of the terminal allow the passwd domain to use.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_run_passwd',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
usermanage_domtrans_passwd($1)
|
|
role $2 types passwd_t;
|
|
allow passwd_t $3:chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
define(`usermanage_run_passwd_depend',`
|
|
type passwd_t;
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
########################################
|
|
## <interface name="usermanage_domtrans_useradd">
|
|
## <description>
|
|
## Execute useradd in the useradd domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_domtrans_useradd',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
allow $1 useradd_exec_t:file rx_file_perms;
|
|
allow $1 useradd_t:process transition;
|
|
type_transition $1 useradd_exec_t:process useradd_t;
|
|
dontaudit $1 useradd_t:process { noatsecure siginh rlimitinh };
|
|
|
|
allow $1 useradd_t:fd use;
|
|
allow useradd_t $1:fd use;
|
|
allow useradd_t $1:fifo_file rw_file_perms;
|
|
allow useradd_t $1:process sigchld;
|
|
')
|
|
|
|
define(`usermanage_domtrans_useradd_depend',`
|
|
type useradd_t, useradd_exec_t;
|
|
|
|
class file rx_file_perms;
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
class fd use;
|
|
class fifo_file rw_file_perms;
|
|
')
|
|
|
|
########################################
|
|
## <interface name="usermanage_run_useradd">
|
|
## <description>
|
|
## Execute useradd in the useradd domain, and
|
|
## allow the specified role the useradd domain.
|
|
## </description>
|
|
## <parameter name="domain">
|
|
## The type of the process performing this action.
|
|
## </parameter>
|
|
## <parameter name="role">
|
|
## The role to be allowed the useradd domain.
|
|
## </parameter>
|
|
## <parameter name="terminal">
|
|
## The type of the terminal allow the useradd domain to use.
|
|
## </parameter>
|
|
## </interface>
|
|
#
|
|
define(`usermanage_run_useradd',`
|
|
requires_block_template(`$0'_depend)
|
|
|
|
usermanage_domtrans_useradd($1)
|
|
role $2 types useradd_t;
|
|
allow useradd_t $3:chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
define(`usermanage_run_useradd_depend',`
|
|
type useradd_t;
|
|
|
|
class chr_file { getattr read write ioctl };
|
|
')
|
|
|
|
## </module>
|