Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito e181fe
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito c4890e
# Per user domain template for this module
Chris PeBenito c4890e
#
Chris PeBenito c4890e
# authlogin_per_userdomain_template(userdomain_prefix)
Chris PeBenito c4890e
#
Chris PeBenito c4890e
define(`authlogin_per_userdomain_template',`
Chris PeBenito c4890e
requires_block_template(authlogin_per_userdomain_template_depend)
Chris PeBenito c4890e
Chris PeBenito c4890e
type $1_chkpwd_t;     # , nscd_client_domain;
Chris PeBenito c4890e
domain_make_domain($1_chkpwd_t)
Chris PeBenito c4890e
domain_make_entrypoint_file($1_chkpwd_t,chkpwd_exec_t)
Chris PeBenito c4890e
role $1_r types $1_chkpwd_t;
Chris PeBenito c4890e
role $1_r types system_chkpwd_t;
Chris PeBenito c4890e
Chris PeBenito c4890e
# Use capabilities.
Chris PeBenito c4890e
allow $1_chkpwd_t self:capability setuid;
Chris PeBenito c4890e
Chris PeBenito c4890e
authlogin_read_shadow_passwords($1_chkpwd_t)
Chris PeBenito c4890e
logging_send_system_log_message($1_chkpwd_t)
Chris PeBenito c4890e
Chris PeBenito c4890e
libraries_use_dynamic_loader($1_chkpwd_t)
Chris PeBenito c4890e
libraries_read_shared_libraries($1_chkpwd_t)
Chris PeBenito c4890e
files_read_general_system_config($1_chkpwd_t)
Chris PeBenito c4890e
miscfiles_read_localization($1_chkpwd_t)
Chris PeBenito c4890e
selinux_read_config($1_chkpwd_t)
Chris PeBenito 219bcf
filesystem_ignore_get_persistent_filesystem_attributes($1_chkpwd_t)
Chris PeBenito c4890e
Chris PeBenito c4890e
# is_selinux_enabled
Chris PeBenito c4890e
kernel_read_system_state($1_chkpwd_t)
Chris PeBenito c4890e
#can_getcon($1_chkpwd_t)
Chris PeBenito c4890e
#can_ypbind($1_chkpwd_t)
Chris PeBenito c4890e
#can_kerberos($1_chkpwd_t)
Chris PeBenito c4890e
#can_ldap($1_chkpwd_t)
Chris PeBenito c4890e
#can_resolve($1_chkpwd_t)
Chris PeBenito c4890e
Chris PeBenito c4890e
# Transition from the user domain to this domain.
Chris PeBenito c4890e
ifelse($1, system, `', `
Chris PeBenito c4890e
# Transition from the user domain to this domain.
Chris PeBenito c4890e
allow $1_t chkpwd_exec_t:file { getattr read execute };
Chris PeBenito c4890e
allow $1_t $1_chkpwd_t:process transition;
Chris PeBenito c4890e
Chris PeBenito c4890e
#allow $1_t sbin_t:dir search;
Chris PeBenito c4890e
Chris PeBenito c4890e
# Write to the user domain tty.
Chris PeBenito c4890e
#userdomain_use_$1_terminal($1_chkpwd_t)
Chris PeBenito c4890e
#userdomain_use_$1_pty($1_chkpwd_t)
Chris PeBenito c4890e
Chris PeBenito c4890e
#allow $1_chkpwd_t privfd:fd use;
Chris PeBenito c4890e
Chris PeBenito c4890e
# Inherit and use descriptors from gnome-pty-helper.
Chris PeBenito c4890e
#ifdef(`gnome-pty-helper.te',`allow $1_chkpwd_t $1_gph_t:fd use;')
Chris PeBenito c4890e
Chris PeBenito c4890e
# Inherit and use descriptors from newrole.
Chris PeBenito c4890e
#ifdef(`newrole.te', `allow $1_chkpwd_t newrole_t:fd use;')
Chris PeBenito c4890e
') dnl ifelse system
Chris PeBenito c4890e
Chris PeBenito c4890e
# for nscd
Chris PeBenito c4890e
dontaudit $1_chkpwd_t var_t:dir search;
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
define(`authlogin_per_userdomain_template_depend',`
Chris PeBenito c4890e
type chkpwd_exec_t, system_chkpwd_t;
Chris PeBenito c4890e
class file { getattr read execute };
Chris PeBenito c4890e
class process transition;
Chris PeBenito c4890e
class capability setuid;
Chris PeBenito c4890e
class unix_stream_socket { create read getattr write setattr append bind connect getopt setopt shutdown };
Chris PeBenito c4890e
class unix_dgram_socket { create read getattr write setattr append bind connect getopt setopt shutdown };
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
#######################################
Chris PeBenito c4890e
#
Chris PeBenito dfaf6c
# authlogin_make_login_program_entrypoint(domain)
Chris PeBenito 07efe9
#
Chris PeBenito 07efe9
define(`authlogin_make_login_program_entrypoint',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_make_login_program_entrypoint_depend)
Chris PeBenito 07efe9
domain_make_entrypoint_file($1,login_exec_t)
Chris PeBenito 07efe9
')
Chris PeBenito 07efe9
Chris PeBenito 07efe9
define(`authlogin_make_login_program_entrypoint_depend',`
Chris PeBenito 07efe9
type login_exec_t;
Chris PeBenito 07efe9
domain_make_entrypoint_file_depend
Chris PeBenito 07efe9
')
Chris PeBenito 07efe9
Chris PeBenito 07efe9
#######################################
Chris PeBenito 07efe9
#
Chris PeBenito dfaf6c
# authlogin_check_password_transition(domain)
Chris PeBenito c4890e
#
Chris PeBenito c4890e
define(`authlogin_check_password_transition',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_check_password_transition_depend)
Chris PeBenito c4890e
allow $1 chkpwd_exec_t:file { getattr read execute };
Chris PeBenito c4890e
allow $1 system_chkpwd_t:process transition;
Chris PeBenito c4890e
dontaudit $1 shadow_t:file { getattr read };
Chris PeBenito c4890e
#allow auth_chkpwd sbin_t:dir search;
Chris PeBenito c4890e
#can_ypbind(auth_chkpwd)
Chris PeBenito c4890e
#can_kerberos(auth_chkpwd)
Chris PeBenito c4890e
#can_ldap(auth_chkpwd)
Chris PeBenito c4890e
#can_resolve(auth_chkpwd)
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
define(`authlogin_check_password_transition_depend',`
Chris PeBenito c4890e
type system_chkpwd_t, chkpwd_exec_t, shadow_t;
Chris PeBenito c4890e
class file { getattr read execute };
Chris PeBenito c4890e
class process transition;
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
#######################################
Chris PeBenito c4890e
#
Chris PeBenito dfaf6c
# authlogin_modify_login_records(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`authlogin_modify_login_records',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_modify_login_records_depend)
Chris PeBenito b4cd15
allow $1 wtmp_t:file { getattr read write setattr };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`authlogin_modify_login_records_depend',`
Chris PeBenito b4cd15
type wtmp_t;
Chris PeBenito b4cd15
class file { getattr read write setattr };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito dfaf6c
# authlogin_read_shadow_passwords(domain)
Chris PeBenito c4890e
#
Chris PeBenito c4890e
define(`authlogin_read_shadow_passwords',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_read_shadow_passwords_depend)
Chris PeBenito c4890e
allow $1 shadow_t:file { getattr read };
Chris PeBenito c4890e
typeattribute $1 can_read_shadow_passwords;
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
define(`authlogin_read_shadow_passwords_depend',`
Chris PeBenito c4890e
attribute can_read_shadow_passwords;
Chris PeBenito c4890e
type shadow_t;
Chris PeBenito c4890e
class file { getattr read };
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
#######################################
Chris PeBenito c4890e
#
Chris PeBenito dfaf6c
# authlogin_ignore_read_shadow_passwords(domain)
Chris PeBenito c4890e
#
Chris PeBenito c4890e
define(`authlogin_ignore_read_shadow_passwords',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_ignore_read_shadow_passwords_depend)
Chris PeBenito c4890e
dontaudit $1 shadow_t:file { getattr read };
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
define(`authlogin_ignore_read_shadow_passwords_depend',`
Chris PeBenito c4890e
type shadow_t;
Chris PeBenito c4890e
class file { getattr read };
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
#######################################
Chris PeBenito c4890e
#
Chris PeBenito dfaf6c
# authlogin_modify_shadow_passwords(domain)
Chris PeBenito c4890e
#
Chris PeBenito c4890e
define(`authlogin_modify_shadow_passwords',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_modify_shadow_passwords_depend)
Chris PeBenito c4890e
allow $1 shadow_t:file { getattr read write };
Chris PeBenito c4890e
typeattribute $1 can_read_shadow_passwords;
Chris PeBenito c4890e
typeattribute $1 can_write_shadow_passwords;
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
define(`authlogin_modify_shadow_passwords_depend',`
Chris PeBenito c4890e
attribute can_read_shadow_passwords;
Chris PeBenito c4890e
attribute can_write_shadow_passwords;
Chris PeBenito c4890e
type shadow_t;
Chris PeBenito c4890e
class file { getattr read write };
Chris PeBenito c4890e
')
Chris PeBenito c4890e
Chris PeBenito c4890e
#######################################
Chris PeBenito c4890e
#
Chris PeBenito dfaf6c
# authlogin_modify_last_login_log(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`authlogin_modify_last_login_log',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_modify_last_login_log_depend)
Chris PeBenito b4cd15
allow $1 lastlog_t:file { getattr read write setattr };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`authlogin_modify_last_login_log_depend',`
Chris PeBenito b4cd15
type lastlog_t;
Chris PeBenito b4cd15
class file { getattr read write setattr };
Chris PeBenito b4cd15
')
Chris PeBenito dfaf6c
Chris PeBenito dfaf6c
#######################################
Chris PeBenito dfaf6c
#
Chris PeBenito dfaf6c
# authlogin_read_pam_runtime_data(domain)
Chris PeBenito dfaf6c
#
Chris PeBenito dfaf6c
define(`authlogin_read_pam_runtime_data',`
Chris PeBenito dfaf6c
requires_block_template(authlogin_read_pam_runtime_data_depend)
Chris PeBenito dfaf6c
# FIXME: search var_t
Chris PeBenito dfaf6c
# FIXME: search var_run_t
Chris PeBenito dfaf6c
allow $1 pam_var_run_t:file { getattr read };
Chris PeBenito dfaf6c
')
Chris PeBenito dfaf6c
Chris PeBenito dfaf6c
define(`authlogin_read_pam_runtime_data_depend',`
Chris PeBenito dfaf6c
type lastlog_t;
Chris PeBenito dfaf6c
class file { getattr read };
Chris PeBenito dfaf6c
')