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 d8636f
    ## <summary>
    Chris PeBenito d8636f
    ##	Make the specified type usable for files
    Chris PeBenito d8636f
    ##	in a filesystem.
    Chris PeBenito d8636f
    ## </summary>
    Chris PeBenito d8636f
    ## <param name="type">
    Chris PeBenito d8636f
    ##	Type to be used for files.
    Chris PeBenito d8636f
    ## </param>
    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 cff75c
    ## <summary>
    Chris PeBenito a1fcff
    ##	Make the specified type a 
    Chris PeBenito 9bbc75
    ##	configuration file.
    Chris PeBenito 9bbc75
    ## </summary>
    Chris PeBenito 9bbc75
    ## <param name="file_type">
    Chris PeBenito 9bbc75
    ##	Type to be used as a configuration file.
    Chris PeBenito 9bbc75
    ## </param>
    Chris PeBenito 9bbc75
    #
    Chris PeBenito 9bbc75
    interface(`files_config_file',`
    Chris PeBenito 9bbc75
    	gen_require(`
    Chris PeBenito 9bbc75
    		attribute usercanread;
    Chris PeBenito 9bbc75
    	')
    Chris PeBenito 9bbc75
    Chris PeBenito 9bbc75
    	files_type($1)
    Chris PeBenito 9bbc75
    Chris PeBenito 9bbc75
    	# this is a hack and should be removed.
    Chris PeBenito 9bbc75
    	typeattribute $1 usercanread;
    Chris PeBenito 9bbc75
    ')
    Chris PeBenito 9bbc75
    Chris PeBenito 9bbc75
    ########################################
    Chris PeBenito 9bbc75
    ## <summary>
    Chris PeBenito 9bbc75
    ##	Make the specified type a 
    Chris PeBenito a1fcff
    ##	polyinstantiated directory.
    Chris PeBenito a1fcff
    ## </summary>
    Chris PeBenito a1fcff
    ## <param name="file_type">
    Chris PeBenito a1fcff
    ##	Type of the file to be used as a
    Chris PeBenito a1fcff
    ##	polyinstantiated directory.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_poly',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		attribute polydir;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	files_type($1)
    Chris PeBenito a1fcff
    	typeattribute $1 polydir;
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    ## <summary>
    Chris PeBenito a1fcff
    ##	Make the specified type a parent
    Chris PeBenito a1fcff
    ##	of a polyinstantiated directory.
    Chris PeBenito a1fcff
    ## </summary>
    Chris PeBenito a1fcff
    ## <param name="file_type">
    Chris PeBenito a1fcff
    ##	Type of the file to be used as a
    Chris PeBenito a1fcff
    ##	parent directory.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_poly_parent',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		attribute polyparent;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	files_type($1)
    Chris PeBenito a1fcff
    	typeattribute $1 polyparent;
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    ## <summary>
    Chris PeBenito a1fcff
    ##	Make the specified type a
    Chris PeBenito a1fcff
    ##	polyinstantiation member directory.
    Chris PeBenito a1fcff
    ## </summary>
    Chris PeBenito a1fcff
    ## <param name="file_type">
    Chris PeBenito a1fcff
    ##	Type of the file to be used as a
    Chris PeBenito a1fcff
    ##	member directory.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_poly_member',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		attribute polymember;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	files_type($1)
    Chris PeBenito a1fcff
    	typeattribute $1 polymember;
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    ## <summary>
    Chris PeBenito a1fcff
    ##	Make the domain use the specified
    Chris PeBenito a1fcff
    ##	type of polyinstantiated directory.
    Chris PeBenito a1fcff
    ## </summary>
    Chris PeBenito a1fcff
    ## <param name="domain">
    Chris PeBenito a1fcff
    ##	Domain using the polyinstantiated
    Chris PeBenito a1fcff
    ##	directory.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    ## <param name="file_type">
    Chris PeBenito a1fcff
    ##	Type of the file to be used as a
    Chris PeBenito a1fcff
    ##	member directory.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_poly_member_tmp',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		type tmp_t;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	type_member $1 tmp_t:dir $2;
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    ## <summary>
    Chris PeBenito a2868f
    ##	Make the specified type a file that
    Chris PeBenito a2868f
    ##	should not be dontaudited from
    Chris PeBenito a2868f
    ##	browsing from user domains.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="file_type">
    Chris PeBenito a2868f
    ##	Type of the file to be used as a
    Chris PeBenito a2868f
    ##	member directory.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_security_file',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	files_type($1)
    Chris PeBenito a2868f
    	typeattribute $1 security_file_type;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito cff75c
    ##	Make the specified type a file
    Chris PeBenito cff75c
    ##	used for temporary files.
    Chris PeBenito cff75c
    ## </summary>
    Chris PeBenito cff75c
    ## <param name="file_type">
    Chris PeBenito cff75c
    ##	Type of the file to be used as a
    Chris PeBenito cff75c
    ##	temporary file.
    Chris PeBenito cff75c
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito 199895
    interface(`files_tmp_file',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute tmpfile;
    Chris PeBenito a1fcff
    		type tmp_t;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 8fd367
    	files_type($1)
    Chris PeBenito a1fcff
    	files_poly_member($1)
    Chris PeBenito cff75c
    	fs_associate_tmpfs($1)
    Chris PeBenito 0c73cd
    	typeattribute $1 tmpfile;
    Chris PeBenito a1fcff
    	allow $1 tmp_t:filesystem associate;
    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 50f650
    ## <summary>
    Chris PeBenito 50f650
    ##	Get the attributes of all directories.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain allowed access.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito a2d824
    #
    Chris PeBenito d8636f
    # cjp: this is an odd interface, because to getattr
    Chris PeBenito d8636f
    # all dirs, you need to search all the parent directories
    Chris PeBenito d8636f
    #
    Chris PeBenito 50f650
    interface(`files_getattr_all_dirs',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class dir { getattr search };
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	allow $1 file_type:dir { getattr search };
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito 50f650
    ##	Do not audit attempts to get the attributes
    Chris PeBenito 50f650
    ##	of all directories.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain to not audit.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_dontaudit_getattr_all_dirs',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class dir getattr;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	dontaudit $1 file_type:dir getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito efd8ed
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 052c95
    ## <summary>
    Chris PeBenito d8636f
    ##	Search all directories.
    Chris PeBenito d8636f
    ## </summary>
    Chris PeBenito d8636f
    ## <param name="domain">
    Chris PeBenito d8636f
    ##	Domain allowed access.
    Chris PeBenito d8636f
    ## </param>
    Chris PeBenito d8636f
    #
    Chris PeBenito d8636f
    interface(`files_search_all',`
    Chris PeBenito d8636f
    	gen_require(`
    Chris PeBenito d8636f
    		attribute file_type;
    Chris PeBenito d8636f
    	')
    Chris PeBenito d8636f
    Chris PeBenito d8636f
    	allow $1 file_type:dir { getattr search };
    Chris PeBenito d8636f
    ')
    Chris PeBenito d8636f
    Chris PeBenito d8636f
    ########################################
    Chris PeBenito d8636f
    ## <summary>
    Chris PeBenito 052c95
    ##	List the contents of all directories.
    Chris PeBenito 052c95
    ## </summary>
    Chris PeBenito 052c95
    ## <param name="domain">
    Chris PeBenito 052c95
    ##	Domain allowed access.
    Chris PeBenito 052c95
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 052c95
    interface(`files_list_all_dirs',`
    Chris PeBenito 052c95
    	gen_require(`
    Chris PeBenito 052c95
    		attribute file_type;
    Chris PeBenito 052c95
    		class dir r_dir_perms;
    Chris PeBenito 052c95
    	')
    Chris PeBenito 052c95
    Chris PeBenito 052c95
    	allow $1 file_type:dir r_dir_perms;
    Chris PeBenito 052c95
    ')
    Chris PeBenito 052c95
    Chris PeBenito 052c95
    ########################################
    Chris PeBenito 052c95
    ## <summary>
    Chris PeBenito a2868f
    ##	Do not audit attempts to list all
    Chris PeBenito a2868f
    ##	non security directories.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="domain">
    Chris PeBenito a2868f
    ##	Domain to not audit.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_dontaudit_list_non_security',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute file_type, security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	dontaudit $1 { file_type -security_file_type }:dir r_dir_perms;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito 052c95
    ##	Get the attributes of all files.
    Chris PeBenito 052c95
    ## </summary>
    Chris PeBenito 052c95
    ## <param name="domain">
    Chris PeBenito 052c95
    ##	Domain allowed access.
    Chris PeBenito 052c95
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 199895
    interface(`files_getattr_all_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute file_type;
    Chris PeBenito 50f650
    		class dir search;
    Chris PeBenito cbc9d6
    		class file getattr;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 50f650
    	allow $1 file_type:dir search;
    Chris PeBenito 0c73cd
    	allow $1 file_type:file getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito 1f8a8b
    ##	Get the attributes of all sockets
    Chris PeBenito 1f8a8b
    ##	with the type of a file.
    Chris PeBenito 1f8a8b
    ## </summary>
    Chris PeBenito 1f8a8b
    ## <param name="domain">
    Chris PeBenito 1f8a8b
    ##	Domain allowed access.
    Chris PeBenito 1f8a8b
    ## </param>
    Chris PeBenito 1f8a8b
    #
    Chris PeBenito 1f8a8b
    # cjp: added for initrc_t/distro_redhat.  I
    Chris PeBenito 1f8a8b
    # do not think it has any effect.
    Chris PeBenito 1f8a8b
    interface(`files_getattr_all_file_type_sockets',`
    Chris PeBenito 1f8a8b
    	gen_require(`
    Chris PeBenito 1f8a8b
    		attribute file_type;
    Chris PeBenito 1f8a8b
    	')
    Chris PeBenito 1f8a8b
    Chris PeBenito 1f8a8b
    	allow $1 file_type:socket_class_set getattr;
    Chris PeBenito 1f8a8b
    ')
    Chris PeBenito 1f8a8b
    Chris PeBenito 1f8a8b
    ########################################
    Chris PeBenito 1f8a8b
    ## <summary>
    Chris PeBenito 50f650
    ##	Do not audit attempts to get the attributes
    Chris PeBenito 50f650
    ##	of all files.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain to not audit.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_dontaudit_getattr_all_files',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	dontaudit $1 file_type:file getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito a2868f
    ##	Do not audit attempts to get the attributes
    Chris PeBenito a2868f
    ##	of non security files.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="domain">
    Chris PeBenito a2868f
    ##	Domain to not audit.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_dontaudit_getattr_non_security_files',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute file_type, security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	dontaudit $1 { file_type -security_file_type }:file getattr;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito 052c95
    ##	Read all files.
    Chris PeBenito 052c95
    ## </summary>
    Chris PeBenito 052c95
    ## <param name="domain">
    Chris PeBenito 052c95
    ##	Domain allowed access.
    Chris PeBenito 052c95
    ## </param>
    Chris PeBenito 052c95
    #
    Chris PeBenito 052c95
    interface(`files_read_all_files',`
    Chris PeBenito 052c95
    	gen_require(`
    Chris PeBenito 052c95
    		attribute file_type;
    Chris PeBenito 052c95
    		class dir search;
    Chris PeBenito 052c95
    		class file r_file_perms;
    Chris PeBenito 052c95
    	')
    Chris PeBenito 052c95
    Chris PeBenito 052c95
    	allow $1 file_type:dir search;
    Chris PeBenito 052c95
    	allow $1 file_type:file r_file_perms;
    Chris PeBenito 052c95
    Chris PeBenito 052c95
    	optional_policy(`authlogin.te',`
    Chris PeBenito 052c95
    		auth_read_shadow($1)
    Chris PeBenito 052c95
    	')
    Chris PeBenito 052c95
    ')
    Chris PeBenito 052c95
    Chris PeBenito 052c95
    ########################################
    Chris PeBenito 052c95
    ## <summary>
    Chris PeBenito 43989f
    ##	Read all directories on the filesystem, except
    Chris PeBenito 43989f
    ##	the listed exceptions.
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the domain perfoming this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    ## <param name="exception_types" optional="true">
    Chris PeBenito 43989f
    ##	The types to be excluded.  Each type or attribute
    Chris PeBenito 43989f
    ##	must be negated by the caller.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 43989f
    interface(`files_read_all_dirs_except',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		attribute file_type;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    	allow $1 { file_type $2 }:dir r_dir_perms;
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito 43989f
    ##	Read all files on the filesystem, except
    Chris PeBenito 43989f
    ##	the listed exceptions.
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the domain perfoming this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    ## <param name="exception_types" optional="true">
    Chris PeBenito 43989f
    ##	The types to be excluded.  Each type or attribute
    Chris PeBenito 43989f
    ##	must be negated by the caller.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 43989f
    interface(`files_read_all_files_except',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		attribute file_type;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    	allow $1 { file_type $2 }:dir search;
    Chris PeBenito 43989f
    	allow $1 { file_type $2 }:file r_file_perms;
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito 43989f
    ##	Read all symbloic links on the filesystem, except
    Chris PeBenito 43989f
    ##	the listed exceptions.
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the domain perfoming this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    ## <param name="exception_types" optional="true">
    Chris PeBenito 43989f
    ##	The types to be excluded.  Each type or attribute
    Chris PeBenito 43989f
    ##	must be negated by the caller.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 43989f
    interface(`files_read_all_symlinks_except',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		attribute file_type;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    	allow $1 { file_type $2 }:dir search;
    Chris PeBenito 43989f
    	allow $1 { file_type $2 }:lnk_file r_file_perms;
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito 50f650
    ##	Get the attributes of all symbolic links.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain allowed access.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_getattr_all_symlinks',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class dir search;
    Chris PeBenito 50f650
    		class lnk_file getattr;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	allow $1 file_type:dir search;
    Chris PeBenito 0c73cd
    	allow $1 file_type:lnk_file getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito 50f650
    ##	Do not audit attempts to get the attributes
    Chris PeBenito 50f650
    ##	of all symbolic links.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain to not audit.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_dontaudit_getattr_all_symlinks',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class lnk_file getattr;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	dontaudit $1 file_type:lnk_file getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito a2868f
    ##	Do not audit attempts to get the attributes
    Chris PeBenito a2868f
    ##	of non security symbolic links.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="domain">
    Chris PeBenito a2868f
    ##	Domain to not audit.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_dontaudit_getattr_non_security_symlinks',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute file_type, security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	dontaudit $1 { file_type -security_file_type }:lnk_file getattr;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito a2868f
    ##	Do not audit attempts to get the attributes
    Chris PeBenito a2868f
    ##	of non security block devices.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="domain">
    Chris PeBenito a2868f
    ##	Domain to not audit.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_dontaudit_getattr_non_security_blk_dev',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute file_type, security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	dontaudit $1 { file_type -security_file_type }:blk_file getattr;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito a2868f
    ##	Do not audit attempts to get the attributes
    Chris PeBenito a2868f
    ##	of non security character devices.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="domain">
    Chris PeBenito a2868f
    ##	Domain to not audit.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_dontaudit_getattr_non_security_chr_dev',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute file_type, security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	dontaudit $1 { file_type -security_file_type }:chr_file getattr;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito 052c95
    ##	Read all symbolic links.
    Chris PeBenito 052c95
    ## </summary>
    Chris PeBenito 052c95
    ## <param name="domain">
    Chris PeBenito 052c95
    ##	Domain allowed access.
    Chris PeBenito 052c95
    ## </param>
    Chris PeBenito 052c95
    #
    Chris PeBenito 052c95
    interface(`files_read_all_symlinks',`
    Chris PeBenito 052c95
    	gen_require(`
    Chris PeBenito 052c95
    		attribute file_type;
    Chris PeBenito 052c95
    		class dir search;
    Chris PeBenito 052c95
    		class lnk_file { getattr read };
    Chris PeBenito 052c95
    	')
    Chris PeBenito 052c95
    Chris PeBenito 052c95
    	allow $1 file_type:dir search;
    Chris PeBenito 052c95
    	allow $1 file_type:lnk_file { getattr read };
    Chris PeBenito 052c95
    ')
    Chris PeBenito 052c95
    Chris PeBenito 052c95
    ########################################
    Chris PeBenito 052c95
    ## <summary>
    Chris PeBenito 50f650
    ##	Get the attributes of all named pipes.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain allowed access.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_getattr_all_pipes',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class dir search;
    Chris PeBenito 50f650
    		class fifo_file getattr;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	allow $1 file_type:dir search;
    Chris PeBenito 0c73cd
    	allow $1 file_type:fifo_file getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito 50f650
    ##	Do not audit attempts to get the attributes
    Chris PeBenito 50f650
    ##	of all named pipes.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain to not audit.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_dontaudit_getattr_all_pipes',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class fifo_file getattr;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	dontaudit $1 file_type:fifo_file getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito a2868f
    ##	Do not audit attempts to get the attributes
    Chris PeBenito a2868f
    ##	of non security named pipes.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="domain">
    Chris PeBenito a2868f
    ##	Domain to not audit.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_dontaudit_getattr_non_security_pipes',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute file_type, security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	dontaudit $1 { file_type -security_file_type }:fifo_file getattr;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito 50f650
    ##	Get the attributes of all named sockets.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain allowed access.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_getattr_all_sockets',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class dir search;
    Chris PeBenito 50f650
    		class sock_file getattr;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	allow $1 file_type:dir search;
    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 50f650
    ##	Do not audit attempts to get the attributes
    Chris PeBenito 50f650
    ##	of all named sockets.
    Chris PeBenito 50f650
    ## </summary>
    Chris PeBenito 50f650
    ## <param name="domain">
    Chris PeBenito 50f650
    ##	Domain to not audit.
    Chris PeBenito 50f650
    ## </param>
    Chris PeBenito 50f650
    #
    Chris PeBenito 50f650
    interface(`files_dontaudit_getattr_all_sockets',`
    Chris PeBenito 50f650
    	gen_require(`
    Chris PeBenito 50f650
    		attribute file_type;
    Chris PeBenito 50f650
    		class sock_file getattr;
    Chris PeBenito 50f650
    	')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    	dontaudit $1 file_type:sock_file getattr;
    Chris PeBenito 50f650
    ')
    Chris PeBenito 50f650
    Chris PeBenito 50f650
    ########################################
    Chris PeBenito 50f650
    ## <summary>
    Chris PeBenito a2868f
    ##	Do not audit attempts to get the attributes
    Chris PeBenito a2868f
    ##	of non security named sockets.
    Chris PeBenito a2868f
    ## </summary>
    Chris PeBenito a2868f
    ## <param name="domain">
    Chris PeBenito a2868f
    ##	Domain to not audit.
    Chris PeBenito a2868f
    ## </param>
    Chris PeBenito a2868f
    #
    Chris PeBenito a2868f
    interface(`files_dontaudit_getattr_non_security_sockets',`
    Chris PeBenito a2868f
    	gen_require(`
    Chris PeBenito a2868f
    		attribute file_type, security_file_type;
    Chris PeBenito a2868f
    	')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    	dontaudit $1 { file_type -security_file_type }:sock_file getattr;
    Chris PeBenito a2868f
    ')
    Chris PeBenito a2868f
    Chris PeBenito a2868f
    ########################################
    Chris PeBenito a2868f
    ## <summary>
    Chris PeBenito 10b1f3
    ##	Read all block nodes with file types.
    Chris PeBenito 10b1f3
    ## </summary>
    Chris PeBenito 10b1f3
    ## <param name="domain">
    Chris PeBenito 10b1f3
    ##	Domain allowed access.
    Chris PeBenito 10b1f3
    ## </param>
    Chris PeBenito 10b1f3
    #
    Chris PeBenito 10b1f3
    interface(`files_read_all_blk_nodes',`
    Chris PeBenito 10b1f3
    	gen_require(`
    Chris PeBenito 10b1f3
    		attribute file_type;
    Chris PeBenito 10b1f3
    	')
    Chris PeBenito 10b1f3
    Chris PeBenito 10b1f3
    	allow $1 file_type:dir search;
    Chris PeBenito 10b1f3
    	allow $1 file_type:blk_file { getattr read };
    Chris PeBenito 10b1f3
    ')
    Chris PeBenito 10b1f3
    Chris PeBenito 10b1f3
    ########################################
    Chris PeBenito 10b1f3
    ## <summary>
    Chris PeBenito 10b1f3
    ##	Read all character nodes with file types.
    Chris PeBenito 10b1f3
    ## </summary>
    Chris PeBenito 10b1f3
    ## <param name="domain">
    Chris PeBenito 10b1f3
    ##	Domain allowed access.
    Chris PeBenito 10b1f3
    ## </param>
    Chris PeBenito 10b1f3
    #
    Chris PeBenito 10b1f3
    interface(`files_read_all_chr_nodes',`
    Chris PeBenito 10b1f3
    	gen_require(`
    Chris PeBenito 10b1f3
    		attribute file_type;
    Chris PeBenito 10b1f3
    	')
    Chris PeBenito 10b1f3
    Chris PeBenito 10b1f3
    	allow $1 file_type:dir search;
    Chris PeBenito 10b1f3
    	allow $1 file_type:chr_file { getattr read };
    Chris PeBenito 10b1f3
    ')
    Chris PeBenito 10b1f3
    Chris PeBenito 10b1f3
    ########################################
    Chris PeBenito 10b1f3
    ## <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 71fe0f
    		class 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 71fe0f
    		class 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 71fe0f
    		class filesystem unmount;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito b11a75
    	allow $1 file_type:filesystem unmount;
    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
    	')
    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
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito da4fc9
    	dontaudit $1 root_t:file { getattr 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 11633b
    ##	Do not audit attempts to get the attributes of
    Chris PeBenito 11633b
    ##	directories with the default file type.
    Chris PeBenito 11633b
    ## </summary>
    Chris PeBenito 11633b
    ## <param name="domain">
    Chris PeBenito 11633b
    ##	Domain to not audit.
    Chris PeBenito 11633b
    ## </param>
    Chris PeBenito 11633b
    #
    Chris PeBenito 11633b
    interface(`files_dontaudit_getattr_default_dir',`
    Chris PeBenito 11633b
    	gen_require(`
    Chris PeBenito 11633b
    		type default_t;
    Chris PeBenito 11633b
    	')
    Chris PeBenito 11633b
    Chris PeBenito 11633b
    	dontaudit $1 default_t:dir getattr;
    Chris PeBenito 11633b
    ')
    Chris PeBenito 11633b
    Chris PeBenito 11633b
    ########################################
    Chris PeBenito 11633b
    ## <summary>
    Chris PeBenito 4fd520
    ##	Search the contents of directories with the default file type.
    Chris PeBenito 4fd520
    ## </summary>
    Chris PeBenito 4fd520
    ## <param name="domain">
    Chris PeBenito 4fd520
    ##	Domain allowed access.
    Chris PeBenito 4fd520
    ## </param>
    Chris PeBenito 4fd520
    #
    Chris PeBenito 4fd520
    interface(`files_search_default',`
    Chris PeBenito 4fd520
    	gen_require(`
    Chris PeBenito 4fd520
    		type default_t;
    Chris PeBenito 4fd520
    	')
    Chris PeBenito 4fd520
    Chris PeBenito 4fd520
    	allow $1 default_t:dir search;
    Chris PeBenito 4fd520
    ')
    Chris PeBenito 4fd520
    Chris PeBenito 4fd520
    ########################################
    Chris PeBenito 4fd520
    ## <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
    	')
    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 a1fcff
    ##	Do not audit attempts to list contents of
    Chris PeBenito a1fcff
    ##	directories with the default file type.
    Chris PeBenito a1fcff
    ## </summary>
    Chris PeBenito a1fcff
    ## <param name="domain">
    Chris PeBenito a1fcff
    ##	Domain to not audit.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_dontaudit_list_default',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		type default_t;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	dontaudit $1 default_t:dir r_dir_perms;
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    ## <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
    	')
    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 11633b
    ##	Do not audit attempts to get the attributes of
    Chris PeBenito 11633b
    ##	files with the default file type.
    Chris PeBenito 11633b
    ## </summary>
    Chris PeBenito 11633b
    ## <param name="domain">
    Chris PeBenito 11633b
    ##	Domain to not audit.
    Chris PeBenito 11633b
    ## </param>
    Chris PeBenito 11633b
    #
    Chris PeBenito 11633b
    interface(`files_dontaudit_getattr_default_files',`
    Chris PeBenito 11633b
    	gen_require(`
    Chris PeBenito 11633b
    		type default_t;
    Chris PeBenito 11633b
    	')
    Chris PeBenito 11633b
    Chris PeBenito 11633b
    	dontaudit $1 default_t:file getattr;
    Chris PeBenito 11633b
    ')
    Chris PeBenito 11633b
    Chris PeBenito 11633b
    ########################################
    Chris PeBenito 11633b
    ## <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
    	')
    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 a1fcff
    ##	Do not audit attempts to read files
    Chris PeBenito a1fcff
    ##	with the default file type.
    Chris PeBenito a1fcff
    ## </summary>
    Chris PeBenito a1fcff
    ## <param name="domain">
    Chris PeBenito a1fcff
    ##	Domain to not audit.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_dontaudit_read_default_files',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		type default_t;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	dontaudit $1 default_t:file r_file_perms;
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    ## <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 21468a
    ## <summary>
    Chris PeBenito 21468a
    ##	Read files in /etc that are dynamically
    Chris PeBenito 21468a
    ##	created on boot, such as mtab.
    Chris PeBenito 21468a
    ## </summary>
    Chris PeBenito 21468a
    ## <param name="domain">
    Chris PeBenito 21468a
    ##	Domain allowed access.
    Chris PeBenito 21468a
    ## </param>
    Chris PeBenito b4cd15
    #
    Chris PeBenito 21468a
    interface(`files_read_etc_runtime_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t, etc_runtime_t;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 21468a
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito 21468a
    	allow $1 etc_runtime_t:file r_file_perms;
    Chris PeBenito 88dd38
    	allow $1 etc_runtime_t:lnk_file { getattr read };
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito 21468a
    ## <summary>
    Chris PeBenito 21468a
    ##	Do not audit attempts to read files
    Chris PeBenito 21468a
    ##	in /etc that are dynamically
    Chris PeBenito 21468a
    ##	created on boot, such as mtab.
    Chris PeBenito 21468a
    ## </summary>
    Chris PeBenito 21468a
    ## <param name="domain">
    Chris PeBenito 21468a
    ##	Domain to not audit.
    Chris PeBenito 21468a
    ## </param>
    Chris PeBenito b4cd15
    #
    Chris PeBenito 21468a
    interface(`files_dontaudit_read_etc_runtime_files',`
    Chris PeBenito 21468a
    	gen_require(`
    Chris PeBenito 21468a
    		type etc_runtime_t;
    Chris PeBenito 21468a
    		class file { getattr read };
    Chris PeBenito 21468a
    	')
    Chris PeBenito 21468a
    Chris PeBenito 6af06c
    	dontaudit $1 etc_runtime_t:file { getattr read };
    Chris PeBenito 21468a
    ')
    Chris PeBenito 21468a
    Chris PeBenito 21468a
    ########################################
    Chris PeBenito 21468a
    ## <summary>
    Chris PeBenito fdae8e
    ##	Read and write files in /etc that are dynamically
    Chris PeBenito fdae8e
    ##	created on boot, such as mtab.
    Chris PeBenito fdae8e
    ## </summary>
    Chris PeBenito fdae8e
    ## <param name="domain">
    Chris PeBenito fdae8e
    ##	Domain allowed access.
    Chris PeBenito fdae8e
    ## </param>
    Chris PeBenito fdae8e
    #
    Chris PeBenito fdae8e
    interface(`files_rw_etc_runtime_files',`
    Chris PeBenito fdae8e
    	gen_require(`
    Chris PeBenito fdae8e
    		type etc_t, etc_runtime_t;
    Chris PeBenito fdae8e
    		class dir r_dir_perms;
    Chris PeBenito fdae8e
    		class file rw_file_perms;
    Chris PeBenito fdae8e
    	')
    Chris PeBenito fdae8e
    Chris PeBenito fdae8e
    	allow $1 etc_t:dir r_dir_perms;
    Chris PeBenito fdae8e
    	allow $1 etc_runtime_t:file rw_file_perms;
    Chris PeBenito fdae8e
    ')
    Chris PeBenito fdae8e
    Chris PeBenito fdae8e
    ########################################
    Chris PeBenito fdae8e
    ## <summary>
    Chris PeBenito 21468a
    ##	Create, read, write, and delete files in
    Chris PeBenito 21468a
    ##	/etc that are dynamically created on boot,
    Chris PeBenito 21468a
    ##	such as mtab.
    Chris PeBenito 21468a
    ## </summary>
    Chris PeBenito 21468a
    ## <param name="domain">
    Chris PeBenito 21468a
    ##	Domain allowed access.
    Chris PeBenito 21468a
    ## </param>
    Chris PeBenito b4cd15
    #
    Chris PeBenito 21468a
    interface(`files_manage_etc_runtime_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type etc_t, etc_runtime_t;
    Chris PeBenito 21468a
    		class dir rw_dir_perms;
    Chris PeBenito 21468a
    		class file create_file_perms;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 21468a
    	allow $1 etc_t:dir rw_dir_perms;
    Chris PeBenito 21468a
    	allow $1 etc_runtime_t:file create_file_perms;
    Chris PeBenito 21468a
    	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_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
    	')
    Chris PeBenito 58c3da
    Chris PeBenito e6a2ea
    	dontaudit $1 file_t:dir search_dir_perms;
    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 f33561
    ##	Get the attributes of the home directories root
    Chris PeBenito 0f707d
    ##	(/home).
    Chris PeBenito 0f707d
    ## </summary>
    Chris PeBenito 0f707d
    ## <param name="domain">
    Chris PeBenito 0f707d
    ##	The type of the process performing this action.
    Chris PeBenito 0f707d
    ## </param>
    Chris PeBenito 0f707d
    #
    Chris PeBenito 0f707d
    interface(`files_getattr_home_dir',`
    Chris PeBenito 0f707d
    	gen_require(`
    Chris PeBenito 0f707d
    		type home_root_t;
    Chris PeBenito 0f707d
    	')
    Chris PeBenito 0f707d
    Chris PeBenito f33561
    	allow $1 home_root_t:dir getattr;
    Chris PeBenito f33561
    ')
    Chris PeBenito f33561
    Chris PeBenito f33561
    ########################################
    Chris PeBenito f33561
    ## <summary>
    Chris PeBenito f33561
    ##	Do not audit attempts to get the
    Chris PeBenito f33561
    ##	attributes of the home directories root
    Chris PeBenito f33561
    ##	(/home).
    Chris PeBenito f33561
    ## </summary>
    Chris PeBenito f33561
    ## <param name="domain">
    Chris PeBenito f33561
    ##	Domain to not audit.
    Chris PeBenito f33561
    ## </param>
    Chris PeBenito f33561
    #
    Chris PeBenito f33561
    interface(`files_dontaudit_getattr_home_dir',`
    Chris PeBenito f33561
    	gen_require(`
    Chris PeBenito f33561
    		type home_root_t;
    Chris PeBenito f33561
    	')
    Chris PeBenito f33561
    Chris PeBenito f33561
    	dontaudit $1 home_root_t:dir getattr;
    Chris PeBenito 0f707d
    ')
    Chris PeBenito 0f707d
    Chris PeBenito 0f707d
    ########################################
    Chris PeBenito 0f707d
    ## <summary>
    Chris PeBenito 0f707d
    ##	Search home directories root (/home).
    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
    	')
    Chris PeBenito fd89e1
    Chris PeBenito e6a2ea
    	allow $1 home_root_t:dir search_dir_perms;
    Chris PeBenito fd89e1
    ')
    Chris PeBenito fd89e1
    Chris PeBenito fd89e1
    ########################################
    Chris PeBenito fd89e1
    ## <summary>
    Chris PeBenito 0f707d
    ##	Do not audit attempts to search
    Chris PeBenito 0f707d
    ##	home directories root (/home).
    Chris PeBenito dce68d
    ## </summary>
    Chris PeBenito dce68d
    ## <param name="domain">
    Chris PeBenito dce68d
    ##	Domain to not audit.
    Chris PeBenito dce68d
    ## </param>
    Chris PeBenito dce68d
    #
    Chris PeBenito dce68d
    interface(`files_dontaudit_search_home',`
    Chris PeBenito dce68d
    	gen_require(`
    Chris PeBenito dce68d
    		type home_root_t;
    Chris PeBenito dce68d
    	')
    Chris PeBenito dce68d
    Chris PeBenito e6a2ea
    	dontaudit $1 home_root_t:dir search_dir_perms;
    Chris PeBenito dce68d
    ')
    Chris PeBenito dce68d
    Chris PeBenito dce68d
    ########################################
    Chris PeBenito dce68d
    ## <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 84c922
    ##	Mount a filesystem on /mnt.
    Chris PeBenito 84c922
    ## </summary>
    Chris PeBenito 84c922
    ## <param name="domain">
    Chris PeBenito 84c922
    ##	Domain allowed access.
    Chris PeBenito 84c922
    ## </param>
    Chris PeBenito 84c922
    #
    Chris PeBenito 84c922
    interface(`files_mounton_mnt',`
    Chris PeBenito 84c922
    	gen_require(`
    Chris PeBenito 84c922
    		type mnt_t;
    Chris PeBenito 84c922
    		class dir { search mounton };
    Chris PeBenito 84c922
    	')
    Chris PeBenito 84c922
    Chris PeBenito 84c922
    	allow $1 mnt_t:dir { search mounton };
    Chris PeBenito 84c922
    ')
    Chris PeBenito 84c922
    Chris PeBenito 84c922
    ########################################
    Chris PeBenito 84c922
    ## <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 dce68d
    ##	Create, read, write, and delete files in /mnt.
    Chris PeBenito dce68d
    ## </summary>
    Chris PeBenito dce68d
    ## <param name="domain">
    Chris PeBenito dce68d
    ##	Domain allowed access.
    Chris PeBenito dce68d
    ## </param>
    Chris PeBenito dce68d
    #
    Chris PeBenito dce68d
    interface(`files_manage_mnt_files',`
    Chris PeBenito dce68d
    	gen_require(`
    Chris PeBenito dce68d
    		type mnt_t;
    Chris PeBenito dce68d
    		class dir rw_dir_perms;
    Chris PeBenito dce68d
    		class file create_file_perms;
    Chris PeBenito dce68d
    	')
    Chris PeBenito dce68d
    Chris PeBenito dce68d
    	allow $1 mnt_t:dir rw_dir_perms;
    Chris PeBenito dce68d
    	allow $1 mnt_t:file create_file_perms;
    Chris PeBenito dce68d
    ')
    Chris PeBenito dce68d
    Chris PeBenito dce68d
    ########################################
    Chris PeBenito dce68d
    ## <summary>
    Chris PeBenito dce68d
    ##	Create, read, write, and delete symbolic links in /mnt.
    Chris PeBenito dce68d
    ## </summary>
    Chris PeBenito dce68d
    ## <param name="domain">
    Chris PeBenito dce68d
    ##	Domain allowed access.
    Chris PeBenito dce68d
    ## </param>
    Chris PeBenito dce68d
    #
    Chris PeBenito dce68d
    interface(`files_manage_mnt_symlinks',`
    Chris PeBenito dce68d
    	gen_require(`
    Chris PeBenito dce68d
    		type mnt_t;
    Chris PeBenito dce68d
    		class dir rw_dir_perms;
    Chris PeBenito dce68d
    		class lnk_file create_lnk_perms;
    Chris PeBenito dce68d
    	')
    Chris PeBenito dce68d
    Chris PeBenito dce68d
    	allow $1 mnt_t:dir rw_dir_perms;
    Chris PeBenito dce68d
    	allow $1 mnt_t:lnk_file create_lnk_perms;
    Chris PeBenito dce68d
    ')
    Chris PeBenito dce68d
    Chris PeBenito dce68d
    ########################################
    Chris PeBenito dce68d
    ## <summary>
    Chris PeBenito ae9e27
    ##	List world-readable directories.
    Chris PeBenito ae9e27
    ## </summary>
    Chris PeBenito 4051d1
    ## <param name="domain">
    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 4051d1
    ## <param name="domain">
    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 4051d1
    ## <param name="domain">
    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 4051d1
    ## <param name="domain">
    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 4051d1
    ## <param name="domain">
    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 a1fcff
    ##	Allow the specified type to associate
    Chris PeBenito a1fcff
    ##	to a filesystem with the type of the
    Chris PeBenito a1fcff
    ##	temporary directory (/tmp).
    Chris PeBenito a1fcff
    ## </summary>
    Chris PeBenito a1fcff
    ## <param name="file_type">
    Chris PeBenito a1fcff
    ##	Type of the file to associate.
    Chris PeBenito a1fcff
    ## </param>
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_associate_tmp',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		type tmp_t;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	allow $1 tmp_t:filesystem associate;
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    ## <summary>
    Chris PeBenito 04926d
    ##	Get the	attributes of the tmp directory (/tmp).
    Chris PeBenito 04926d
    ## </summary>
    Chris PeBenito 04926d
    ## <param name="domain">
    Chris PeBenito 04926d
    ##	Domain allowed access.
    Chris PeBenito 04926d
    ## </param>
    Chris PeBenito 04926d
    #
    Chris PeBenito 04926d
    interface(`files_getattr_tmp_dir',`
    Chris PeBenito 04926d
    	gen_require(`
    Chris PeBenito 04926d
    		type tmp_t;
    Chris PeBenito 04926d
    	')
    Chris PeBenito 04926d
    Chris PeBenito 04926d
    	allow $1 tmp_t:dir getattr;
    Chris PeBenito 04926d
    ')
    Chris PeBenito 04926d
    Chris PeBenito 04926d
    ########################################
    Chris PeBenito 04926d
    ## <summary>
    Chris PeBenito 0f707d
    ##	Do not audit attempts to get the
    Chris PeBenito 0f707d
    ##	attributes of the tmp directory (/tmp).
    Chris PeBenito 0f707d
    ## </summary>
    Chris PeBenito 0f707d
    ## <param name="domain">
    Chris PeBenito 0f707d
    ##	The type of the process performing this action.
    Chris PeBenito 0f707d
    ## </param>
    Chris PeBenito 0f707d
    #
    Chris PeBenito 0f707d
    interface(`files_dontaudit_getattr_tmp_dir',`
    Chris PeBenito 0f707d
    	gen_require(`
    Chris PeBenito 0f707d
    		type tmp_t;
    Chris PeBenito 0f707d
    		class dir getattr;
    Chris PeBenito 0f707d
    	')
    Chris PeBenito 0f707d
    Chris PeBenito 0f707d
    	dontaudit $1 tmp_t:dir getattr;
    Chris PeBenito 0f707d
    ')
    Chris PeBenito 0f707d
    Chris PeBenito 0f707d
    ########################################
    Chris PeBenito 0f707d
    ## <summary>
    Chris PeBenito 43989f
    ##	Allow domain to getattr on /tmp directory.
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the process performing this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 43989f
    interface(`files_getattr_tmp_dir',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		type tmp_t;
    Chris PeBenito 43989f
    		class dir getattr;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    	allow $1 tmp_t:dir getattr;
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito ed78ea
    ##	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 ed78ea
    ## <summary>
    Chris PeBenito 43989f
    ##	Read the tmp directory (/tmp).
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the process performing this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 725926
    interface(`files_list_tmp',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		type tmp_t;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 725926
    	allow $1 tmp_t:dir list_dir_perms;
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito 43989f
    ##	Read files in the tmp directory (/tmp).
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the process performing this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 725926
    interface(`files_read_generic_tmp_files',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		type tmp_t;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 725926
    	allow $1 tmp_t:dir search_dir_perms;
    Chris PeBenito 43989f
    	allow $1 tmp_t:file r_file_perms;
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito 43989f
    ##	Read symbolic links in the tmp directory (/tmp).
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the process performing this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 725926
    interface(`files_read_generic_tmp_symlinks',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		type tmp_t;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 725926
    	allow $1 tmp_t:dir search_dir_perms;
    Chris PeBenito 43989f
    	allow $1 tmp_t:lnk_file r_file_perms;
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito ed78ea
    ##	Set the attributes of all tmp directories.
    Chris PeBenito ed78ea
    ## </summary>
    Chris PeBenito ed78ea
    ## <param name="domain">
    Chris PeBenito ed78ea
    ##	The type of the process performing this action.
    Chris PeBenito ed78ea
    ## </param>
    Chris PeBenito ed78ea
    #
    Chris PeBenito ed78ea
    interface(`files_setattr_all_tmp_dirs',`
    Chris PeBenito ed78ea
    	gen_require(`
    Chris PeBenito ed78ea
    		attribute tmpfile;
    Chris PeBenito ed78ea
    		class dir { search setattr };
    Chris PeBenito ed78ea
    	')
    Chris PeBenito ed78ea
    Chris PeBenito ed78ea
    	allow $1 tmpfile:dir { search getattr };
    Chris PeBenito ed78ea
    ')
    Chris PeBenito ed78ea
    Chris PeBenito ed78ea
    ########################################
    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 ed78ea
    # files_purge_tmp(domain)
    Chris PeBenito b4cd15
    #
    Chris PeBenito ed78ea
    interface(`files_purge_tmp',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		attribute tmpfile;
    Chris PeBenito ed78ea
    		class dir { rw_dir_perms rmdir };
    Chris PeBenito ed78ea
    		gen_require_set({ getattr unlink },notdevfile_class_set)
    Chris PeBenito ed78ea
    	')
    Chris PeBenito ed78ea
    Chris PeBenito ed78ea
    	allow $1 tmpfile:dir { rw_dir_perms rmdir };
    Chris PeBenito ed78ea
    	allow $1 tmpfile:notdevfile_class_set { 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 e78430
    ## <summary>
    Chris PeBenito 603f90
    ##	List the contents of generic
    Chris PeBenito 603f90
    ##	directories in /usr.
    Chris PeBenito 603f90
    ## </summary>
    Chris PeBenito 603f90
    ## <param name="domain">
    Chris PeBenito 603f90
    ##	Domain allowed access.
    Chris PeBenito 603f90
    ## </param>
    Chris PeBenito 603f90
    #
    Chris PeBenito 603f90
    interface(`files_list_usr',`
    Chris PeBenito 603f90
    	gen_require(`
    Chris PeBenito 603f90
    		type usr_t;
    Chris PeBenito 603f90
    		class dir r_dir_perms;
    Chris PeBenito 603f90
    	')
    Chris PeBenito 603f90
    Chris PeBenito 603f90
    	allow $1 usr_t:dir r_dir_perms;
    Chris PeBenito 603f90
    ')
    Chris PeBenito 603f90
    Chris PeBenito 603f90
    ########################################
    Chris PeBenito 603f90
    ## <summary>
    Chris PeBenito e78430
    ##	Get the attributes of files in /usr.
    Chris PeBenito e78430
    ## </summary>
    Chris PeBenito e78430
    ## <param name="domain">
    Chris PeBenito e78430
    ##	Domain allowed access.
    Chris PeBenito e78430
    ## </param>
    Chris PeBenito e78430
    #
    Chris PeBenito e78430
    interface(`files_getattr_usr_files',`
    Chris PeBenito e78430
    	gen_require(`
    Chris PeBenito e78430
    		type usr_t;
    Chris PeBenito e78430
    		class dir search;
    Chris PeBenito e78430
    		class file getattr;
    Chris PeBenito e78430
    	')
    Chris PeBenito e78430
    Chris PeBenito e78430
    	allow $1 usr_t:dir search;
    Chris PeBenito e78430
    	allow $1 usr_t:file getattr;
    Chris PeBenito e78430
    ')
    Chris PeBenito e78430
    Chris PeBenito e78430
    ########################################
    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 99505c
    ##	Execute generic programs in /usr in the caller domain.
    Chris PeBenito 99505c
    ## </summary>
    Chris PeBenito 99505c
    ## <param name="domain">
    Chris PeBenito 99505c
    ##	The type of the process performing this action.
    Chris PeBenito 99505c
    ## </param>
    Chris PeBenito 99505c
    #
    Chris PeBenito 99505c
    interface(`files_exec_usr_files',`
    Chris PeBenito 99505c
    	gen_require(`
    Chris PeBenito 99505c
    		type usr_t;
    Chris PeBenito 99505c
    	')
    Chris PeBenito 99505c
    Chris PeBenito 99505c
    	allow $1 usr_t:dir r_dir_perms;
    Chris PeBenito 99505c
    	allow $1 usr_t:lnk_file r_file_perms;
    Chris PeBenito 99505c
    	can_exec($1,usr_t)
    Chris PeBenito 99505c
    Chris PeBenito 99505c
    ')
    Chris PeBenito 99505c
    Chris PeBenito 99505c
    ########################################
    Chris PeBenito 99505c
    ## <summary>
    Chris PeBenito 5f38a6
    ##	Relabel a file to the type used in /usr.
    Chris PeBenito 5f38a6
    ## </summary>
    Chris PeBenito 5f38a6
    ## <param name="domain">
    Chris PeBenito 5f38a6
    ##	Domain allowed access.
    Chris PeBenito 5f38a6
    ## </param>
    Chris PeBenito 5f38a6
    #
    Chris PeBenito 5f38a6
    interface(`files_relabelto_usr_files',`
    Chris PeBenito 5f38a6
    	gen_require(`
    Chris PeBenito 5f38a6
    		type usr_t;
    Chris PeBenito 5f38a6
    		class file relabelto;
    Chris PeBenito 5f38a6
    	')
    Chris PeBenito 5f38a6
    Chris PeBenito 5f38a6
    	allow $1 usr_t:file relabelto;
    Chris PeBenito 5f38a6
    ')
    Chris PeBenito 5f38a6
    Chris PeBenito 5f38a6
    ########################################
    Chris PeBenito 5f38a6
    ## <summary>
    Chris PeBenito e78430
    ##	Read symbolic links in /usr.
    Chris PeBenito e78430
    ## </summary>
    Chris PeBenito e78430
    ## <param name="domain">
    Chris PeBenito e78430
    ##	Domain allowed access.
    Chris PeBenito e78430
    ## </param>
    Chris PeBenito e78430
    #
    Chris PeBenito e78430
    interface(`files_read_usr_symlinks',`
    Chris PeBenito e78430
    	gen_require(`
    Chris PeBenito e78430
    		type usr_t;
    Chris PeBenito e78430
    		class dir search;
    Chris PeBenito e78430
    		class file r_file_perms;
    Chris PeBenito e78430
    	')
    Chris PeBenito e78430
    Chris PeBenito e78430
    	allow $1 usr_t:dir search;
    Chris PeBenito e78430
    	allow $1 usr_t:lnk_file r_file_perms;
    Chris PeBenito e78430
    ')
    Chris PeBenito e78430
    Chris PeBenito e78430
    ########################################
    Chris PeBenito e78430
    ## <summary>
    Chris PeBenito ccc597
    ##	Create objects in the /usr directory
    Chris PeBenito ccc597
    ## </summary>
    Chris PeBenito ccc597
    ## <param name="domain">
    Chris PeBenito ccc597
    ##	Domain allowed access.
    Chris PeBenito ccc597
    ## </param>
    Chris PeBenito ccc597
    ## <param name="file_type">
    Chris PeBenito ccc597
    ##	The type of the object to be created
    Chris PeBenito ccc597
    ## </param>
    Chris PeBenito ccc597
    ## <param name="object_class" optional="true">
    Chris PeBenito ccc597
    ##	The object class.  If not specified, file is used.
    Chris PeBenito ccc597
    ## </param>
    Chris PeBenito ccc597
    #
    Chris PeBenito ccc597
    interface(`files_create_usr',`
    Chris PeBenito ccc597
    	gen_require(`
    Chris PeBenito ccc597
    		type usr_t;
    Chris PeBenito ccc597
    		class dir rw_dir_perms;
    Chris PeBenito ccc597
    	')
    Chris PeBenito ccc597
    Chris PeBenito ccc597
    	allow $1 usr_t:dir rw_dir_perms;
    Chris PeBenito ccc597
    Chris PeBenito ccc597
    	ifelse(`$3',`',`
    Chris PeBenito ccc597
    		type_transition $1 usr_t:file $2;
    Chris PeBenito ccc597
    	',`
    Chris PeBenito ccc597
    		type_transition $1 usr_t:$3 $2;
    Chris PeBenito ccc597
    	')
    Chris PeBenito ccc597
    ')
    Chris PeBenito ccc597
    Chris PeBenito ccc597
    ########################################
    Chris PeBenito ccc597
    ## <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 99505c
    interface(`files_exec_usr_src_files',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type usr_t, src_t;
    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 daa0e0
    ')
    Chris PeBenito daa0e0
    Chris PeBenito daa0e0
    ########################################
    Chris PeBenito b4cd15
    #
    Chris PeBenito 842859
    # files_dontaudit_search_src(domain)
    Chris PeBenito 842859
    #
    Chris PeBenito 842859
    interface(`files_dontaudit_search_src',`
    Chris PeBenito 99505c
    	gen_require(`
    Chris PeBenito 99505c
    		type src_t;
    Chris PeBenito 99505c
    	')
    Chris PeBenito 842859
    Chris PeBenito 725926
    	dontaudit $1 src_t:dir search;
    Chris PeBenito 842859
    ')
    Chris PeBenito 842859
    Chris PeBenito 842859
    ########################################
    Chris PeBenito 842859
    #
    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
    	')
    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 99505c
    ## <summary>
    Chris PeBenito 99505c
    ##	Search the contents of /var.
    Chris PeBenito 99505c
    ## </summary>
    Chris PeBenito 99505c
    ## <param name="domain">
    Chris PeBenito 99505c
    ##	Domain allowed access.
    Chris PeBenito 99505c
    ## </param>
    Chris PeBenito b4cd15
    #
    Chris PeBenito 199895
    interface(`files_search_var',`
    Chris PeBenito cbc9d6
    	gen_require(`
    Chris PeBenito cbc9d6
    		type var_t;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito d0eddb
    ########################################
    Chris PeBenito 99505c
    ## <summary>
    Chris PeBenito 99505c
    ##	Do not audit attempts to search
    Chris PeBenito 99505c
    ##	the contents of /var.
    Chris PeBenito 99505c
    ## </summary>
    Chris PeBenito 99505c
    ## <param name="domain">
    Chris PeBenito 99505c
    ##	Domain to not audit.
    Chris PeBenito 99505c
    ## </param>
    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
    	')
    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 99505c
    ##	List the contents of /var.
    Chris PeBenito 99505c
    ## </summary>
    Chris PeBenito 99505c
    ## <param name="domain">
    Chris PeBenito 99505c
    ##	Domain allowed access.
    Chris PeBenito 99505c
    ## </param>
    Chris PeBenito 99505c
    #
    Chris PeBenito 99505c
    interface(`files_list_var',`
    Chris PeBenito 99505c
    	gen_require(`
    Chris PeBenito 99505c
    		type var_t;
    Chris PeBenito 99505c
    	')
    Chris PeBenito 99505c
    Chris PeBenito 99505c
    	allow $1 var_t:dir r_dir_perms;
    Chris PeBenito 99505c
    ')
    Chris PeBenito 99505c
    Chris PeBenito 99505c
    ########################################
    Chris PeBenito 99505c
    ## <summary>
    Chris PeBenito 57a96c
    ##	Create, read, write, and delete directories
    Chris PeBenito 57a96c
    ##	in the /var directory.
    Chris PeBenito 57a96c
    ## </summary>
    Chris PeBenito 57a96c
    ## <param name="domain">
    Chris PeBenito 57a96c
    ##	Domain allowed access.
    Chris PeBenito 57a96c
    ## </param>
    Chris PeBenito 57a96c
    #
    Chris PeBenito 57a96c
    interface(`files_manage_var_dirs',`
    Chris PeBenito 57a96c
    	gen_require(`
    Chris PeBenito 57a96c
    		type var_t;
    Chris PeBenito 57a96c
    		class dir create_dir_perms;
    Chris PeBenito 57a96c
    	')
    Chris PeBenito 57a96c
    Chris PeBenito 57a96c
    	allow $1 var_t:dir create_dir_perms;
    Chris PeBenito 57a96c
    ')
    Chris PeBenito 57a96c
    Chris PeBenito 57a96c
    ########################################
    Chris PeBenito 57a96c
    ## <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
    	')
    Chris PeBenito 58c3da
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    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 57a96c
    ##	Create, read, write, and delete files in the /var directory.
    Chris PeBenito 57a96c
    ## </summary>
    Chris PeBenito 57a96c
    ## <param name="domain">
    Chris PeBenito 57a96c
    ##	Domain allowed access.
    Chris PeBenito 57a96c
    ## </param>
    Chris PeBenito 57a96c
    #
    Chris PeBenito 57a96c
    interface(`files_manage_var_files',`
    Chris PeBenito 57a96c
    	gen_require(`
    Chris PeBenito 57a96c
    		type var_t;
    Chris PeBenito 57a96c
    		class dir rw_dir_perms;
    Chris PeBenito 57a96c
    		class file create_file_perms;
    Chris PeBenito 57a96c
    	')
    Chris PeBenito 57a96c
    Chris PeBenito 57a96c
    	allow $1 var_t:dir rw_dir_perms;
    Chris PeBenito 57a96c
    	allow $1 var_t:file create_file_perms;
    Chris PeBenito 57a96c
    ')
    Chris PeBenito 57a96c
    Chris PeBenito 57a96c
    ########################################
    Chris PeBenito 57a96c
    ## <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
    	')
    Chris PeBenito ae9e27
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    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 57a96c
    ##	Create, read, write, and delete symbolic
    Chris PeBenito 57a96c
    ##	links in the /var directory.
    Chris PeBenito 57a96c
    ## </summary>
    Chris PeBenito 57a96c
    ## <param name="domain">
    Chris PeBenito 57a96c
    ##	Domain allowed access.
    Chris PeBenito 57a96c
    ## </param>
    Chris PeBenito 57a96c
    #
    Chris PeBenito 57a96c
    interface(`files_manage_var_symlinks',`
    Chris PeBenito 57a96c
    	gen_require(`
    Chris PeBenito 57a96c
    		type var_t;
    Chris PeBenito 57a96c
    	')
    Chris PeBenito 57a96c
    Chris PeBenito 57a96c
    	allow $1 var_t:dir rw_dir_perms;
    Chris PeBenito 57a96c
    	allow $1 var_t:lnk_file create_lnk_perms;
    Chris PeBenito 57a96c
    ')
    Chris PeBenito 57a96c
    Chris PeBenito 57a96c
    ########################################
    Chris PeBenito 57a96c
    ## <summary>
    Chris PeBenito ccc597
    ##	Create objects in the /var directory
    Chris PeBenito ccc597
    ## </summary>
    Chris PeBenito ccc597
    ## <param name="domain">
    Chris PeBenito ccc597
    ##	Domain allowed access.
    Chris PeBenito ccc597
    ## </param>
    Chris PeBenito ccc597
    ## <param name="file_type">
    Chris PeBenito ccc597
    ##	The type of the object to be created
    Chris PeBenito ccc597
    ## </param>
    Chris PeBenito ccc597
    ## <param name="object_class" optional="true">
    Chris PeBenito ccc597
    ##	The object class.  If not specified, file is used.
    Chris PeBenito ccc597
    ## </param>
    Chris PeBenito ccc597
    #
    Chris PeBenito ccc597
    interface(`files_create_var',`
    Chris PeBenito ccc597
    	gen_require(`
    Chris PeBenito ccc597
    		type var_t;
    Chris PeBenito ccc597
    		class dir rw_dir_perms;
    Chris PeBenito ccc597
    	')
    Chris PeBenito ccc597
    Chris PeBenito ccc597
    	allow $1 var_t:dir rw_dir_perms;
    Chris PeBenito ccc597
    Chris PeBenito ccc597
    	ifelse(`$3',`',`
    Chris PeBenito ccc597
    		type_transition $1 var_t:file $2;
    Chris PeBenito ccc597
    	',`
    Chris PeBenito ccc597
    		type_transition $1 var_t:$3 $2;
    Chris PeBenito ccc597
    	')
    Chris PeBenito ccc597
    ')
    Chris PeBenito ccc597
    Chris PeBenito ccc597
    ########################################
    Chris PeBenito ccc597
    ## <summary>
    Chris PeBenito 43989f
    ##	Search directories in /var/lib.
    Chris PeBenito 43989f
    ## </summary>
    Chris PeBenito 43989f
    ## <param name="domain">
    Chris PeBenito 43989f
    ##	The type of the process performing this action.
    Chris PeBenito 43989f
    ## </param>
    Chris PeBenito 43989f
    #
    Chris PeBenito 43989f
    interface(`files_search_var_lib_dir',`
    Chris PeBenito 43989f
    	gen_require(`
    Chris PeBenito 43989f
    		type var_t, var_lib_t;
    Chris PeBenito 43989f
    		class dir search;
    Chris PeBenito 43989f
    	')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    	allow $1 var_t:dir search;
    Chris PeBenito 43989f
    	allow $1 var_lib_t:dir search;
    Chris PeBenito 43989f
    ')
    Chris PeBenito 43989f
    Chris PeBenito 43989f
    ########################################
    Chris PeBenito 43989f
    ## <summary>
    Chris PeBenito b24f35
    ##	Get the attributes of the /var/lib directory.
    Chris PeBenito b24f35
    ## </summary>
    Chris PeBenito b24f35
    ## <param name="domain">
    Chris PeBenito b24f35
    ##	The type of the process performing this action.
    Chris PeBenito b24f35
    ## </param>
    Chris PeBenito b24f35
    #
    Chris PeBenito b24f35
    interface(`files_getattr_var_lib_dir',`
    Chris PeBenito b24f35
    	gen_require(`
    Chris PeBenito b24f35
    		type var_t, var_lib_t;
    Chris PeBenito b24f35
    	')
    Chris PeBenito b24f35
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito b24f35
    	allow $1 var_lib_t:dir getattr;
    Chris PeBenito b24f35
    ')
    Chris PeBenito b24f35
    Chris PeBenito b24f35
    ########################################
    Chris PeBenito b24f35
    ## <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
    	')
    Chris PeBenito 7a2f20
    Chris PeBenito da4fc9
    	allow $1 { var_t var_lib_t }:dir search_dir_perms;
    Chris PeBenito 7a2f20
    ')
    Chris PeBenito 7a2f20
    Chris PeBenito 7a2f20
    ########################################
    Chris PeBenito d9fd8e
    ## <summary>
    Chris PeBenito 2961e7
    ##	List the contents of the /var/lib directory.
    Chris PeBenito 2961e7
    ## </summary>
    Chris PeBenito 2961e7
    ## <param name="domain">
    Chris PeBenito 2961e7
    ##	Domain allowed access.
    Chris PeBenito 2961e7
    ## </param>
    Chris PeBenito 2961e7
    #
    Chris PeBenito 2961e7
    interface(`files_list_var_lib',`
    Chris PeBenito 2961e7
    	gen_require(`
    Chris PeBenito 2961e7
    		type var_t, var_lib_t;
    Chris PeBenito 2961e7
    	')
    Chris PeBenito 2961e7
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito 2961e7
    	allow $1 var_lib_t:dir r_dir_perms;
    Chris PeBenito 2961e7
    ')
    Chris PeBenito 2961e7
    Chris PeBenito 2961e7
    ########################################
    Chris PeBenito 2961e7
    ## <summary>
    Chris PeBenito d9fd8e
    ##	Create objects in the /var/lib directory
    Chris PeBenito d9fd8e
    ## </summary>
    Chris PeBenito d9fd8e
    ## <param name="domain">
    Chris PeBenito d9fd8e
    ##	Domain allowed access.
    Chris PeBenito d9fd8e
    ## </param>
    Chris PeBenito d9fd8e
    ## <param name="file_type">
    Chris PeBenito d9fd8e
    ##	The type of the object to be created
    Chris PeBenito d9fd8e
    ## </param>
    Chris PeBenito d9fd8e
    ## <param name="object_class" optional="true">
    Chris PeBenito d9fd8e
    ##	The object class.  If not specified, file is used.
    Chris PeBenito d9fd8e
    ## </param>
    Chris PeBenito d9fd8e
    #
    Chris PeBenito d9fd8e
    interface(`files_create_var_lib',`
    Chris PeBenito d9fd8e
    	gen_require(`
    Chris PeBenito d9fd8e
    		type var_t, var_lib_t;
    Chris PeBenito d9fd8e
    		class dir rw_dir_perms;
    Chris PeBenito d9fd8e
    	')
    Chris PeBenito d9fd8e
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito d9fd8e
    	allow $1 var_lib_t:dir rw_dir_perms;
    Chris PeBenito d9fd8e
    Chris PeBenito d9fd8e
    	ifelse(`$3',`',`
    Chris PeBenito d9fd8e
    		type_transition $1 var_lib_t:file $2;
    Chris PeBenito d9fd8e
    	',`
    Chris PeBenito d9fd8e
    		type_transition $1 var_lib_t:$3 $2;
    Chris PeBenito d9fd8e
    	')
    Chris PeBenito d9fd8e
    ')
    Chris PeBenito d9fd8e
    Chris PeBenito d9fd8e
    ########################################
    Chris PeBenito d9fd8e
    ## <summary>
    Chris PeBenito 6e99a6
    ##	Read generic files in /var/lib.
    Chris PeBenito d9fd8e
    ## </summary>
    Chris PeBenito d9fd8e
    ## <param name="domain">
    Chris PeBenito d9fd8e
    ##	Domain allowed access.
    Chris PeBenito d9fd8e
    ## </param>
    Chris PeBenito d9fd8e
    #
    Chris PeBenito d9fd8e
    interface(`files_read_var_lib_files',`
    Chris PeBenito d9fd8e
    	gen_require(`
    Chris PeBenito d9fd8e
    		type var_t, var_lib_t;
    Chris PeBenito d9fd8e
    	')
    Chris PeBenito d9fd8e
    Chris PeBenito da4fc9
    	allow $1 { var_t var_lib_t }:dir search_dir_perms;
    Chris PeBenito d9fd8e
    	allow $1 var_lib_t:file r_file_perms;
    Chris PeBenito d9fd8e
    ')
    Chris PeBenito d9fd8e
    Chris PeBenito d9fd8e
    ########################################
    Chris PeBenito 6e99a6
    ## <summary>
    Chris PeBenito 6e99a6
    ##	Read generic symbolic links in /var/lib
    Chris PeBenito 6e99a6
    ## </summary>
    Chris PeBenito 6e99a6
    ## <param name="domain">
    Chris PeBenito 6e99a6
    ##	Domain allowed access.
    Chris PeBenito 6e99a6
    ## </param>
    Chris PeBenito 6e99a6
    #
    Chris PeBenito 6e99a6
    interface(`files_read_var_lib_symlinks',`
    Chris PeBenito 6e99a6
    	gen_require(`
    Chris PeBenito 6e99a6
    		type var_t, var_lib_t;
    Chris PeBenito 6e99a6
    	')
    Chris PeBenito 6e99a6
    Chris PeBenito da4fc9
    	allow $1 { var_t var_lib_t }:dir search_dir_perms;
    Chris PeBenito 6e99a6
    	allow $1 var_lib_t:lnk_file { getattr read };
    Chris PeBenito 6e99a6
    ')
    Chris PeBenito 6e99a6
    Chris PeBenito ce0383
    # cjp: the next two interfaces really need to be fixed
    Chris PeBenito ce0383
    # in some way.  They really neeed their own types.
    Chris PeBenito ce0383
    Chris PeBenito 6e99a6
    ########################################
    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
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito 0fd9dc
    	allow $1 var_lib_t:dir rw_dir_perms;
    Chris PeBenito ce0383
    	allow $1 var_lib_t:file manage_file_perms;
    Chris PeBenito ce0383
    ')
    Chris PeBenito ce0383
    Chris PeBenito ce0383
    ########################################
    Chris PeBenito ce0383
    ## <summary>
    Chris PeBenito ce0383
    ##	Allow domain to manage mount tables
    Chris PeBenito ce0383
    ##	necessary for rpcd, nfsd, etc.
    Chris PeBenito ce0383
    ## </summary>
    Chris PeBenito ce0383
    ## <param name="domain">
    Chris PeBenito ce0383
    ##	Domain allowed access.
    Chris PeBenito ce0383
    ## </param>
    Chris PeBenito ce0383
    #
    Chris PeBenito ce0383
    interface(`files_manage_mounttab',`
    Chris PeBenito ce0383
    	gen_require(`
    Chris PeBenito ce0383
    		type var_t, var_lib_t;
    Chris PeBenito ce0383
    	')
    Chris PeBenito ce0383
    Chris PeBenito ce0383
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito ce0383
    	allow $1 var_lib_t:dir rw_dir_perms;
    Chris PeBenito ce0383
    	allow $1 var_lib_t:file manage_file_perms;
    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 da4fc9
    		type var_t, var_lock_t;
    Chris PeBenito ebdc3b
    	')
    Chris PeBenito ebdc3b
    Chris PeBenito da4fc9
    	allow $1 { var_t var_lock_t }:dir search_dir_perms;
    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
    	')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    	dontaudit $1 var_lock_t:dir search;
    Chris PeBenito ae9e27
    ')
    Chris PeBenito ae9e27
    Chris PeBenito ae9e27
    ########################################
    Chris PeBenito 9d3e33
    ## <summary>
    Chris PeBenito 9d3e33
    ##	Add and remove entries in the /var/lock
    Chris PeBenito 9d3e33
    ##	directories.
    Chris PeBenito 9d3e33
    ## </summary>
    Chris PeBenito 9d3e33
    ## <param name="domain">
    Chris PeBenito 9d3e33
    ##	Domain allowed access.
    Chris PeBenito 9d3e33
    ## </param>
    Chris PeBenito 9d3e33
    #
    Chris PeBenito 9d3e33
    interface(`files_rw_locks_dir',`
    Chris PeBenito 9d3e33
    	gen_require(`
    Chris PeBenito 9d3e33
    		type var_t, var_lock_t;
    Chris PeBenito 9d3e33
    	')
    Chris PeBenito 9d3e33
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito 9d3e33
    	allow $1 var_lock_t:dir rw_dir_perms;
    Chris PeBenito 9d3e33
    ')
    Chris PeBenito 9d3e33
    Chris PeBenito 9d3e33
    ########################################
    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 da4fc9
    		type var_t, var_lock_t;
    Chris PeBenito cbc9d6
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito da4fc9
    	allow $1 var_t:dir search_dir_perms;
    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
    	')
    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
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito e6a2ea
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito 0c73cd
    	allow $1 var_run_t:dir search;
    Chris PeBenito b4cd15
    ')
    Chris PeBenito b4cd15
    Chris PeBenito b4cd15
    ########################################
    Chris PeBenito 9d3e33
    ## <summary>
    Chris PeBenito 9d3e33
    ##	Do not audit attempts to search
    Chris PeBenito 9d3e33
    ##	the /var/run directory.
    Chris PeBenito 9d3e33
    ## </summary>
    Chris PeBenito 9d3e33
    ## <param name="domain">
    Chris PeBenito 9d3e33
    ##	Domain to not audit.
    Chris PeBenito 9d3e33
    ## </param>
    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
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 9d3e33
    	dontaudit $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 e6a2ea
    	allow $1 var_t:dir search_dir_perms;
    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 e6a2ea
    	allow $1 var_t:dir search_dir_perms;
    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
    	')
    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
    	')
    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
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito e6a2ea
    	allow $1 var_t:dir search_dir_perms;
    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 a1fcff
    # files_delete_all_pid_dirs(domain)
    Chris PeBenito a1fcff
    #
    Chris PeBenito a1fcff
    interface(`files_delete_all_pid_dirs',`
    Chris PeBenito a1fcff
    	gen_require(`
    Chris PeBenito a1fcff
    		attribute pidfile;
    Chris PeBenito a1fcff
    		type var_t;
    Chris PeBenito a1fcff
    	')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    	allow $1 var_t:dir search;
    Chris PeBenito a1fcff
    	allow $1 pidfile:dir { rw_dir_perms rmdir };
    Chris PeBenito a1fcff
    ')
    Chris PeBenito a1fcff
    Chris PeBenito a1fcff
    ########################################
    Chris PeBenito a1fcff
    #
    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
    	')
    Chris PeBenito 0c73cd
    Chris PeBenito 9bbc75
    	allow $1 var_t:dir search_dir_perms;
    Chris PeBenito 9bbc75
    	allow $1 var_spool_t:dir search_dir_perms;
    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
    	')
    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 142e9f
    Chris PeBenito 142e9f
    	ifdef(`targeted_policy',`
    Chris PeBenito 142e9f
    		tunable_policy(`allow_execmod',`
    Chris PeBenito 142e9f
    			allow $1 file_type:file execmod;
    Chris PeBenito 142e9f
    		')
    Chris PeBenito 142e9f
    	')
    Chris PeBenito 9726b3
    ')