Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# GNOME VFS daemon  
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Author: Ivan Gyurdiev <ivg2@cornell.edu>
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#######################################
Chris PeBenito 31b7c0
# gnome_vfs_domain(role_prefix)
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
define(`gnome_vfs_domain', `
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Type for daemon
Chris PeBenito 31b7c0
type $1_gnome_vfs_t, domain, nscd_client_domain;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# GNOME, dbus
Chris PeBenito 31b7c0
gnome_application($1_gnome_vfs, $1)
Chris PeBenito 31b7c0
dbusd_client(system, $1_gnome_vfs)
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t system_dbusd_t:dbus send_msg;
Chris PeBenito 31b7c0
ifdef(`hald.te', `
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t hald_t:dbus send_msg;
Chris PeBenito 31b7c0
allow hald_t $1_gnome_vfs_t:dbus send_msg;
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Transition from user type
Chris PeBenito 31b7c0
domain_auto_trans($1_t, gnome_vfs_exec_t, $1_gnome_vfs_t)
Chris PeBenito 31b7c0
role $1_r types $1_gnome_vfs_t; 
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Stat top level directories on mount_points (check free space?)
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t { fs_type default_t boot_t home_root_t device_t }:dir getattr;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Search path to /home (??)
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t home_root_t:dir search;
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t $1_home_dir_t:dir search;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Search path to rpc_pipefs mount point (??)
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t var_lib_nfs_t:dir search;
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t var_lib_t:dir search;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Search libexec (??)
Chris PeBenito 31b7c0
allow $1_gnome_vfs_t bin_t:dir search;
Chris PeBenito 31b7c0
can_exec($1_gnome_vfs_t, bin_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
') dnl gnome_vfs_domain
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#####################################
Chris PeBenito 31b7c0
# gnome_vfs_client(prefix, role_prefix)
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
define(`gnome_vfs_client', `
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Connect over bonobo
Chris PeBenito 31b7c0
bonobo_connect($1, $2_gnome_vfs)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
') dnl gnome_vfs_client