> ##
> ## 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)
> ubac_constrained(konqueror_tmp_t)
>
> ########################################
> #
> # Konqueror local policy
> #
>
> #
> # Allow rules and patterns
> #
> allow konqueror_t self:fifo_file rw_file_perms; # Internal communication using fifo
> allow konqueror_t self:process getsched; # get self process priority
> allow konqueror_t self:tcp_socket create_stream_socket_perms;
> konqueror_dbus_chat(konqueror_t) # internal comunication done by dbus
>
> # 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)
> konqueror_manage_home(konqueror_t) # full access to konqueror home
>
> #
> # Interfaces from kernel directory
> #
>
> # Konqueror runs drkonqi (bin_t) For now dontaudit, in future confine
> corecmd_dontaudit_getattr_bin_files(konqueror_t)
> corecmd_dontaudit_exec_all_executables(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
>
> #
> # Interfaces from system directory
> #
>
> # Use shared libs
> libs_use_ld_so(konqueror_t)
> libs_use_shared_libs(konqueror_t)
>
> # Read localization and fonts
> miscfiles_read_fonts(konqueror_t)
> miscfiles_read_localization(konqueror_t)
>
> sysnet_dns_name_resolve(konqueror_t)
>
> # 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)
> userdom_use_user_terminals(konqueror_t) #run from terminal
> # 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 })
>
> #
> # Interfaces from other directories
> #
>
> xserver_read_xdm_tmp_files(konqueror_t)
> xserver_read_user_xauth(konqueror_t)
> xserver_stream_connect(konqueror_t) #connect to xserver
> xserver_stream_connect_xdm(konqueror_t) #connect to xdm xserver
>
> #
> # Tunable policies
> #
>
> tunable_policy(`konqueror_exec_bin_t',`
> corecmd_exec_bin(konqueror_t)
> ')
>
> #
> # Optional policies
> #
>
> # 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 userdomain.if
> gen_require(`
> type unconfined_t;
> role unconfined_r;
> ')
>
> konqueror_role(unconfined_r, unconfined_t)
This must be moved to the unconfined module. It should also be added
for the staff and user roles.
--
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150