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