Chris PeBenito 2e77b2
## <module name="files" layer="system">
Karl MacMillan 870049
## <summary>
Karl MacMillan 870049
##	Basic filesystem types and interfaces.
Karl MacMillan 870049
## </summary>
Karl MacMillan 870049
## <description>
Karl MacMillan 870049
##	

Karl MacMillan 870049
## 	This module contains basic filesystem types and interfaces. This
Karl MacMillan 870049
##	includes:
Karl MacMillan 870049
##	
    Karl MacMillan 870049
    ##		
  • The concept of different file types including basic
  • Karl MacMillan 870049
    ##		files, mount points, tmp files, etc.
    Karl MacMillan 870049
    ##		
  • Access to groups of files and all files.
  • Karl MacMillan 870049
    ##		
  • Types and interfaces for the basic filesystem layout
  • Karl MacMillan 870049
    ##		(/, /etc, /tmp, /usr, etc.).
    Karl MacMillan 870049
    ##	
    Karl MacMillan 870049
    ##	

    Karl MacMillan 870049
    ## </description>
    Chris PeBenito e181fe
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_file_type(type)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_file_type',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 763c44
    	fs_associate($1)
    Chris PeBenito 0fd9dc
    	fs_associate_noxattr($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 file_type;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_file_type_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_lock_file(type)
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    define(`files_lock_file',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito c9428d
    	files_file_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 lockfile;
    Chris PeBenito 075c4f
    ')
    Chris PeBenito 075c4f
    Chris PeBenito c9428d
    define(`files_lock_file_depend',`
    Chris PeBenito 0c73cd
    	attribute lockfile;
    Chris PeBenito 075c4f
    ')
    Chris PeBenito 075c4f
    Chris PeBenito 075c4f
    ########################################
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    # files_mountpoint(type)
    Chris PeBenito 38e24a
    #
    Chris PeBenito c9428d
    define(`files_mountpoint',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito c9428d
    	files_file_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 mountpoint;
    Chris PeBenito 38e24a
    ')
    Chris PeBenito 38e24a
    Chris PeBenito c9428d
    define(`files_mountpoint_depend',`
    Chris PeBenito 0c73cd
    	attribute mountpoint;
    Chris PeBenito 38e24a
    ')
    Chris PeBenito 38e24a
    Chris PeBenito 38e24a
    ########################################
    Chris PeBenito 38e24a
    #
    Chris PeBenito c9428d
    # files_pid_file(type)
    Chris PeBenito a2d824
    #
    Chris PeBenito c9428d
    define(`files_pid_file',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito c9428d
    	files_file_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 pidfile;
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito c9428d
    define(`files_pid_file_depend',`
    Chris PeBenito 0c73cd
    	attribute pidfile;
    Chris PeBenito d25dd9
    ')
    Chris PeBenito d25dd9
    Chris PeBenito d25dd9
    ########################################
    Chris PeBenito d25dd9
    #
    Chris PeBenito c9428d
    # files_tmp_file(type)
    Chris PeBenito d25dd9
    #
    Chris PeBenito c9428d
    define(`files_tmp_file',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito c9428d
    	files_file_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 tmpfile;
    Chris PeBenito d25dd9
    ')
    Chris PeBenito d25dd9
    Chris PeBenito c9428d
    define(`files_tmp_file_depend',`
    Chris PeBenito 0c73cd
    	attribute tmpfile;
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito a2d824
    ########################################
    Chris PeBenito c9428d
    ## <interface name="files_tmpfs_file">
    Chris PeBenito 46410f
    ##	<description>
    Chris PeBenito 46410f
    ##		Transform the type into a file, for use on a
    Chris PeBenito 46410f
    ##		virtual memory filesystem (tmpfs).
    Chris PeBenito 46410f
    ##	</description>
    Chris PeBenito 46410f
    ##	<parameter name="type">
    Chris PeBenito 46410f
    ##		The type to be transformed.
    Chris PeBenito 46410f
    ##	</parameter>
    Chris PeBenito 46410f
    ## </interface>
    Chris PeBenito 46410f
    #
    Chris PeBenito c9428d
    define(`files_tmpfs_file',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito c9428d
    	files_file_type($1)
    Chris PeBenito 0fd9dc
    	fs_associate_tmpfs($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 tmpfsfile;
    Chris PeBenito 46410f
    ')
    Chris PeBenito 46410f
    Chris PeBenito c9428d
    define(`files_tmpfs_file_depend',`
    Chris PeBenito 0c73cd
    	attribute tmpfsfile;
    Chris PeBenito 46410f
    ')
    Chris PeBenito 46410f
    Chris PeBenito 46410f
    ########################################
    Chris PeBenito a2d824
    #
    Chris PeBenito c9428d
    # files_getattr_all_files(domain)
    Chris PeBenito efd8ed
    Chris PeBenito c9428d
    define(`files_getattr_all_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type:dir { search getattr };
    Chris PeBenito 0c73cd
    	allow $1 file_type:file getattr;
    Chris PeBenito 0c73cd
    	allow $1 file_type:lnk_file getattr;
    Chris PeBenito 0c73cd
    	allow $1 file_type:fifo_file getattr;
    Chris PeBenito 0c73cd
    	allow $1 file_type:sock_file getattr;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_getattr_all_files_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir { search getattr };
    Chris PeBenito 0c73cd
    	class file getattr;
    Chris PeBenito 0c73cd
    	class lnk_file getattr;
    Chris PeBenito 0c73cd
    	class fifo_file getattr;
    Chris PeBenito 0c73cd
    	class sock_file getattr;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito efd8ed
    ## <interface name="files_relabel_all_files">
    Chris PeBenito efd8ed
    ##	<description>
    Chris PeBenito efd8ed
    ##		Relabel all files on the filesystem, except
    Chris PeBenito efd8ed
    ##		the listed exceptions.
    Chris PeBenito efd8ed
    ##	</description>
    Chris PeBenito efd8ed
    ##	<parameter name="domain">
    Chris PeBenito efd8ed
    ##		The type of the domain perfoming this action.
    Chris PeBenito efd8ed
    ##	</parameter>
    Chris PeBenito efd8ed
    ##	<parameter name="exception_types" optional="true">
    Chris PeBenito efd8ed
    ##		The types to be excluded.  Each type or attribute
    Chris PeBenito efd8ed
    ##		must be negated by the caller.
    Chris PeBenito efd8ed
    ##	</parameter>
    Chris PeBenito efd8ed
    ## </interface>
    Chris PeBenito f9438f
    #
    Chris PeBenito efd8ed
    define(`files_relabel_all_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 { file_type $2 }:dir { r_dir_perms relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	allow $1 { file_type $2 }:file { getattr relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	allow $1 { file_type $2 }:lnk_file { getattr relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	allow $1 { file_type $2 }:fifo_file { getattr relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	allow $1 { file_type $2 }:sock_file { getattr relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	allow $1 { file_type $2 }:blk_file { getattr relabelfrom };
    Chris PeBenito 0c73cd
    	allow $1 { file_type $2 }:chr_file { getattr relabelfrom };
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	# satisfy the assertions:
    Chris PeBenito 5e0da6
    	seutil_relabelto_binary_pol($1)
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito efd8ed
    define(`files_relabel_all_files_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir { r_dir_perms relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	class file { relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	class lnk_file { relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	class fifo_file { relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	class sock_file { relabelfrom relabelto };
    Chris PeBenito 0c73cd
    	class blk_file relabelfrom;
    Chris PeBenito 0c73cd
    	class chr_file relabelfrom;
    Chris PeBenito ee5772
    ')
    Chris PeBenito ee5772
    Chris PeBenito ee5772
    ########################################
    Chris PeBenito efd8ed
    ## <interface name="files_manage_all_files">
    Chris PeBenito efd8ed
    ##	<description>
    Chris PeBenito efd8ed
    ##		Manage all files on the filesystem, except
    Chris PeBenito efd8ed
    ##		the listed exceptions.
    Chris PeBenito efd8ed
    ##	</description>
    Chris PeBenito efd8ed
    ##	<parameter name="domain">
    Chris PeBenito efd8ed
    ##		The type of the domain perfoming this action.
    Chris PeBenito efd8ed
    ##	</parameter>
    Chris PeBenito efd8ed
    ##	<parameter name="exception_types" optional="true">
    Chris PeBenito efd8ed
    ##		The types to be excluded.  Each type or attribute
    Chris PeBenito efd8ed
    ##		must be negated by the caller.
    Chris PeBenito efd8ed
    ##	</parameter>
    Chris PeBenito efd8ed
    ## </interface>
    Chris PeBenito efd8ed
    #
    Chris PeBenito efd8ed
    define(`files_manage_all_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 { file_type $2 }:dir create_dir_perms;
    Chris PeBenito dd8229
    	allow $1 { file_type $2 }:file create_file_perms;
    Chris PeBenito dd8229
    	allow $1 { file_type $2 }:lnk_file create_lnk_perms;
    Chris PeBenito dd8229
    	allow $1 { file_type $2 }:fifo_file create_file_perms;
    Chris PeBenito dd8229
    	allow $1 { file_type $2 }:sock_file create_file_perms;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	# satisfy the assertions:
    Chris PeBenito 5e0da6
    	seutil_write_binary_pol($1)
    Chris PeBenito 0c73cd
    	bootloader_manage_kernel_modules($1)
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito efd8ed
    define(`files_manage_all_files_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir create_dir_perms;
    Chris PeBenito dd8229
    	class file create_file_perms;
    Chris PeBenito dd8229
    	class lnk_file create_lnk_perms;
    Chris PeBenito dd8229
    	class fifo_file create_file_perms;
    Chris PeBenito dd8229
    	class sock_file create_file_perms;
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito efd8ed
    ########################################
    Chris PeBenito ee5772
    #
    Chris PeBenito c9428d
    # files_search_all_dirs(domain)
    Chris PeBenito f9438f
    #
    Chris PeBenito c9428d
    define(`files_search_all_dirs',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type:dir search;
    Chris PeBenito f9438f
    ')
    Chris PeBenito f9438f
    Chris PeBenito c9428d
    define(`files_search_all_dirs_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito f9438f
    ')
    Chris PeBenito f9438f
    Chris PeBenito f9438f
    ########################################
    Chris PeBenito ee5772
    #
    Chris PeBenito c9428d
    # files_list_all_dirs(domain)
    Chris PeBenito 24280a
    #
    Chris PeBenito c9428d
    define(`files_list_all_dirs',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type:dir r_dir_perms;
    Chris PeBenito 24280a
    ')
    Chris PeBenito 24280a
    Chris PeBenito c9428d
    define(`files_list_all_dirs_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir r_dir_perms;
    Chris PeBenito 24280a
    ')
    Chris PeBenito 24280a
    Chris PeBenito 24280a
    ########################################
    Chris PeBenito 24280a
    #
    Chris PeBenito c9428d
    # files_dontaudit_search_all_dirs(domain)
    Chris PeBenito 9f2f9e
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_search_all_dirs',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 file_type:dir search;
    Chris PeBenito 9f2f9e
    ')
    Chris PeBenito 9f2f9e
    Chris PeBenito c9428d
    define(`files_dontaudit_search_all_dirs_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito 9f2f9e
    ')
    Chris PeBenito 9f2f9e
    Chris PeBenito dc771f
    #######################################
    Chris PeBenito dc771f
    #
    Chris PeBenito 763c44
    # files_relabelto_all_file_type_fs(domain)
    Chris PeBenito dc771f
    #
    Chris PeBenito 763c44
    define(`files_relabelto_all_file_type_fs',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type:filesystem relabelto;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito 763c44
    define(`files_relabelto_all_file_type_fs_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	filesystem relabelto;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito dc771f
    #######################################
    Chris PeBenito dc771f
    #
    Chris PeBenito 763c44
    # files_mount_all_file_type_fs(domain)
    Chris PeBenito dc771f
    #
    Chris PeBenito 763c44
    define(`files_mount_all_file_type_fs',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type:filesystem mount;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito 763c44
    define(`files_mount_all_file_type_fs_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	filesystem mount;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito dc771f
    #######################################
    Chris PeBenito dc771f
    #
    Chris PeBenito 763c44
    # files_unmount_all_file_type_fs(domain)
    Chris PeBenito dc771f
    #
    Chris PeBenito 763c44
    define(`files_unmount_all_file_type_fs',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type:filesystem mount;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito 763c44
    define(`files_unmount_all_file_type_fs_depend',`
    Chris PeBenito 0c73cd
    	attribute file_type;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	filesystem mount;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito ee5772
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_mounton_all_mountpoints(domain)
    Chris PeBenito a2d824
    #
    Chris PeBenito c9428d
    define(`files_mounton_all_mountpoints',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 mountpoint:dir { getattr search mounton };
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito c9428d
    define(`files_mounton_all_mountpoints_depend',`
    Chris PeBenito 0c73cd
    	attribute mountpoint;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir { getattr search mounton };
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito a2d824
    ########################################
    Chris PeBenito a2d824
    #
    Chris PeBenito c9428d
    # files_list_root(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_list_root',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 root_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 root_t:lnk_file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_list_root_depend',`
    Chris PeBenito 0c73cd
    	type root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito c9428d
    ## <interface name="files_create_root">
    Chris PeBenito c9428d
    ##	<description>
    Chris PeBenito c9428d
    ##		Create an object in the root directory, with a private
    Chris PeBenito c9428d
    ##		type.  If no object class is specified, the
    Chris PeBenito c9428d
    ##		default is file.
    Chris PeBenito c9428d
    ##	</description>
    Chris PeBenito c9428d
    ##	<parameter name="domain">
    Chris PeBenito c9428d
    ##		The type of the process performing this action.
    Chris PeBenito c9428d
    ##	</parameter>
    Chris PeBenito c9428d
    ##	<parameter name="private type" optional="true">
    Chris PeBenito c9428d
    ##		The type of the object to be created.  If no type
    Chris PeBenito c9428d
    ##		is specified, the type of the root directory will
    Chris PeBenito c9428d
    ##		be used.
    Chris PeBenito c9428d
    ##	</parameter>
    Chris PeBenito c9428d
    ##	<parameter name="object" optional="true">
    Chris PeBenito c9428d
    ##		The object class of the object being created.  If
    Chris PeBenito c9428d
    ##		no class is specified, file will be used.
    Chris PeBenito c9428d
    ##	</parameter>
    Chris PeBenito c9428d
    ## </interface>
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_create_root',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito c9428d
    	allow $1 root_t:dir rw_dir_perms;
    Chris PeBenito c9428d
    Chris PeBenito c9428d
    	ifelse(`$3',`',`
    Chris PeBenito c9428d
    		ifelse(`$2',`',`
    Chris PeBenito c9428d
    			allow $1 root_t:file create_file_perms;
    Chris PeBenito c9428d
    		',`
    Chris PeBenito c9428d
    			type_transition $1 root_t:file $2;
    Chris PeBenito c9428d
    		')
    Chris PeBenito c9428d
    	',`
    Chris PeBenito c9428d
    		ifelse(`$2',`',`
    Chris PeBenito c9428d
    			allow $1 root_t:$3 create_file_perms;
    Chris PeBenito c9428d
    		',`
    Chris PeBenito c9428d
    			type_transition $1 root_t:$3 $2;
    Chris PeBenito c9428d
    		')
    Chris PeBenito c9428d
    	')
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_create_root_depend',`
    Chris PeBenito 0c73cd
    	type root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito c9428d
    	class dir create_dir_perms;
    Chris PeBenito c9428d
    	class file create_file_perms;
    Chris PeBenito c9428d
    	class lnk_file create_lnk_perms;
    Chris PeBenito c9428d
    	class fifo_file create_file_perms;
    Chris PeBenito c9428d
    	class sock_file create_file_perms;
    Chris PeBenito c9428d
    	class blk_file create_file_perms;
    Chris PeBenito c9428d
    	class chr_file create_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_dontaudit_read_root_file(domain)
    Chris PeBenito 9f2f9e
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_read_root_file',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 root_t:file read;
    Chris PeBenito 9f2f9e
    ')
    Chris PeBenito 9f2f9e
    Chris PeBenito c9428d
    define(`files_dontaudit_read_root_file_depend',`
    Chris PeBenito 0c73cd
    	type root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class file read;
    Chris PeBenito 9f2f9e
    ')
    Chris PeBenito 9f2f9e
    Chris PeBenito 9f2f9e
    ########################################
    Chris PeBenito 9f2f9e
    #
    Chris PeBenito c9428d
    # files_dontaudit_rw_root_file(domain)
    Chris PeBenito 7aebdb
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_rw_root_file',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 root_t:file { read write };
    Chris PeBenito 7aebdb
    ')
    Chris PeBenito 7aebdb
    Chris PeBenito c9428d
    define(`files_dontaudit_rw_root_file_depend',`
    Chris PeBenito 0c73cd
    	type root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class file { read write };
    Chris PeBenito 7aebdb
    ')
    Chris PeBenito 7aebdb
    Chris PeBenito 7aebdb
    ########################################
    Chris PeBenito 7aebdb
    #
    Chris PeBenito c9428d
    # files_dontaudit_rw_root_chr_dev(domain)
    Chris PeBenito 7aebdb
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_rw_root_chr_dev',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 root_t:chr_file { read write };
    Chris PeBenito 7aebdb
    ')
    Chris PeBenito 7aebdb
    Chris PeBenito c9428d
    define(`files_dontaudit_rw_root_chr_dev_depend',`
    Chris PeBenito 0c73cd
    	type root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class chr_file { read write };
    Chris PeBenito 7aebdb
    ')
    Chris PeBenito 7aebdb
    Chris PeBenito daa0e0
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_delete_root_dir_entry(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_delete_root_dir_entry',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 root_t:dir rw_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_delete_root_dir_entry_depend',`
    Chris PeBenito 0c73cd
    	type root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_unmount_rootfs(domain)
    Chris PeBenito a2d824
    #
    Chris PeBenito c9428d
    define(`files_unmount_rootfs',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 root_t:filesystem unmount;
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito c9428d
    define(`files_unmount_rootfs_depend',`
    Chris PeBenito 0c73cd
    	type root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class filesystem unmount;
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito a2d824
    ########################################
    Chris PeBenito a2d824
    #
    Chris PeBenito c9428d
    # files_search_etc(domain)
    Chris PeBenito 3ec805
    #
    Chris PeBenito c9428d
    define(`files_search_etc',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 etc_t:dir search;
    Chris PeBenito 3ec805
    ')
    Chris PeBenito 3ec805
    Chris PeBenito c9428d
    define(`files_search_etc_depend',`
    Chris PeBenito 0c73cd
    	type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito 3ec805
    ')
    Chris PeBenito 3ec805
    Chris PeBenito 3ec805
    ########################################
    Chris PeBenito 3ec805
    #
    Chris PeBenito c9428d
    # files_read_generic_etc_files_directory(domain)
    Chris PeBenito 3ec805
    #
    Chris PeBenito c9428d
    define(`files_read_generic_etc_files_directory',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito 3ec805
    ')
    Chris PeBenito 3ec805
    Chris PeBenito c9428d
    define(`files_read_generic_etc_files_directory_depend',`
    Chris PeBenito 0c73cd
    	type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito 3ec805
    ')
    Chris PeBenito 3ec805
    Chris PeBenito 3ec805
    ########################################
    Chris PeBenito d90b27
    #
    Chris PeBenito c9428d
    # files_read_generic_etc_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_read_generic_etc_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 etc_t:file r_file_perms;
    Chris PeBenito dd8229
    	allow $1 etc_t:lnk_file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_read_generic_etc_files_depend',`
    Chris PeBenito 0c73cd
    	type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class file r_file_perms;
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_rw_generic_etc_files(domain)
    Chris PeBenito 849380
    #
    Chris PeBenito c9428d
    define(`files_rw_generic_etc_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 etc_t:file rw_file_perms;
    Chris PeBenito dd8229
    	allow $1 etc_t:lnk_file r_file_perms;
    Chris PeBenito 849380
    ')
    Chris PeBenito 849380
    Chris PeBenito c9428d
    define(`files_rw_generic_etc_files_depend',`
    Chris PeBenito 0c73cd
    	type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class file rw_file_perms;
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito 849380
    ')
    Chris PeBenito 849380
    Chris PeBenito 849380
    ########################################
    Chris PeBenito 849380
    #
    Chris PeBenito c9428d
    # files_manage_generic_etc_files(domain)
    Chris PeBenito 849380
    #
    Chris PeBenito c9428d
    define(`files_manage_generic_etc_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir rw_dir_perms;
    Chris PeBenito dd8229
    	allow $1 etc_t:file create_file_perms;
    Chris PeBenito dd8229
    	allow $1 etc_t:lnk_file r_file_perms;
    Chris PeBenito 849380
    ')
    Chris PeBenito 849380
    Chris PeBenito c9428d
    define(`files_manage_generic_etc_files_depend',`
    Chris PeBenito 0c73cd
    	type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_dir_perms;
    Chris PeBenito dd8229
    	class file create_file_perms;
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito 849380
    ')
    Chris PeBenito 849380
    Chris PeBenito 849380
    ########################################
    Chris PeBenito c9428d
    ## <interface name="files_delete_generic_etc_files">
    Chris PeBenito 46410f
    ##	<description>
    Chris PeBenito 46410f
    ##		Delete system configuration files in /etc.
    Chris PeBenito 46410f
    ##	</description>
    Chris PeBenito 46410f
    ##	<parameter name="domain">
    Chris PeBenito 46410f
    ##		The type of the process performing this action.
    Chris PeBenito 46410f
    ##	</parameter>
    Chris PeBenito 46410f
    ## </interface>
    Chris PeBenito 46410f
    #
    Chris PeBenito c9428d
    define(`files_delete_generic_etc_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 etc_t:file unlink;
    Chris PeBenito 46410f
    ')
    Chris PeBenito 46410f
    Chris PeBenito c9428d
    define(`files_delete_generic_etc_files_depend',`
    Chris PeBenito 0c73cd
    	type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	class file unlink;
    Chris PeBenito 46410f
    ')
    Chris PeBenito 46410f
    Chris PeBenito 46410f
    ########################################
    Chris PeBenito 849380
    #
    Chris PeBenito c9428d
    # files_exec_generic_etc_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_exec_generic_etc_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 etc_t:lnk_file r_file_perms;
    Chris PeBenito dd8229
    	can_exec($1,etc_t)
    Chris PeBenito dd8229
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_exec_generic_etc_files_depend',`
    Chris PeBenito 0c73cd
    	type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito 0c73cd
    	class file { getattr read execute execute_no_trans };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito 0c73cd
    # files_create_boot_flag(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito b4cd15
    # /halt, /.autofsck, etc
    Chris PeBenito b4cd15
    #
    Chris PeBenito b4cd15
    define(`files_create_boot_flag',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 root_t:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 etc_runtime_t:file { create read write setattr unlink };
    Chris PeBenito 0c73cd
    	type_transition $1 root_t:file etc_runtime_t;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    define(`files_create_boot_flag_depend',`
    Chris PeBenito 0c73cd
    	type root_t, etc_runtime_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_dir_perms;
    Chris PeBenito dd8229
    	class file { create read write setattr unlink};
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_manage_etc_runtime_files(type)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_manage_etc_runtime_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir rw_dir_perms;
    Chris PeBenito dd8229
    	allow $1 etc_runtime_t:file create_file_perms;
    Chris PeBenito 0c73cd
    	type_transition $1 etc_t:file etc_runtime_t;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_manage_etc_runtime_files_depend',`
    Chris PeBenito 0c73cd
    	type etc_t, etc_runtime_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_dir_perms;
    Chris PeBenito dd8229
    	class file create_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_read_etc_runtime_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_read_etc_runtime_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 etc_runtime_t:file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_read_etc_runtime_files_depend',`
    Chris PeBenito 0c73cd
    	type etc_t, etc_runtime_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_create_etc_config(domain,privatetype,[class(es)])
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_create_etc_config',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 etc_t:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	ifelse(`$3',`',`
    Chris PeBenito 0c73cd
    		type_transition $1 etc_t:file $2;
    Chris PeBenito 0c73cd
    	',`
    Chris PeBenito 0c73cd
    		type_transition $1 etc_t:$3 $2;
    Chris PeBenito 0c73cd
    	')
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_create_etc_config_depend',`
    Chris PeBenito b4cd15
    type etc_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    class dir rw_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito 3b857e
    #
    Chris PeBenito c9428d
    # files_rw_isid_type_dir(domain)
    Chris PeBenito 129318
    #
    Chris PeBenito c9428d
    define(`files_rw_isid_type_dir',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_t:dir rw_dir_perms;
    Chris PeBenito 129318
    ')
    Chris PeBenito 129318
    Chris PeBenito c9428d
    define(`files_rw_isid_type_dir_depend',`
    Chris PeBenito 0c73cd
    	type file_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir rw_dir_perms;
    Chris PeBenito 129318
    ')
    Chris PeBenito 129318
    Chris PeBenito 129318
    ########################################
    Chris PeBenito 129318
    #
    Chris PeBenito c9428d
    # files_dontaudit_getattr_isid_type_dir(domain)
    Chris PeBenito 3b857e
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_getattr_isid_type_dir',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 file_t:dir search;
    Chris PeBenito 3b857e
    ')
    Chris PeBenito 3b857e
    Chris PeBenito c9428d
    define(`files_dontaudit_getattr_isid_type_dir_depend',`
    Chris PeBenito 0c73cd
    	type file_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito 3b857e
    ')
    Chris PeBenito 3b857e
    Chris PeBenito 3b857e
    ########################################
    Chris PeBenito 3b857e
    #
    Chris PeBenito c9428d
    # files_dontaudit_search_isid_type_dir(domain)
    Chris PeBenito 3b857e
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_search_isid_type_dir',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 file_t:dir search;
    Chris PeBenito 3b857e
    ')
    Chris PeBenito 3b857e
    Chris PeBenito c9428d
    define(`files_dontaudit_search_isid_type_dir_depend',`
    Chris PeBenito 0c73cd
    	type file_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito 3b857e
    ')
    Chris PeBenito 3b857e
    Chris PeBenito 3b857e
    ########################################
    Chris PeBenito c9428d
    ## <interface name="files_list_home">
    Chris PeBenito daa0e0
    ##	<description>
    Chris PeBenito daa0e0
    ##		Get listing home home directories.
    Chris PeBenito daa0e0
    ##	</description>
    Chris PeBenito daa0e0
    ##	<parameter name="domain">
    Chris PeBenito daa0e0
    ##		The type of the process performing this action.
    Chris PeBenito daa0e0
    ##	</parameter>
    Chris PeBenito daa0e0
    ## </interface>
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_list_home',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 home_root_t:dir r_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_list_home_depend',`
    Chris PeBenito 0c73cd
    	type home_root_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_list_mnt(domain)
    Chris PeBenito d490eb
    #
    Chris PeBenito c9428d
    define(`files_list_mnt',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 mnt_t:dir r_dir_perms;
    Chris PeBenito d490eb
    ')
    Chris PeBenito d490eb
    Chris PeBenito c9428d
    define(`files_read_etc_runtime_files_depend',`
    Chris PeBenito 0c73cd
    	type mnt_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito d490eb
    ')
    Chris PeBenito d490eb
    Chris PeBenito d490eb
    ########################################
    Chris PeBenito d490eb
    #
    Chris PeBenito c9428d
    # files_create_tmp_files(domain,private_type,[object class(es)])
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_create_tmp_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 tmp_t:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	ifelse(`$3',`',`
    Chris PeBenito 0c73cd
    		type_transition $1 tmp_t:file $2;
    Chris PeBenito 0c73cd
    	',`
    Chris PeBenito 0c73cd
    		type_transition $1 tmp_t:$3 $2;
    Chris PeBenito 0c73cd
    	')
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_create_tmp_files_depend',`
    Chris PeBenito 0c73cd
    	type tmp_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_delete_all_tmp_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_delete_all_tmp_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 tmpfile:dir { getattr search read write add_name remove_name rmdir };
    Chris PeBenito 0c73cd
    	allow $1 tmpfile:file { getattr unlink };
    Chris PeBenito 0c73cd
    	allow $1 tmpfile:lnk_file { getattr unlink };
    Chris PeBenito 0c73cd
    	allow $1 tmpfile:fifo_file { getattr unlink };
    Chris PeBenito 0c73cd
    	allow $1 tmpfile:sock_file { getattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_delete_all_tmp_files_depend',`
    Chris PeBenito 0c73cd
    	attribute tmpfile;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir { getattr search read write add_name remove_name rmdir };
    Chris PeBenito 0c73cd
    	class file { getattr unlink };
    Chris PeBenito 0c73cd
    	class lnk_file { getattr unlink };
    Chris PeBenito 0c73cd
    	class fifo_file { getattr unlink };
    Chris PeBenito 0c73cd
    	class sock_file { getattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_search_usr(domain)
    Chris PeBenito efd8ed
    #
    Chris PeBenito c9428d
    define(`files_search_usr',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 usr_t:dir search;
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito c9428d
    define(`files_search_usr_depend',`
    Chris PeBenito 0c73cd
    	type usr_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito efd8ed
    ########################################
    Chris PeBenito efd8ed
    #
    Chris PeBenito c9428d
    # files_read_usr_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_read_usr_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 usr_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 usr_t:{ file lnk_file } r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_read_usr_files_depend',`
    Chris PeBenito 0c73cd
    	type usr_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class file r_file_perms;
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito c9428d
    ## <interface name="files_exec_usr_files">
    Chris PeBenito daa0e0
    ##	<description>
    Chris PeBenito daa0e0
    ##		Execute programs in /usr/src in the caller domain.
    Chris PeBenito daa0e0
    ##	</description>
    Chris PeBenito daa0e0
    ##	<parameter name="domain">
    Chris PeBenito daa0e0
    ##		The type of the process performing this action.
    Chris PeBenito daa0e0
    ##	</parameter>
    Chris PeBenito daa0e0
    ## </interface>
    Chris PeBenito daa0e0
    #
    Chris PeBenito c9428d
    define(`files_exec_usr_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 usr_t:dir search;
    Chris PeBenito dd8229
    	allow $1 src_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 src_t:lnk_file r_file_perms;
    Chris PeBenito dd8229
    	can_exec($1,src_t)
    Chris PeBenito dd8229
    Chris PeBenito daa0e0
    ')
    Chris PeBenito daa0e0
    Chris PeBenito c9428d
    define(`files_read_usr_src_depend',`
    Chris PeBenito 0c73cd
    	type usr_t, src_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito 0c73cd
    	class file { getattr read execute execute_no_trans };
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito daa0e0
    ')
    Chris PeBenito daa0e0
    Chris PeBenito daa0e0
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_read_usr_src(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_read_usr_src',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 usr_t:dir search;
    Chris PeBenito dd8229
    	allow $1 src_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 src_t:{ file lnk_file } r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_read_usr_src_depend',`
    Chris PeBenito 0c73cd
    	type usr_t, src_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class file r_file_perms;
    Chris PeBenito dd8229
    	class lnk_file r_file_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_search_var(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_search_var',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_search_var_depend',`
    Chris PeBenito 0c73cd
    	type var_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito d0eddb
    ')
    Chris PeBenito d0eddb
    Chris PeBenito d0eddb
    ########################################
    Chris PeBenito d0eddb
    #
    Chris PeBenito c9428d
    # files_dontaudit_search_var(domain)
    Chris PeBenito d0eddb
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_search_var',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 var_t:dir search;
    Chris PeBenito d0eddb
    ')
    Chris PeBenito d0eddb
    Chris PeBenito c9428d
    define(`files_dontaudit_search_var_depend',`
    Chris PeBenito 0c73cd
    	type var_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_manage_urandom_seed(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_manage_urandom_seed',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0fd9dc
    	allow $1 var_lib_t:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 var_lib_t:file { getattr create read write setattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_manage_urandom_seed_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_lib_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_file_perms;
    Chris PeBenito 0c73cd
    	class file { getattr create read write setattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_getattr_generic_lock_files(domain)
    Chris PeBenito dc771f
    #
    Chris PeBenito c9428d
    define(`files_getattr_generic_lock_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 var_lock_t:dir r_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 var_lock_t:file getattr;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito c9428d
    define(`files_getattr_generic_lock_files_depend',`
    Chris PeBenito 0c73cd
    	type var_lock_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito 0c73cd
    	class file getattr;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito dc771f
    ########################################
    Chris PeBenito dc771f
    #
    Chris PeBenito c9428d
    # files_manage_generic_lock_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_manage_generic_lock_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_lock_t:dir { getattr search create read write setattr add_name remove_name rmdir };
    Chris PeBenito 0c73cd
    	allow $1 var_lock_t:file { getattr create read write setattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_manage_generic_lock_files_depend',`
    Chris PeBenito 0c73cd
    	type var_lock_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir { getattr search create read write setattr add_name remove_name rmdir };
    Chris PeBenito 0c73cd
    	class file { getattr create read write setattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_delete_all_lock_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_delete_all_lock_files',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0fd9dc
    	allow $1 lockfile:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 lockfile:file { getattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_delete_all_lock_files_depend',`
    Chris PeBenito 0c73cd
    	attribute lockfile;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	class file { getattr unlink };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_create_lock_file(domain,private_type,[object class(es)])
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    define(`files_create_lock_file',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0c73cd
    	allow $1 var_lock_t:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	ifelse(`$3',`',`
    Chris PeBenito 0c73cd
    		type_transition $1 var_lock_t:file $2;
    Chris PeBenito 0c73cd
    	',`
    Chris PeBenito 0c73cd
    		type_transition $1 var_lock_t:$3 $2;
    Chris PeBenito 0c73cd
    	')
    Chris PeBenito 075c4f
    ')
    Chris PeBenito 075c4f
    Chris PeBenito c9428d
    define(`files_create_lock_file_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_lock_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir rw_dir_perms;
    Chris PeBenito 075c4f
    ')
    Chris PeBenito 075c4f
    Chris PeBenito 075c4f
    ########################################
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    # files_search_pids(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_search_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0c73cd
    	allow $1 var_run_t:dir search;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_search_pids_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_run_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_dontaudit_search_pids(domain)
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    define(`files_dontaudit_search_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_run_t:dir search;
    Chris PeBenito 075c4f
    ')
    Chris PeBenito 075c4f
    Chris PeBenito c9428d
    define(`files_dontaudit_search_pids_depend',`
    Chris PeBenito 0c73cd
    	type var_run_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito 075c4f
    ')
    Chris PeBenito 075c4f
    Chris PeBenito 075c4f
    ########################################
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    # files_list_pids(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    define(`files_list_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito dd8229
    	allow $1 var_run_t:dir r_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito c9428d
    define(`files_list_pids_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_run_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito a266e3
    Chris PeBenito a266e3
    ########################################
    Chris PeBenito a266e3
    #
    Chris PeBenito c9428d
    # files_create_pid(domain,pidfile,[object class(es)])
    Chris PeBenito a266e3
    #
    Chris PeBenito c9428d
    define(`files_create_pid',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0c73cd
    	allow $1 var_run_t:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	ifelse(`$3',`',`
    Chris PeBenito 0c73cd
    		type_transition $1 var_run_t:file $2;
    Chris PeBenito 0c73cd
    	',`
    Chris PeBenito 0c73cd
    		type_transition $1 var_run_t:$3 $2;
    Chris PeBenito 0c73cd
    	')
    Chris PeBenito a266e3
    ')
    Chris PeBenito a266e3
    Chris PeBenito c9428d
    define(`files_create_pid_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_run_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir rw_dir_perms;
    Chris PeBenito 3ce6cb
    ')
    Chris PeBenito 3ce6cb
    Chris PeBenito 3ce6cb
    ########################################
    Chris PeBenito 3ce6cb
    #
    Chris PeBenito c9428d
    # files_rw_generic_pids(domain)
    Chris PeBenito 3ce6cb
    #
    Chris PeBenito c9428d
    define(`files_rw_generic_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito dd8229
    	allow $1 var_run_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 var_run_t:file rw_file_perms;
    Chris PeBenito 3ce6cb
    ')
    Chris PeBenito 3ce6cb
    Chris PeBenito c9428d
    define(`files_rw_generic_pids_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_run_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class file rw_file_perms;
    Chris PeBenito 3ce6cb
    ')
    Chris PeBenito 3ce6cb
    Chris PeBenito 3ce6cb
    ########################################
    Chris PeBenito c9428d
    ## <interface name="files_dontaudit_write_all_pids">
    Chris PeBenito dc771f
    ##	<description>
    Chris PeBenito dc771f
    ##		Do not audit attempts to write to daemon runtime data files.
    Chris PeBenito dc771f
    ##	</description>
    Chris PeBenito dc771f
    ##	<parameter name="domain">
    Chris PeBenito dc771f
    ##		The type of the process performing this action.
    Chris PeBenito dc771f
    ##	</parameter>
    Chris PeBenito dc771f
    ## </interface>
    Chris PeBenito dc771f
    #
    Chris PeBenito dc771f
    Chris PeBenito c9428d
    define(`files_dontaudit_write_all_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 pidfile:file write;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito c9428d
    define(`files_dontaudit_write_all_pids_depend',`
    Chris PeBenito 0c73cd
    	attribute pidfile;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class file write;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito dc771f
    ########################################
    Chris PeBenito c9428d
    ## <interface name="files_dontaudit_ioctl_all_pids">
    Chris PeBenito dc771f
    ##	<description>
    Chris PeBenito dc771f
    ##		Do not audit attempts to ioctl daemon runtime data files.
    Chris PeBenito dc771f
    ##	</description>
    Chris PeBenito dc771f
    ##	<parameter name="domain">
    Chris PeBenito dc771f
    ##		The type of the process performing this action.
    Chris PeBenito dc771f
    ##	</parameter>
    Chris PeBenito dc771f
    ## </interface>
    Chris PeBenito dc771f
    #
    Chris PeBenito dc771f
    Chris PeBenito c9428d
    define(`files_dontaudit_ioctl_all_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 pidfile:file ioctl;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito c9428d
    define(`files_dontaudit_ioctl_all_pids_depend',`
    Chris PeBenito 0c73cd
    	attribute pidfile;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class file ioctl;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito dc771f
    ########################################
    Chris PeBenito 3ce6cb
    #
    Chris PeBenito c9428d
    # files_read_all_pids(domain)
    Chris PeBenito d115b2
    #
    Chris PeBenito c9428d
    define(`files_read_all_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0c73cd
    	allow $1 pidfile:dir r_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 pidfile:file r_file_perms;
    Chris PeBenito d115b2
    ')
    Chris PeBenito d115b2
    Chris PeBenito c9428d
    define(`files_read_all_pids_depend',`
    Chris PeBenito 0c73cd
    	attribute pidfile;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	type var_t;
    Chris PeBenito 0c73cd
    	class dir r_dir_perms;
    Chris PeBenito 0c73cd
    	class file r_file_perms;
    Chris PeBenito d115b2
    ')
    Chris PeBenito d115b2
    Chris PeBenito d115b2
    ########################################
    Chris PeBenito d115b2
    #
    Chris PeBenito c9428d
    # files_delete_all_pids(domain)
    Chris PeBenito 3ce6cb
    #
    Chris PeBenito c9428d
    define(`files_delete_all_pids',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0c73cd
    	allow $1 var_run_t:{ sock_file lnk_file } { getattr unlink };
    Chris PeBenito 0c73cd
    	allow $1 var_run_t:dir rmdir;
    Chris PeBenito 0c73cd
    	allow $1 pidfile:dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 pidfile:file { getattr unlink };
    Chris PeBenito 0c73cd
    	allow $1 pidfile:sock_file { getattr unlink };
    Chris PeBenito 3ce6cb
    ')
    Chris PeBenito a266e3
    Chris PeBenito c9428d
    define(`files_delete_all_pids_depend',`
    Chris PeBenito 0c73cd
    	attribute pidfile;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	type var_t, var_run_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir rw_dir_perms;
    Chris PeBenito 0c73cd
    	class file { getattr unlink };
    Chris PeBenito 0c73cd
    	class lnk_file { getattr unlink };
    Chris PeBenito 0c73cd
    	class sock_file { getattr unlink };
    Chris PeBenito a266e3
    ')
    Chris PeBenito 7bba9d
    Chris PeBenito 7bba9d
    ########################################
    Chris PeBenito 7bba9d
    #
    Chris PeBenito c9428d
    # files_search_spool(domain)
    Chris PeBenito 7bba9d
    #
    Chris PeBenito c9428d
    define(`files_search_spool',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0c73cd
    	allow $1 var_spool_t:dir search;
    Chris PeBenito 7bba9d
    ')
    Chris PeBenito 7bba9d
    Chris PeBenito c9428d
    define(`files_search_spool_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_spool_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	class dir search;
    Chris PeBenito 7bba9d
    ')
    Chris PeBenito 7bba9d
    Chris PeBenito 7bba9d
    ########################################
    Chris PeBenito 7bba9d
    #
    Chris PeBenito c9428d
    # files_list_spool(domain)
    Chris PeBenito 7bba9d
    #
    Chris PeBenito c9428d
    define(`files_list_spool',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito dd8229
    	allow $1 var_spool_t:dir r_dir_perms;
    Chris PeBenito 7bba9d
    ')
    Chris PeBenito 7bba9d
    Chris PeBenito c9428d
    define(`files_list_spool_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_spool_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito 7bba9d
    ')
    Chris PeBenito 2e77b2
    Chris PeBenito efd8ed
    ########################################
    Chris PeBenito efd8ed
    #
    Chris PeBenito c9428d
    # files_read_spools(domain)
    Chris PeBenito efd8ed
    #
    Chris PeBenito c9428d
    define(`files_read_spools',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito dd8229
    	allow $1 var_spool_t:dir r_dir_perms;
    Chris PeBenito dd8229
    	allow $1 var_spool_t:file r_file_perms;
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito c9428d
    define(`files_read_spools_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_spool_t;
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	class dir r_dir_perms;
    Chris PeBenito dd8229
    	class file r_file_perms;
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito efd8ed
    ########################################
    Chris PeBenito efd8ed
    #
    Chris PeBenito c9428d
    # files_manage_spools(domain)
    Chris PeBenito efd8ed
    #
    Chris PeBenito c9428d
    define(`files_manage_spools',`
    Chris PeBenito fa7bea
    	gen_require(`$0'_depend)
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito 0fd9dc
    	allow $1 var_spool_t:dir rw_dir_perms;
    Chris PeBenito 0fd9dc
    	allow $1 var_spool_t:file create_file_perms;
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito c9428d
    define(`files_manage_spools_depend',`
    Chris PeBenito 0c73cd
    	type var_t, var_spool_t;
    Chris PeBenito 0c73cd
    Chris PeBenito 0fd9dc
    	class dir rw_dir_perms;
    Chris PeBenito 0fd9dc
    	class file create_file_perms;
    Chris PeBenito efd8ed
    ')
    Chris PeBenito efd8ed
    Chris PeBenito 2e77b2
    ## </module>