Karl MacMillan 870049
## <summary>
Chris PeBenito 414e41
## Basic filesystem types and interfaces.
Karl MacMillan 870049
## </summary>
Chris PeBenito 261e0e
## <desc>
Chris PeBenito 414e41
## 

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

    Chris PeBenito 261e0e
    ## </desc>
    Chris PeBenito 274547
    ## <required val="true">
    Chris PeBenito 274547
    ##	Contains the concept of a file.
    Chris PeBenito 274547
    ##	Comains the file initial SID.
    Chris PeBenito 274547
    ## </required>
    Chris PeBenito e181fe
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    # files_type(type)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    interface(`files_type',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_lock_file(type)
    Chris PeBenito 075c4f
    #
    Chris PeBenito 199895
    interface(`files_lock_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute lockfile;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 8fd367
    	files_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 lockfile;
    Chris PeBenito 075c4f
    ')
    Chris PeBenito 075c4f
    Chris PeBenito 075c4f
    ########################################
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    # files_mountpoint(type)
    Chris PeBenito 38e24a
    #
    Chris PeBenito 199895
    interface(`files_mountpoint',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute mountpoint;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 8fd367
    	files_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 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 199895
    interface(`files_pid_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute pidfile;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 8fd367
    	files_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 pidfile;
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito d25dd9
    ########################################
    Chris PeBenito d25dd9
    #
    Chris PeBenito c9428d
    # files_tmp_file(type)
    Chris PeBenito d25dd9
    #
    Chris PeBenito 199895
    interface(`files_tmp_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute tmpfile;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 8fd367
    	files_type($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 tmpfile;
    Chris PeBenito d25dd9
    ')
    Chris PeBenito d25dd9
    Chris PeBenito a2d824
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Transform the type into a file, for use on a
    Chris PeBenito 414e41
    ##	virtual memory filesystem (tmpfs).
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="type">
    Chris PeBenito 414e41
    ##	The type to be transformed.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito 46410f
    #
    Chris PeBenito 199895
    interface(`files_tmpfs_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute tmpfsfile;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 8fd367
    	files_type($1)
    Chris PeBenito 0fd9dc
    	fs_associate_tmpfs($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 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 199895
    interface(`files_getattr_all_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		class dir { search getattr };
    Chris PeBenito cbc9d6
    		class file getattr;
    Chris PeBenito cbc9d6
    		class lnk_file getattr;
    Chris PeBenito cbc9d6
    		class fifo_file getattr;
    Chris PeBenito cbc9d6
    		class sock_file getattr;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Relabel all files on the filesystem, except
    Chris PeBenito 414e41
    ##	the listed exceptions.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the domain perfoming this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito 414e41
    ## <param name="exception_types" optional="true">
    Chris PeBenito 414e41
    ##	The types to be excluded.  Each type or attribute
    Chris PeBenito 414e41
    ##	must be negated by the caller.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito f9438f
    #
    Chris PeBenito 199895
    interface(`files_relabel_all_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		class dir { r_dir_perms relabelfrom relabelto };
    Chris PeBenito cbc9d6
    		class file { relabelfrom relabelto };
    Chris PeBenito cbc9d6
    		class lnk_file { relabelfrom relabelto };
    Chris PeBenito cbc9d6
    		class fifo_file { relabelfrom relabelto };
    Chris PeBenito cbc9d6
    		class sock_file { relabelfrom relabelto };
    Chris PeBenito cbc9d6
    		class blk_file relabelfrom;
    Chris PeBenito cbc9d6
    		class chr_file relabelfrom;
    Chris PeBenito cbc9d6
    	')
    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 ee5772
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Manage all files on the filesystem, except
    Chris PeBenito 414e41
    ##	the listed exceptions.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the domain perfoming this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito 414e41
    ## <param name="exception_types" optional="true">
    Chris PeBenito 414e41
    ##	The types to be excluded.  Each type or attribute
    Chris PeBenito 414e41
    ##	must be negated by the caller.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito efd8ed
    #
    Chris PeBenito 199895
    interface(`files_manage_all_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		class dir create_dir_perms;
    Chris PeBenito cbc9d6
    		class file create_file_perms;
    Chris PeBenito cbc9d6
    		class lnk_file create_lnk_perms;
    Chris PeBenito cbc9d6
    		class fifo_file create_file_perms;
    Chris PeBenito cbc9d6
    		class sock_file create_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 139520
    	seutil_create_binary_pol($1)
    Chris PeBenito 0c73cd
    	bootloader_manage_kernel_modules($1)
    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 199895
    interface(`files_search_all_dirs',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type: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 199895
    interface(`files_list_all_dirs',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type: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 199895
    interface(`files_dontaudit_search_all_dirs',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 file_type: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 199895
    interface(`files_relabelto_all_file_type_fs',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		filesystem relabelto;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type: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 199895
    interface(`files_mount_all_file_type_fs',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		filesystem mount;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type: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 199895
    interface(`files_unmount_all_file_type_fs',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito cbc9d6
    		filesystem mount;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_type: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 199895
    interface(`files_mounton_all_mountpoints',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute mountpoint;
    Chris PeBenito cbc9d6
    		class dir { getattr search mounton };
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 mountpoint: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 199895
    interface(`files_list_root',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Create an object in the root directory, with a private
    Chris PeBenito 414e41
    ##	type.  If no object class is specified, the
    Chris PeBenito 414e41
    ##	default is file.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the process performing this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito 414e41
    ## <param name="private type" optional="true">
    Chris PeBenito 414e41
    ##	The type of the object to be created.  If no type
    Chris PeBenito 414e41
    ##	is specified, the type of the root directory will
    Chris PeBenito 414e41
    ##	be used.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito 414e41
    ## <param name="object" optional="true">
    Chris PeBenito 414e41
    ##	The object class of the object being created.  If
    Chris PeBenito 414e41
    ##	no class is specified, file will be used.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_create_root',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t;
    Chris PeBenito cbc9d6
    		class dir create_dir_perms;
    Chris PeBenito cbc9d6
    		class file create_file_perms;
    Chris PeBenito cbc9d6
    		class lnk_file create_lnk_perms;
    Chris PeBenito cbc9d6
    		class fifo_file create_file_perms;
    Chris PeBenito cbc9d6
    		class sock_file create_file_perms;
    Chris PeBenito cbc9d6
    		class blk_file create_file_perms;
    Chris PeBenito cbc9d6
    		class chr_file create_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_dontaudit_read_root_file(domain)
    Chris PeBenito 9f2f9e
    #
    Chris PeBenito 199895
    interface(`files_dontaudit_read_root_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t;
    Chris PeBenito cbc9d6
    		class file read;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 root_t: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 199895
    interface(`files_dontaudit_rw_root_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t;
    Chris PeBenito cbc9d6
    		class file { read write };
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 root_t: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 199895
    interface(`files_dontaudit_rw_root_chr_dev',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t;
    Chris PeBenito cbc9d6
    		class chr_file { read write };
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 root_t: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 199895
    interface(`files_delete_root_dir_entry',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 root_t: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 199895
    interface(`files_unmount_rootfs',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t;
    Chris PeBenito cbc9d6
    		class filesystem unmount;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 root_t:filesystem unmount;
    Chris PeBenito a2d824
    ')
    Chris PeBenito a2d824
    Chris PeBenito a2d824
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	List contents of directories with the default file type.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_list_default',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type default_t;
    Chris PeBenito a42ca7
    		class dir r_dir_perms;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 default_t:dir r_dir_perms;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	Mount a filesystem on a directory with the default file type.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_mounton_default',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type default_t;
    Chris PeBenito a42ca7
    		class dir { getattr search mounton };
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 default_t:dir { getattr search mounton };
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	Read files with the default file type.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_read_default_files',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type default_t;
    Chris PeBenito a42ca7
    		class file r_file_perms;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 default_t:file r_file_perms;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	Read symbolic links with the default file type.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_read_default_symlinks',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type default_t;
    Chris PeBenito a42ca7
    		class lnk_file r_file_perms;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 default_t:lnk_file r_file_perms;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	Read sockets with the default file type.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_read_default_sockets',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type default_t;
    Chris PeBenito a42ca7
    		class sock_file r_file_perms;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 default_t:sock_file r_file_perms;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	Read named pipes with the default file type.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_read_default_pipes',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type default_t;
    Chris PeBenito a42ca7
    		class fifo_file r_file_perms;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 default_t:fifo_file r_file_perms;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a2d824
    #
    Chris PeBenito c9428d
    # files_search_etc(domain)
    Chris PeBenito 3ec805
    #
    Chris PeBenito 199895
    interface(`files_search_etc',`
    Chris PeBenito 139520
    	gen_require(`
    Chris PeBenito 139520
    		type etc_t;
    Chris PeBenito 139520
    		class dir search;
    Chris PeBenito 139520
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 etc_t:dir search;
    Chris PeBenito 3ec805
    ')
    Chris PeBenito 3ec805
    Chris PeBenito 3ec805
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	Set the attributes of the /etc directories.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_setattr_etc_dir',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type etc_t;
    Chris PeBenito a42ca7
    		class dir setattr;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 etc_t:dir setattr;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito 3ec805
    #
    Chris PeBenito 139520
    # files_list_etc(domain)
    Chris PeBenito 3ec805
    #
    Chris PeBenito 199895
    interface(`files_list_etc',`
    Chris PeBenito 139520
    	gen_require(`
    Chris PeBenito 139520
    		type etc_t;
    Chris PeBenito 139520
    		class dir r_dir_perms;
    Chris PeBenito 139520
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito 3ec805
    ')
    Chris PeBenito 3ec805
    Chris PeBenito 3ec805
    ########################################
    Chris PeBenito d90b27
    #
    Chris PeBenito 8fd367
    # files_read_etc_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    interface(`files_read_etc_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file r_file_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    # files_rw_etc_files(domain)
    Chris PeBenito 849380
    #
    Chris PeBenito 8fd367
    interface(`files_rw_etc_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file rw_file_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 849380
    ########################################
    Chris PeBenito 849380
    #
    Chris PeBenito 8fd367
    # files_manage_etc_files(domain)
    Chris PeBenito 849380
    #
    Chris PeBenito 8fd367
    interface(`files_manage_etc_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    		class file create_file_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 849380
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Delete system configuration files in /etc.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the process performing this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito 46410f
    #
    Chris PeBenito 8fd367
    interface(`files_delete_etc_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    		class file unlink;
    Chris PeBenito cbc9d6
    	')
    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 46410f
    ########################################
    Chris PeBenito 849380
    #
    Chris PeBenito 8fd367
    # files_exec_etc_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    interface(`files_exec_etc_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 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 199895
    interface(`files_create_boot_flag',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type root_t, etc_runtime_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    		class file { create read write setattr unlink};
    Chris PeBenito cbc9d6
    	')
    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
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_manage_etc_runtime_files(type)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_manage_etc_runtime_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t, etc_runtime_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    		class file create_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_read_etc_runtime_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_read_etc_runtime_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t, etc_runtime_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_create_etc_config(domain,privatetype,[class(es)])
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_create_etc_config',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito 58c3da
    ##	Do not audit attempts to search directories on new filesystems
    Chris PeBenito 58c3da
    ##	that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 3b857e
    #
    Chris PeBenito 58c3da
    interface(`files_dontaudit_search_isid_type_dir',`
    Chris PeBenito 58c3da
    	gen_require(`
    Chris PeBenito 58c3da
    		type file_t;
    Chris PeBenito 58c3da
    		class dir search;
    Chris PeBenito 58c3da
    	')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    	dontaudit $1 file_t:dir search;
    Chris PeBenito 58c3da
    ')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito a42ca7
    ##	List the contents of directories on new filesystems
    Chris PeBenito a42ca7
    ##	that have not yet been labeled.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	The type of the process performing this action.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_list_isid_type_dir',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type file_t;
    Chris PeBenito a42ca7
    		class dir r_dir_perms;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 file_t:dir r_dir_perms;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 58c3da
    ##	Read and write directories on new filesystems
    Chris PeBenito 58c3da
    ##	that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 129318
    #
    Chris PeBenito 199895
    interface(`files_rw_isid_type_dir',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type file_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 file_t:dir rw_dir_perms;
    Chris PeBenito 129318
    ')
    Chris PeBenito 129318
    Chris PeBenito 129318
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito 58c3da
    ##	Create, read, write, and delete directories
    Chris PeBenito 58c3da
    ##	on new filesystems that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 129318
    #
    Chris PeBenito 58c3da
    interface(`files_manage_isid_type_dir',`
    Chris PeBenito 58c3da
    	gen_require(`
    Chris PeBenito 58c3da
    		type file_t;
    Chris PeBenito 58c3da
    		class dir create_dir_perms;
    Chris PeBenito 58c3da
    	')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    	allow $1 file_t:dir create_dir_perms;
    Chris PeBenito 58c3da
    ')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito a42ca7
    ##	Mount a filesystem on a directory on new filesystems
    Chris PeBenito a42ca7
    ##	that has not yet been labeled.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	The type of the process performing this action.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_mounton_isid_type_dir',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type file_t;
    Chris PeBenito a42ca7
    		class dir { getattr search mounton };
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 file_t:dir { getattr search mounton };
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito ae9e27
    ##	Read files on new filesystems
    Chris PeBenito ae9e27
    ##	that have not yet been labeled.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ## <param name="domain">
    Chris PeBenito ae9e27
    ##	The type of the process performing this action.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_read_isid_type_file',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type file_t;
    Chris PeBenito ae9e27
    		class dir search;
    Chris PeBenito ae9e27
    		class file r_file_perms;
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	allow $1 file_t:dir search;
    Chris PeBenito ae9e27
    	allow $1 file_t:file r_file_perms;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito 58c3da
    ##	Create, read, write, and delete files
    Chris PeBenito 58c3da
    ##	on new filesystems that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 3b857e
    #
    Chris PeBenito 58c3da
    interface(`files_manage_isid_type_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type file_t;
    Chris PeBenito 58c3da
    		class dir rw_dir_perms;
    Chris PeBenito 58c3da
    		class file create_file_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 58c3da
    	allow $1 file_t:dir rw_dir_perms;
    Chris PeBenito 58c3da
    	allow $1 file_t:file create_file_perms;
    Chris PeBenito 3b857e
    ')
    Chris PeBenito 3b857e
    Chris PeBenito 3b857e
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito 58c3da
    ##	Create, read, write, and delete symbolic links
    Chris PeBenito 58c3da
    ##	on new filesystems that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 3b857e
    #
    Chris PeBenito 58c3da
    interface(`files_manage_isid_type_symlink',`
    Chris PeBenito 58c3da
    	gen_require(`
    Chris PeBenito 58c3da
    		type file_t;
    Chris PeBenito 58c3da
    		class dir rw_dir_perms;
    Chris PeBenito 58c3da
    		class lnk_file create_lnk_perms;
    Chris PeBenito 58c3da
    	')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    	allow $1 file_t:dir rw_dir_perms;
    Chris PeBenito 58c3da
    	allow $1 file_t:lnk_file create_lnk_perms;
    Chris PeBenito 58c3da
    ')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito 58c3da
    ##	Read and write block device nodes on new filesystems 
    Chris PeBenito 58c3da
    ##	that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 3b857e
    #
    Chris PeBenito 58c3da
    interface(`files_rw_isid_type_blk_node',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type file_t;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito 58c3da
    		class blk_file rw_file_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 58c3da
    	allow $1 file_t:dir search;
    Chris PeBenito 58c3da
    	allow $1 file_t:blk_file rw_file_perms;
    Chris PeBenito 58c3da
    ')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito 58c3da
    ##	Create, read, write, and delete block device nodes
    Chris PeBenito 58c3da
    ##	on new filesystems that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 58c3da
    #
    Chris PeBenito 58c3da
    interface(`files_manage_isid_type_blk_node',`
    Chris PeBenito 58c3da
    	gen_require(`
    Chris PeBenito 58c3da
    		type file_t;
    Chris PeBenito 58c3da
    		class dir rw_dir_perms;
    Chris PeBenito 58c3da
    		class blk_file create_file_perms;
    Chris PeBenito 58c3da
    	')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    	allow $1 file_t:dir rw_dir_perms;
    Chris PeBenito 58c3da
    	allow $1 file_t:blk_file create_file_perms;
    Chris PeBenito 58c3da
    ')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito 58c3da
    ##	Create, read, write, and delete character device nodes
    Chris PeBenito 58c3da
    ##	on new filesystems that have not yet been labeled.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 58c3da
    #
    Chris PeBenito 58c3da
    interface(`files_manage_isid_type_chr_node',`
    Chris PeBenito 58c3da
    	gen_require(`
    Chris PeBenito 58c3da
    		type file_t;
    Chris PeBenito 58c3da
    		class dir rw_dir_perms;
    Chris PeBenito 58c3da
    		class chr_file create_file_perms;
    Chris PeBenito 58c3da
    	')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    	allow $1 file_t:dir rw_dir_perms;
    Chris PeBenito 58c3da
    	allow $1 file_t:chr_file create_file_perms;
    Chris PeBenito 3b857e
    ')
    Chris PeBenito 3b857e
    Chris PeBenito 3b857e
    ########################################
    Chris PeBenito cbca03
    ## <summary>
    Chris PeBenito fd89e1
    ##	Search home directories.
    Chris PeBenito fd89e1
    ## </summary>
    Chris PeBenito fd89e1
    ## <param name="domain">
    Chris PeBenito fd89e1
    ##	The type of the process performing this action.
    Chris PeBenito fd89e1
    ## </param>
    Chris PeBenito fd89e1
    #
    Chris PeBenito fd89e1
    interface(`files_search_home',`
    Chris PeBenito fd89e1
    	gen_require(`
    Chris PeBenito fd89e1
    		type home_root_t;
    Chris PeBenito fd89e1
    		class dir search;
    Chris PeBenito fd89e1
    	')
    Chris PeBenito fd89e1
    Chris PeBenito fd89e1
    	allow $1 home_root_t:dir search;
    Chris PeBenito fd89e1
    ')
    Chris PeBenito fd89e1
    Chris PeBenito fd89e1
    ########################################
    Chris PeBenito fd89e1
    ## <summary>
    Chris PeBenito cbca03
    ##	Get listing of home directories.
    Chris PeBenito cbca03
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the process performing this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_list_home',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type home_root_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 home_root_t:dir r_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito cbca03
    ## <summary>
    Chris PeBenito c98340
    ##	Create home directories
    Chris PeBenito c98340
    ## </summary>
    Chris PeBenito c98340
    ## <param name="domain">
    Chris PeBenito c98340
    ##	The type of the process performing this action.
    Chris PeBenito c98340
    ## </param>
    Chris PeBenito c98340
    ## <param name="home_type">
    Chris PeBenito c98340
    ##	The type of the home directory
    Chris PeBenito c98340
    ## </param>
    Chris PeBenito c98340
    #
    Chris PeBenito c98340
    interface(`files_create_home_dirs',`
    Chris PeBenito c98340
    	gen_require(`
    Chris PeBenito c98340
    		type home_root_t;
    Chris PeBenito c98340
    		class dir rw_dir_perms;
    Chris PeBenito c98340
    	')
    Chris PeBenito c98340
    Chris PeBenito c98340
    	allow $1 home_root_t:dir rw_dir_perms;
    Chris PeBenito c98340
    	type_transition $1 home_root_t:dir $2;
    Chris PeBenito c98340
    ')
    Chris PeBenito c98340
    Chris PeBenito c98340
    ########################################
    Chris PeBenito c98340
    ## <summary>
    Chris PeBenito cbca03
    ##	Create, read, write, and delete objects in
    Chris PeBenito cbca03
    ##	lost+found directories.
    Chris PeBenito cbca03
    ## </summary>
    Chris PeBenito cbca03
    ## <param name="domain">
    Chris PeBenito cbca03
    ##	The type of the process performing this action.
    Chris PeBenito cbca03
    ## </param>
    Chris PeBenito cbca03
    #
    Chris PeBenito cbca03
    interface(`files_manage_lost_found',`
    Chris PeBenito cbca03
    	gen_require(`
    Chris PeBenito cbca03
    		type lost_found_t;
    Chris PeBenito cbca03
    		class dir create_dir_perms;
    Chris PeBenito cbca03
    		class file create_file_perms;
    Chris PeBenito cbca03
    		class sock_file create_file_perms;
    Chris PeBenito cbca03
    		class fifo_file create_file_perms;
    Chris PeBenito cbca03
    		class lnk_file create_lnk_perms;
    Chris PeBenito cbca03
    	')
    Chris PeBenito cbca03
    Chris PeBenito cbca03
    	allow $1 lost_found_t:dir create_dir_perms;
    Chris PeBenito cbca03
    	allow $1 lost_found_t:file create_file_perms;
    Chris PeBenito cbca03
    	allow $1 lost_found_t:sock_file create_file_perms;
    Chris PeBenito cbca03
    	allow $1 lost_found_t:fifo_file create_file_perms;
    Chris PeBenito cbca03
    	allow $1 lost_found_t:lnk_file create_lnk_perms;
    Chris PeBenito cbca03
    ')
    Chris PeBenito cbca03
    Chris PeBenito cbca03
    ########################################
    Chris PeBenito 80436b
    #
    Chris PeBenito 80436b
    # files_search_mnt(domain)
    Chris PeBenito 80436b
    #
    Chris PeBenito 80436b
    interface(`files_search_mnt',`
    Chris PeBenito 80436b
    	gen_require(`
    Chris PeBenito 80436b
    		type mnt_t;
    Chris PeBenito 80436b
    		class dir search;
    Chris PeBenito 80436b
    	')
    Chris PeBenito 80436b
    Chris PeBenito 80436b
    	allow $1 mnt_t:dir search;
    Chris PeBenito 80436b
    ')
    Chris PeBenito 80436b
    Chris PeBenito 80436b
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_list_mnt(domain)
    Chris PeBenito d490eb
    #
    Chris PeBenito 199895
    interface(`files_list_mnt',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type mnt_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito dd8229
    	allow $1 mnt_t:dir r_dir_perms;
    Chris PeBenito d490eb
    ')
    Chris PeBenito d490eb
    Chris PeBenito d490eb
    ########################################
    Chris PeBenito ebdc3b
    ## <summary>
    Chris PeBenito a42ca7
    ##	Create, read, write, and delete directories in /mnt.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain allowed access.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_manage_mnt_dirs',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type mnt_t;
    Chris PeBenito a42ca7
    		class dir create_dir_perms;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	allow $1 mnt_t:dir create_dir_perms;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito ae9e27
    ##	List world-readable directories.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ##	Domain allowed access.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_list_world_readable',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type readable_t;
    Chris PeBenito ae9e27
    		class dir r_dir_perms;
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	allow $1 readable_t:dir r_dir_perms;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito ae9e27
    ##	Read world-readable files.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ##	Domain allowed access.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_read_world_readable_files',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type readable_t;
    Chris PeBenito ae9e27
    		class file r_file_perms;
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	allow $1 readable_t:file r_file_perms;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito ae9e27
    ##	Read world-readable symbolic links.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ##	Domain allowed access.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_read_world_readable_symlinks',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type readable_t;
    Chris PeBenito ae9e27
    		class lnk_file r_file_perms;
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	allow $1 readable_t:lnk_file r_file_perms;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito ae9e27
    ##	Read world-readable named pipes.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ##	Domain allowed access.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_read_world_readable_pipes',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type readable_t;
    Chris PeBenito ae9e27
    		class fifo_file r_file_perms;
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	allow $1 readable_t:fifo_file r_file_perms;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito ae9e27
    ##	Read world-readable sockets.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ##	Domain allowed access.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_read_world_readable_sockets',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type readable_t;
    Chris PeBenito ae9e27
    		class sock_file r_file_perms;
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	allow $1 readable_t:sock_file r_file_perms;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito ebdc3b
    ##	Search the tmp directory (/tmp)
    Chris PeBenito ebdc3b
    ## </summary>
    Chris PeBenito ebdc3b
    ## <param name="domain">
    Chris PeBenito ebdc3b
    ##	The type of the process performing this action.
    Chris PeBenito ebdc3b
    ## </param>
    Chris PeBenito ebdc3b
    #
    Chris PeBenito ebdc3b
    interface(`files_search_tmp',`
    Chris PeBenito ebdc3b
    	gen_require(`
    Chris PeBenito ebdc3b
    		type tmp_t;
    Chris PeBenito ebdc3b
    		class dir search;
    Chris PeBenito ebdc3b
    	')
    Chris PeBenito ebdc3b
    Chris PeBenito ebdc3b
    	allow $1 tmp_t:dir search;
    Chris PeBenito ebdc3b
    ')
    Chris PeBenito ebdc3b
    Chris PeBenito ebdc3b
    ########################################
    Chris PeBenito d490eb
    #
    Chris PeBenito c9428d
    # files_create_tmp_files(domain,private_type,[object class(es)])
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_create_tmp_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type tmp_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_delete_all_tmp_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_delete_all_tmp_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute tmpfile;
    Chris PeBenito cbc9d6
    		class dir { getattr search read write add_name remove_name rmdir };
    Chris PeBenito cbc9d6
    		class file { getattr unlink };
    Chris PeBenito cbc9d6
    		class lnk_file { getattr unlink };
    Chris PeBenito cbc9d6
    		class fifo_file { getattr unlink };
    Chris PeBenito cbc9d6
    		class sock_file { getattr unlink };
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_search_usr(domain)
    Chris PeBenito efd8ed
    #
    Chris PeBenito 199895
    interface(`files_search_usr',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type usr_t;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 usr_t: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 199895
    interface(`files_read_usr_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type usr_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file r_file_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Execute programs in /usr/src in the caller domain.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the process performing this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito daa0e0
    #
    Chris PeBenito 199895
    interface(`files_exec_usr_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type usr_t, src_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 daa0e0
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    # files_read_usr_src_files(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    interface(`files_read_usr_src_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type usr_t, src_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file r_file_perms;
    Chris PeBenito cbc9d6
    		class lnk_file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_search_var(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_search_var',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_t:dir search;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito d0eddb
    ########################################
    Chris PeBenito d0eddb
    #
    Chris PeBenito c9428d
    # files_dontaudit_search_var(domain)
    Chris PeBenito d0eddb
    #
    Chris PeBenito 199895
    interface(`files_dontaudit_search_var',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 var_t:dir search;
    Chris PeBenito d0eddb
    ')
    Chris PeBenito d0eddb
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito 58c3da
    ## <summary>
    Chris PeBenito 58c3da
    ##	Read files in the /var directory.
    Chris PeBenito 58c3da
    ## </summary>
    Chris PeBenito 58c3da
    ## <param name="domain">
    Chris PeBenito 58c3da
    ##	The type of the process performing this action.
    Chris PeBenito 58c3da
    ## </param>
    Chris PeBenito 58c3da
    #
    Chris PeBenito 8fd367
    interface(`files_read_var_files',`
    Chris PeBenito 58c3da
    	gen_require(`
    Chris PeBenito 58c3da
    		type var_t;
    Chris PeBenito 58c3da
    		class dir search;
    Chris PeBenito 58c3da
    		class file r_file_perms;
    Chris PeBenito 58c3da
    	')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    	allow $1 var_t:dir search;
    Chris PeBenito 58c3da
    	allow $1 var_t:file r_file_perms;
    Chris PeBenito 58c3da
    ')
    Chris PeBenito 58c3da
    Chris PeBenito 58c3da
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito ae9e27
    ##	Read symbolic links in the /var directory.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ## <param name="domain">
    Chris PeBenito ae9e27
    ##	Domain allowed access.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_read_var_symlink',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type var_t;
    Chris PeBenito ae9e27
    		class dir search;
    Chris PeBenito ae9e27
    		class lnk_file { getattr read };
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	allow $1 var_t:dir search;
    Chris PeBenito ae9e27
    	allow $1 var_t:lnk_file { getattr read };
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito 414e41
    ##	Search the /var/lib directory.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the process performing this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito 7a2f20
    #
    Chris PeBenito 199895
    interface(`files_search_var_lib',`
    Chris PeBenito 7a2f20
    	gen_require(`
    Chris PeBenito 7a2f20
    		type var_t, var_lib_t;
    Chris PeBenito 7a2f20
    		class dir search;
    Chris PeBenito 7a2f20
    	')
    Chris PeBenito 7a2f20
    Chris PeBenito 7a2f20
    	allow $1 { var_t var_lib_t }:dir search;
    Chris PeBenito 7a2f20
    ')
    Chris PeBenito 7a2f20
    Chris PeBenito 7a2f20
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_manage_urandom_seed(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_manage_urandom_seed',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_lib_t;
    Chris PeBenito cbc9d6
    		class dir rw_file_perms;
    Chris PeBenito cbc9d6
    		class file { getattr create read write setattr unlink };
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito ae9e27
    # files_search_locks(domain)
    Chris PeBenito ebdc3b
    #
    Chris PeBenito ae9e27
    interface(`files_search_locks',`
    Chris PeBenito ebdc3b
    	gen_require(`
    Chris PeBenito ebdc3b
    		type var_t;
    Chris PeBenito ebdc3b
    		type var_lock_t;
    Chris PeBenito ebdc3b
    		class dir search;
    Chris PeBenito ebdc3b
    	')
    Chris PeBenito ebdc3b
    Chris PeBenito ebdc3b
    	allow $1 { var_t var_lock_t }:dir search;
    Chris PeBenito ebdc3b
    ')
    Chris PeBenito ebdc3b
    Chris PeBenito ebdc3b
    ########################################
    Chris PeBenito ae9e27
    ## <summary>
    Chris PeBenito ae9e27
    ##	Do not audit attempts to search the
    Chris PeBenito ae9e27
    ##	locks directory (/var/lock).
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito ae9e27
    ## <param name="domain">
    Chris PeBenito ae9e27
    ##	Domain to not audit.
    Chris PeBenito ae9e27
    ## </param>
    Chris PeBenito ae9e27
    #
    Chris PeBenito ae9e27
    interface(`files_dontaudit_search_locks',`
    Chris PeBenito ae9e27
    	gen_require(`
    Chris PeBenito ae9e27
    		type var_lock_t;
    Chris PeBenito ae9e27
    		class dir search;
    Chris PeBenito ae9e27
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	dontaudit $1 var_lock_t:dir search;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito ebdc3b
    #
    Chris PeBenito 8fd367
    # files_getattr_generic_locks(domain)
    Chris PeBenito dc771f
    #
    Chris PeBenito 8fd367
    interface(`files_getattr_generic_locks',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito ebdc3b
    		type var_t;
    Chris PeBenito cbc9d6
    		type var_lock_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file getattr;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito ebdc3b
    	allow $1 var_t:dir search;
    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 dc771f
    ########################################
    Chris PeBenito dc771f
    #
    Chris PeBenito 8fd367
    # files_manage_generic_locks(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    interface(`files_manage_generic_locks',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_lock_t;
    Chris PeBenito cbc9d6
    		class dir { getattr search create read write setattr add_name remove_name rmdir };
    Chris PeBenito cbc9d6
    		class file { getattr create read write setattr unlink };
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    # files_delete_all_locks(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    interface(`files_delete_all_locks',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute lockfile;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    		class file { getattr unlink };
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito 8fd367
    # files_create_lock(domain,private_type,[object class(es)])
    Chris PeBenito 075c4f
    #
    Chris PeBenito 8fd367
    interface(`files_create_lock',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_lock_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    	')
    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 075c4f
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito a42ca7
    ##	Do not audit attempts to get the attributes
    Chris PeBenito a42ca7
    ##	of the /var/run directory.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito a42ca7
    ## <param name="domain">
    Chris PeBenito a42ca7
    ##	Domain to not audit.
    Chris PeBenito a42ca7
    ## </param>
    Chris PeBenito a42ca7
    #
    Chris PeBenito a42ca7
    interface(`files_dontaudit_getattr_pid_dir',`
    Chris PeBenito a42ca7
    	gen_require(`
    Chris PeBenito a42ca7
    		type var_run_t;
    Chris PeBenito a42ca7
    		class dir getattr;
    Chris PeBenito a42ca7
    	')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    	dontaudit $1 var_run_t:dir getattr;
    Chris PeBenito a42ca7
    ')
    Chris PeBenito a42ca7
    Chris PeBenito a42ca7
    ########################################
    Chris PeBenito 075c4f
    #
    Chris PeBenito c9428d
    # files_search_pids(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_search_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_run_t;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    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 b4cd15
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito c9428d
    # files_dontaudit_search_pids(domain)
    Chris PeBenito 075c4f
    #
    Chris PeBenito 199895
    interface(`files_dontaudit_search_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_run_t;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	allow $1 var_run_t: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 199895
    interface(`files_list_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_run_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    	')
    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 a266e3
    ########################################
    Chris PeBenito a266e3
    #
    Chris PeBenito c9428d
    # files_create_pid(domain,pidfile,[object class(es)])
    Chris PeBenito a266e3
    #
    Chris PeBenito 199895
    interface(`files_create_pid',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_run_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    	')
    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 3ce6cb
    ########################################
    Chris PeBenito 3ce6cb
    #
    Chris PeBenito c9428d
    # files_rw_generic_pids(domain)
    Chris PeBenito 3ce6cb
    #
    Chris PeBenito 199895
    interface(`files_rw_generic_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_run_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file rw_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 3ce6cb
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Do not audit attempts to write to daemon runtime data files.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the process performing this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito dc771f
    #
    Chris PeBenito 199895
    interface(`files_dontaudit_write_all_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute pidfile;
    Chris PeBenito cbc9d6
    		class file write;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 pidfile:file write;
    Chris PeBenito dc771f
    ')
    Chris PeBenito dc771f
    Chris PeBenito dc771f
    ########################################
    Chris PeBenito a42ca7
    ## <summary>
    Chris PeBenito 414e41
    ##	Do not audit attempts to ioctl daemon runtime data files.
    Chris PeBenito a42ca7
    ## </summary>
    Chris PeBenito 414e41
    ## <param name="domain">
    Chris PeBenito 414e41
    ##	The type of the process performing this action.
    Chris PeBenito 414e41
    ## </param>
    Chris PeBenito dc771f
    #
    Chris PeBenito 199895
    interface(`files_dontaudit_ioctl_all_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute pidfile;
    Chris PeBenito cbc9d6
    		class file ioctl;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 0c73cd
    	dontaudit $1 pidfile: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 199895
    interface(`files_read_all_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute pidfile;
    Chris PeBenito cbc9d6
    		type var_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 d115b2
    ########################################
    Chris PeBenito d115b2
    #
    Chris PeBenito c9428d
    # files_delete_all_pids(domain)
    Chris PeBenito 3ce6cb
    #
    Chris PeBenito 199895
    interface(`files_delete_all_pids',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute pidfile;
    Chris PeBenito cbc9d6
    		type var_t, var_run_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    		class file { getattr unlink };
    Chris PeBenito cbc9d6
    		class lnk_file { getattr unlink };
    Chris PeBenito cbc9d6
    		class sock_file { getattr unlink };
    Chris PeBenito cbc9d6
    	')
    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 7bba9d
    ########################################
    Chris PeBenito 7bba9d
    #
    Chris PeBenito c9428d
    # files_search_spool(domain)
    Chris PeBenito 7bba9d
    #
    Chris PeBenito 199895
    interface(`files_search_spool',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_spool_t;
    Chris PeBenito cbc9d6
    		class dir search;
    Chris PeBenito cbc9d6
    	')
    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 7bba9d
    ########################################
    Chris PeBenito 7bba9d
    #
    Chris PeBenito c9428d
    # files_list_spool(domain)
    Chris PeBenito 7bba9d
    #
    Chris PeBenito 199895
    interface(`files_list_spool',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_spool_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    	')
    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 efd8ed
    ########################################
    Chris PeBenito efd8ed
    #
    Chris PeBenito 8fd367
    # files_manage_generic_spool_dirs(domain)
    Chris PeBenito 96ce00
    #
    Chris PeBenito 8fd367
    interface(`files_manage_generic_spool_dirs',`
    Chris PeBenito 96ce00
    	gen_require(`
    Chris PeBenito 96ce00
    		type var_t, var_spool_t;
    Chris PeBenito 96ce00
    		class dir create_dir_perms;
    Chris PeBenito 96ce00
    	')
    Chris PeBenito 96ce00
    Chris PeBenito 96ce00
    	allow $1 var_t:dir search;
    Chris PeBenito 96ce00
    	allow $1 var_spool_t:dir create_dir_perms;
    Chris PeBenito 96ce00
    ')
    Chris PeBenito 96ce00
    Chris PeBenito 96ce00
    ########################################
    Chris PeBenito 96ce00
    #
    Chris PeBenito 8fd367
    # files_read_generic_spools(domain)
    Chris PeBenito efd8ed
    #
    Chris PeBenito 8fd367
    interface(`files_read_generic_spools',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_spool_t;
    Chris PeBenito cbc9d6
    		class dir r_dir_perms;
    Chris PeBenito cbc9d6
    		class file r_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 efd8ed
    ########################################
    Chris PeBenito efd8ed
    #
    Chris PeBenito 8fd367
    # files_manage_generic_spools(domain)
    Chris PeBenito efd8ed
    #
    Chris PeBenito 8fd367
    interface(`files_manage_generic_spools',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t, var_spool_t;
    Chris PeBenito cbc9d6
    		class dir rw_dir_perms;
    Chris PeBenito cbc9d6
    		class file create_file_perms;
    Chris PeBenito cbc9d6
    	')
    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 9726b3
    Chris PeBenito 9726b3
    ########################################
    Chris PeBenito 9726b3
    ## <summary>
    Chris PeBenito 9726b3
    ##	Unconfined access to files.
    Chris PeBenito 9726b3
    ## </summary>
    Chris PeBenito 9726b3
    ## <param name="domain">
    Chris PeBenito 9726b3
    ##	Domain allowed access.
    Chris PeBenito 9726b3
    ## </param>
    Chris PeBenito 9726b3
    #
    Chris PeBenito 9726b3
    interface(`files_unconfined',`
    Chris PeBenito 9726b3
    	gen_require(`
    Chris PeBenito 9726b3
    		attribute file_type;
    Chris PeBenito 9726b3
    		class unix_stream_socket name_bind;
    Chris PeBenito 9726b3
    		class unix_dgram_socket name_bind;
    Chris PeBenito 9726b3
    	')
    Chris PeBenito 9726b3
    Chris PeBenito 9726b3
    	# Create/access any file in a labeled filesystem;
    Chris PeBenito 9726b3
    	allow $1 file_type:{ file chr_file } ~execmod;
    Chris PeBenito 9726b3
    	allow $1 file_type:{ dir lnk_file sock_file fifo_file blk_file } *;
    Chris PeBenito 9726b3
    Chris PeBenito 9726b3
    	# Mount/unmount any filesystem with the context= option. 
    Chris PeBenito 9726b3
    	allow $1 file_type:filesystem *;
    Chris PeBenito 9726b3
    Chris PeBenito 9726b3
    	# Bind to any network address.
    Chris PeBenito 9726b3
    	# cjp: need to check this, I dont think this has any effect.
    Chris PeBenito 9726b3
    	allow $1 file_type:{ unix_stream_socket unix_dgram_socket } name_bind;
    Chris PeBenito 9726b3
    ')