54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
policy_module(vlock, 1.0.1)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type vlock_t;
|
|
type vlock_exec_t;
|
|
application_domain(vlock_t, vlock_exec_t)
|
|
|
|
########################################
|
|
#
|
|
# Local policy
|
|
#
|
|
|
|
# --enable-pam is recommended when configuring vlock, making it
|
|
# unnecessary to be a setuid program.
|
|
dontaudit vlock_t self:capability { setuid setgid };
|
|
allow vlock_t self:fd use;
|
|
allow vlock_t self:fifo_file rw_fifo_file_perms;
|
|
allow vlock_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
allow vlock_t self:unix_dgram_socket { create connect };
|
|
|
|
kernel_read_system_state(vlock_t)
|
|
|
|
corecmd_list_bin(vlock_t)
|
|
corecmd_read_bin_symlinks(vlock_t)
|
|
|
|
# Must call this interface otherwise PAM session will fail
|
|
# with message of "terminal=? res=failed"
|
|
domain_use_interactive_fds(vlock_t)
|
|
|
|
files_dontaudit_search_home(vlock_t)
|
|
files_read_etc_files(vlock_t)
|
|
|
|
# pam_tally2 module could be used by vlock for authentication,
|
|
# /var/log/tallylog's SL is usually s0, while the caller's SL could
|
|
# be higher than s0.
|
|
mls_file_write_all_levels(vlock_t)
|
|
|
|
selinux_dontaudit_getattr_fs(vlock_t)
|
|
|
|
auth_domtrans_chk_passwd(vlock_t)
|
|
|
|
init_dontaudit_rw_utmp(vlock_t)
|
|
|
|
logging_send_syslog_msg(vlock_t)
|
|
|
|
miscfiles_read_localization(vlock_t)
|
|
|
|
userdom_dontaudit_search_user_home_dirs(vlock_t)
|
|
userdom_use_user_terminals(vlock_t)
|