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