##
## Allow Konqueror to run bin_t because of drkonqi
##
##
gen_tunable(konqueror_exec_bin_t, false)
type konqueror_t;
type konqueror_exec_t;
application_domain(konqueror_t, konqueror_exec_t)
ubac_constrained(konqueror_t)
type konqueror_home_t;
userdom_user_home_content(konqueror_home_t)
type konqueror_tmp_t;
files_tmp_file(konqueror_tmp_t)
########################################
#
# Konqueror local policy
#
# Internal communication using fifo and dbus
allow konqueror_t self:fifo_file rw_file_perms;
allow konqueror_t self:dbus send_msg;
allow konqueror_t self:process getsched; # get self process priority
allow konqueror_t self:tcp_socket create_stream_socket_perms;
# Temp acces for konqueror
manage_dirs_pattern(konqueror_t, konqueror_tmp_t, konqueror_tmp_t)
manage_lnk_files_pattern(konqueror_t, konqueror_tmp_t, konqueror_tmp_t)
manage_sock_files_pattern(konqueror_t, konqueror_tmp_t, konqueror_tmp_t)
manage_files_pattern(konqueror_t, konqueror_tmp_t, konqueror_tmp_t)
# To ensure, that konqueror files with usr_tmp_t are labeled correctly as konqueror_tmp_t
userdom_user_tmp_filetrans(konqueror_t, konqueror_tmp_t, { file dir lnk_file sock_file })
# Now KDE temp stuff is created with user_tmp_t with more KDE aps confined
# it'll have the right context
# For now grant minimal necessary access to usr temp
userdom_read_user_tmp_files(konqueror_t)
# Full access to konqueror home
konqueror_manage_home(konqueror_t)
# Access to ports
corenet_all_recvfrom_unlabeled(konqueror_t)
corenet_tcp_sendrecv_all_if(konqueror_t)
corenet_tcp_sendrecv_all_nodes(konqueror_t)
corenet_tcp_sendrecv_all_ports(konqueror_t)
corenet_tcp_connect_ftp_data_port(konqueror_t)
corenet_tcp_connect_ftp_port(konqueror_t)
corenet_tcp_connect_http_port(konqueror_t)
corenet_tcp_connect_http_cache_port(konqueror_t)
dev_read_urand(konqueror_t) #/dev/urandom
files_read_etc_files(konqueror_t)
files_read_usr_files(konqueror_t) #/usr
fs_getattr_xattr_fs(konqueror_t) # extended atributes support
kernel_read_system_state(konqueror_t) #/proc
# Use shared libs
libs_use_ld_so(konqueror_t)
libs_use_shared_libs(konqueror_t)
# Read localization and fonts
miscfiles_read_localization(konqueror_t)
miscfiles_read_fonts(konqueror_t)
sysnet_dns_name_resolve(konqueror_t)
userdom_use_user_terminals(konqueror_t) #run from terminal
xserver_stream_connect(konqueror_t) #connect to xserver
xserver_stream_connect_xdm(konqueror_t) #connect to xdm xserver
# Konqueror runs drkonqi (bin_t) For now dontaudit, in future confine
# And if user wishes, it could be allowed
corecmd_dontaudit_getattr_bin_files(konqueror_t)
corecmd_dontaudit_exec_all_executables(konqueror_t)
tunable_policy(`konqueror_exec_bin_t',`
corecmd_getattr_bin_files(konqueror_t)
corecmd_exec_bin(konqueror_t)
')
# Access to kde_shared_home_t, should be reduced in future
# Transition so that konqueror_home_files in kde_shared_home_t dir
# wouldn't switch to parent directory type
optional_policy(`
kde_manage_home_files(konqueror_t)
files_kde_home_filetrans(konqueror_t, konqueror_home_t)
')
# For testing purpouses only!
# Should be in userdom.if
gen_require(`
type unconfined_t;
role unconfined_r;
')
konqueror_role(unconfined_r, unconfined_t)