Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# GConfd daemon  
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Author: Ivan Gyurdiev <ivg2@cornell.edu>
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#######################################
Chris PeBenito ab58ad
# gconfd_domain(role_prefix)
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
define(`gconfd_domain', `
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Type for daemon
Chris PeBenito ab58ad
type $1_gconfd_t, domain, nscd_client_domain, privlog;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
gnome_application($1_gconfd, $1)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Transition from user type
Chris PeBenito ab58ad
domain_auto_trans($1_t, gconfd_exec_t, $1_gconfd_t)
Chris PeBenito ab58ad
role $1_r types $1_gconfd_t;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow $1_gconfd_t self:process { signal getsched };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Access .gconfd and .gconf
Chris PeBenito ab58ad
home_domain($1, gconfd)
Chris PeBenito ab58ad
file_type_auto_trans($1_gconfd_t, $1_home_dir_t, $1_gconfd_home_t, dir)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Access /etc/gconf
Chris PeBenito ab58ad
r_dir_file($1_gconfd_t, gconf_etc_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# /tmp/gconfd-USER
Chris PeBenito ab58ad
tmp_domain($1_gconfd)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
can_pipe_xdm($1_gconfd_t)
Chris PeBenito ab58ad
ifdef(`xdm.te', `
Chris PeBenito ab58ad
allow xdm_t $1_gconfd_t:process signal;
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
Chris PeBenito ab58ad
') dnl gconf_domain
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#####################################
Chris PeBenito ab58ad
# gconf_client(prefix, role_prefix)
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
define(`gconf_client', `
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Launch the daemon if necessary
Chris PeBenito ab58ad
domain_auto_trans($1_t, gconfd_exec_t, $2_gconfd_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Connect over bonobo
Chris PeBenito ab58ad
bonobo_connect($1, $2_gconfd)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Read lock/ior
Chris PeBenito ab58ad
allow $1_t $2_gconfd_tmp_t:dir { getattr search };
Chris PeBenito ab58ad
allow $1_t $2_gconfd_tmp_t:file { getattr read }; 
Chris PeBenito ab58ad
Chris PeBenito ab58ad
') dnl gconf_client