fa1847f4a2
Signed-off-by: Dominick Grift <domg472@gmail.com> Signed-off-by: Chris PeBenito <cpebenito@tresys.com>
94 lines
3.0 KiB
Plaintext
94 lines
3.0 KiB
Plaintext
policy_module(tvtime, 2.0.0)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type tvtime_t;
|
|
type tvtime_exec_t;
|
|
typealias tvtime_t alias { user_tvtime_t staff_tvtime_t sysadm_tvtime_t };
|
|
typealias tvtime_t alias { auditadm_tvtime_t secadm_tvtime_t };
|
|
application_domain(tvtime_t, tvtime_exec_t)
|
|
ubac_constrained(tvtime_t)
|
|
|
|
type tvtime_home_t alias tvtime_rw_t;
|
|
typealias tvtime_home_t alias { user_tvtime_home_t staff_tvtime_home_t sysadm_tvtime_home_t };
|
|
typealias tvtime_home_t alias { auditadm_tvtime_home_t secadm_tvtime_home_t };
|
|
userdom_user_home_content(tvtime_home_t)
|
|
|
|
type tvtime_tmp_t;
|
|
typealias tvtime_tmp_t alias { user_tvtime_tmp_t staff_tvtime_tmp_t sysadm_tvtime_tmp_t };
|
|
typealias tvtime_tmp_t alias { auditadm_tvtime_tmp_t secadm_tvtime_tmp_t };
|
|
files_tmp_file(tvtime_tmp_t)
|
|
ubac_constrained(tvtime_tmp_t)
|
|
|
|
type tvtime_tmpfs_t;
|
|
typealias tvtime_tmpfs_t alias { user_tvtime_tmpfs_t staff_tvtime_tmpfs_t sysadm_tvtime_tmpfs_t };
|
|
typealias tvtime_tmpfs_t alias { auditadm_tvtime_tmpfs_t secadm_tvtime_tmpfs_t };
|
|
files_tmpfs_file(tvtime_tmpfs_t)
|
|
ubac_constrained(tvtime_tmpfs_t)
|
|
|
|
########################################
|
|
#
|
|
# Local policy
|
|
#
|
|
|
|
allow tvtime_t self:capability { setuid sys_nice sys_resource };
|
|
allow tvtime_t self:process setsched;
|
|
allow tvtime_t self:unix_dgram_socket rw_socket_perms;
|
|
allow tvtime_t self:unix_stream_socket rw_stream_socket_perms;
|
|
|
|
# X access, Home files
|
|
manage_dirs_pattern(tvtime_t, tvtime_home_t, tvtime_home_t)
|
|
manage_files_pattern(tvtime_t, tvtime_home_t, tvtime_home_t)
|
|
manage_lnk_files_pattern(tvtime_t, tvtime_home_t, tvtime_home_t)
|
|
userdom_user_home_dir_filetrans(tvtime_t, tvtime_home_t, dir)
|
|
|
|
manage_dirs_pattern(tvtime_t, tvtime_tmp_t, tvtime_tmp_t)
|
|
manage_files_pattern(tvtime_t, tvtime_tmp_t, tvtime_tmp_t)
|
|
files_tmp_filetrans(tvtime_t, tvtime_tmp_t,{ file dir })
|
|
|
|
manage_files_pattern(tvtime_t, tvtime_tmpfs_t, tvtime_tmpfs_t)
|
|
manage_lnk_files_pattern(tvtime_t, tvtime_tmpfs_t, tvtime_tmpfs_t)
|
|
manage_fifo_files_pattern(tvtime_t, tvtime_tmpfs_t, tvtime_tmpfs_t)
|
|
manage_sock_files_pattern(tvtime_t, tvtime_tmpfs_t, tvtime_tmpfs_t)
|
|
fs_tmpfs_filetrans(tvtime_t, tvtime_tmpfs_t,{ file lnk_file sock_file fifo_file })
|
|
|
|
kernel_read_all_sysctls(tvtime_t)
|
|
kernel_get_sysvipc_info(tvtime_t)
|
|
|
|
dev_read_urand(tvtime_t)
|
|
dev_read_realtime_clock(tvtime_t)
|
|
dev_read_sound(tvtime_t)
|
|
|
|
files_read_usr_files(tvtime_t)
|
|
files_search_pids(tvtime_t)
|
|
# Read /etc/tvtime
|
|
files_read_etc_files(tvtime_t)
|
|
|
|
# X access, Home files
|
|
fs_search_auto_mountpoints(tvtime_t)
|
|
|
|
miscfiles_read_localization(tvtime_t)
|
|
miscfiles_read_fonts(tvtime_t)
|
|
|
|
userdom_use_user_terminals(tvtime_t)
|
|
userdom_read_user_home_content_files(tvtime_t)
|
|
|
|
# X access, Home files
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
fs_manage_nfs_dirs(tvtime_t)
|
|
fs_manage_nfs_files(tvtime_t)
|
|
fs_manage_nfs_symlinks(tvtime_t)
|
|
')
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
fs_manage_cifs_dirs(tvtime_t)
|
|
fs_manage_cifs_files(tvtime_t)
|
|
fs_manage_cifs_symlinks(tvtime_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
xserver_user_x_domain_template(tvtime, tvtime_t, tvtime_tmpfs_t)
|
|
')
|