Chris PeBenito e32d52
## <summary>
Chris PeBenito 274547
##	Policy for kernel threads, proc filesystem,and unlabeled processes and objects.
Chris PeBenito e32d52
## </summary>
Chris PeBenito 274547
## <required val="true">
Chris PeBenito 274547
##	This policy has initial SIDs.
Chris PeBenito 274547
## </required>
Chris PeBenito e181fe
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allows to start userland processes
Chris PeBenito 414e41
##	by transitioning to the specified domain.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type entered by kernel.
Chris PeBenito 414e41
## </param>
Chris PeBenito 414e41
## <param name="entrypoint">
Chris PeBenito 414e41
##	The executable type for the entrypoint.
Chris PeBenito 414e41
## </param>
Chris PeBenito ff3138
#
Chris PeBenito 199895
interface(`kernel_userland_entry',`
Chris PeBenito 7a2f20
	gen_require(`
Chris PeBenito 7a2f20
		type kernel_t;
Chris PeBenito 7a2f20
		class process sigchld;
Chris PeBenito 7a2f20
		class fifo_file rw_file_perms;
Chris PeBenito 7a2f20
		class fd use;
Chris PeBenito 7a2f20
	')
Chris PeBenito 0c73cd
Chris PeBenito c2c00b
	domain_auto_trans(kernel_t, $2, $1)
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 kernel_t:fd use;
Chris PeBenito 0c73cd
	allow kernel_t $1:fd use;
Chris PeBenito 0c73cd
	allow kernel_t $1:fifo_file rw_file_perms;
Chris PeBenito 0c73cd
	allow $1 kernel_t:process sigchld;
Chris PeBenito ff3138
')
Chris PeBenito ff3138
Chris PeBenito ff3138
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allows the kernel to mount filesystems on
Chris PeBenito 414e41
##	the specified directory type.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="directory_type">
Chris PeBenito 414e41
##	The type of the directory to use as a mountpoint.
Chris PeBenito 414e41
## </param>
Chris PeBenito 588ffa
#
Chris PeBenito 199895
interface(`kernel_rootfs_mountpoint',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class dir mounton;
Chris PeBenito cbc9d6
	')
Chris PeBenito 588ffa
Chris PeBenito 588ffa
	allow kernel_t $1:dir mounton;
Chris PeBenito 588ffa
')
Chris PeBenito 588ffa
Chris PeBenito 588ffa
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Send a SIGCHLD signal to kernel threads.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process sending the signal.
Chris PeBenito 414e41
## </param>
Chris PeBenito 7a2f20
#
Chris PeBenito 199895
interface(`kernel_sigchld',`
Chris PeBenito 7a2f20
	gen_require(`
Chris PeBenito 7a2f20
		type kernel_t;
Chris PeBenito 7a2f20
		class process sigchld;
Chris PeBenito 7a2f20
	')
Chris PeBenito 7a2f20
Chris PeBenito 7a2f20
	allow kernel_t $1:process sigchld;
Chris PeBenito 7a2f20
')
Chris PeBenito 7a2f20
Chris PeBenito 7a2f20
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allows the kernel to share state information with
Chris PeBenito 414e41
##	the caller.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process with which to share state information.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_share_state',`
Chris PeBenito 7a2f20
	gen_require(`
Chris PeBenito 7a2f20
		type kernel_t;
Chris PeBenito 7a2f20
		class process share;
Chris PeBenito 7a2f20
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow kernel_t $1:process share;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Permits caller to use kernel file descriptors.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of the process using the descriptors.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_use_fd',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class fd use;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 kernel_t:fd use;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito a2d824
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Do not audit attempts to use
Chris PeBenito 414e41
##	kernel file descriptors.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The type of process not to audit.
Chris PeBenito 414e41
## </param>
Chris PeBenito a2d824
#
Chris PeBenito 199895
interface(`kernel_dontaudit_use_fd',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class fd use;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 kernel_t:fd use;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito b4cd15
########################################
Chris PeBenito 4051d1
## <summary>
Chris PeBenito ae9e27
##	Read and write kernel unnamed pipes.
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(`kernel_rw_pipe',`
Chris PeBenito ae9e27
	gen_require(`
Chris PeBenito ae9e27
		type kernel_t;
Chris PeBenito ae9e27
		class fifo_file { read write };
Chris PeBenito ae9e27
	')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
	allow $1 kernel_t:fifo_file { read write };
Chris PeBenito ae9e27
')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito ae9e27
##	Read and write kernel unix datagram sockets.
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(`kernel_rw_unix_dgram_socket',`
Chris PeBenito ae9e27
	gen_require(`
Chris PeBenito ae9e27
		type kernel_t;
Chris PeBenito ae9e27
		class unix_dgram_socket { read write ioctl };
Chris PeBenito ae9e27
	')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
	allow $1 kernel_t:unix_dgram_socket { read write ioctl };
Chris PeBenito ae9e27
')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito ae9e27
##	Send messages to kernel unix datagram sockets.
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(`kernel_sendto_unix_dgram_socket',`
Chris PeBenito ae9e27
	gen_require(`
Chris PeBenito ae9e27
		type kernel_t;
Chris PeBenito ae9e27
		class unix_dgram_socket sendto;
Chris PeBenito ae9e27
	')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
	allow $1 kernel_t:unix_dgram_socket sendto;
Chris PeBenito ae9e27
')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allows caller to load kernel modules
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type to allow to load kernel modules.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_load_module',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		attribute can_load_kernmodule;
Chris PeBenito cbc9d6
		class capability sys_module;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 self:capability sys_module;
Chris PeBenito 0c73cd
	typeattribute $1 can_load_kernmodule;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allows caller to read the ring buffer.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type allowed to read the ring buffer.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_ring_buffer',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class system syslog_read;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 kernel_t:system syslog_read;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Do not audit attempts to read the ring buffer.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The domain to not audit.
Chris PeBenito 414e41
## </param>
Chris PeBenito b16c6b
#
Chris PeBenito 199895
interface(`kernel_dontaudit_read_ring_buffer',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class system syslog_read;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 kernel_t:system syslog_read;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
########################################
Chris PeBenito 58c3da
## <summary>
Chris PeBenito 58c3da
##	Change the level of kernel messages logged to the console.
Chris PeBenito 58c3da
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 58c3da
##	The type of the process performing this action.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_change_ring_buffer_level',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class system syslog_console;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 kernel_t:system syslog_console;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allows the caller to clear the ring buffer.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type clearing the buffer.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_clear_ring_buffer',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class system syslog_mod;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 kernel_t:system syslog_mod;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Get information on all System V IPC objects.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_get_sysvipc_info',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type kernel_t;
Chris PeBenito cbc9d6
		class system ipc_info;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 kernel_t:system ipc_info;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito a42ca7
##	Get the attributes of the proc filesystem.
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(`kernel_getattr_proc',`
Chris PeBenito a42ca7
	gen_require(`
Chris PeBenito a42ca7
		type proc_t;
Chris PeBenito a42ca7
		class filesystem getattr;
Chris PeBenito a42ca7
	')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
	allow $1 proc_t:filesystem getattr;
Chris PeBenito a42ca7
')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito a42ca7
##	Search directories in /proc.
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(`kernel_search_proc',`
Chris PeBenito a42ca7
	gen_require(`
Chris PeBenito a42ca7
		type proc_t;
Chris PeBenito a42ca7
		class dir search;
Chris PeBenito a42ca7
	')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
	allow $1 proc_t:dir search;
Chris PeBenito a42ca7
')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito a42ca7
##	List the contents of directories in /proc.
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(`kernel_list_proc',`
Chris PeBenito a42ca7
	gen_require(`
Chris PeBenito a42ca7
		type proc_t;
Chris PeBenito a42ca7
		class dir r_dir_perms;
Chris PeBenito a42ca7
	')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
	allow $1 proc_t:dir r_dir_perms;
Chris PeBenito a42ca7
')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito a42ca7
##	Read symbolic links in /proc.
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(`kernel_read_proc_symlinks',`
Chris PeBenito a42ca7
	gen_require(`
Chris PeBenito a42ca7
		type proc_t;
Chris PeBenito a42ca7
		class dir search;
Chris PeBenito a42ca7
		class lnk_file { getattr read };
Chris PeBenito a42ca7
	')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
	allow $1 proc_t:dir search;
Chris PeBenito a42ca7
	allow $1 proc_t:lnk_file { getattr read };
Chris PeBenito a42ca7
')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito a42ca7
##	Allows caller to read system state information in proc.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type reading the system state information.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_system_state',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t;
Chris PeBenito cbc9d6
		class dir r_dir_perms;
Chris PeBenito cbc9d6
		class lnk_file { getattr read };
Chris PeBenito cbc9d6
		class file r_file_perms;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 proc_t:dir r_dir_perms;
Chris PeBenito 0c73cd
	allow $1 proc_t:lnk_file { getattr read };
Chris PeBenito 0c73cd
	allow $1 proc_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 67484f
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Do not audit attempts by caller to
Chris PeBenito a42ca7
##	read system state information in proc.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type not to audit.
Chris PeBenito 414e41
## </param>
Chris PeBenito 67484f
#
Chris PeBenito 199895
interface(`kernel_dontaudit_read_system_state',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t;
Chris PeBenito cbc9d6
		class file read;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 proc_t:file read;
Chris PeBenito 67484f
')
Chris PeBenito 67484f
Chris PeBenito b4cd15
#######################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read the state information for software raid.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type reading software raid state.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_software_raid_state',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, proc_mdstat_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 c2c00b
	allow $1 proc_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 proc_mdstat_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allows caller to get attribues of core kernel interface.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type getting the attibutes.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_getattr_core',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, proc_kcore_t;
Chris PeBenito cbc9d6
		class dir { search getattr read };
Chris PeBenito cbc9d6
		class file getattr;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito c2c00b
	allow $1 proc_t:dir r_dir_perms;
Chris PeBenito 0c73cd
	allow $1 proc_kcore_t:file getattr;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Do not audit attempts to get the attributes of
Chris PeBenito 414e41
##	core kernel interfaces.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type to not audit.
Chris PeBenito 414e41
## </param>
Chris PeBenito 7bba9d
#
Chris PeBenito 199895
interface(`kernel_dontaudit_getattr_core',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_kcore_t;
Chris PeBenito cbc9d6
		class file getattr;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 proc_kcore_t:file getattr;
Chris PeBenito 7bba9d
')
Chris PeBenito 7bba9d
Chris PeBenito 7bba9d
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read kernel messages
Chris PeBenito 414e41
##	using the /proc/kmsg interface.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type reading the messages.
Chris PeBenito 414e41
## </param>
Chris PeBenito a266e3
#
Chris PeBenito 199895
interface(`kernel_read_messages',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		attribute can_receive_kernel_messages;
Chris PeBenito cbc9d6
		type proc_kmsg_t, proc_t;
Chris PeBenito cbc9d6
		class dir search;
Chris PeBenito cbc9d6
		class file r_file_perms;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 proc_kmsg_t:file r_file_perms;
Chris PeBenito 0c73cd
	typeattribute $1 can_receive_kernel_messages;
Chris PeBenito a266e3
')
Chris PeBenito a266e3
Chris PeBenito a266e3
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to get the attributes of kernel message
Chris PeBenito 414e41
##	interface (/proc/kmsg).
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type getting the attributes.
Chris PeBenito 414e41
## </param>
Chris PeBenito a266e3
#
Chris PeBenito 199895
interface(`kernel_getattr_message_if',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_kmsg_t, proc_t;
Chris PeBenito cbc9d6
		class dir search;
Chris PeBenito cbc9d6
		class file getattr;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 proc_t:dir search;
Chris PeBenito 0c73cd
	allow $1 proc_kmsg_t:file getattr;
Chris PeBenito a266e3
')
Chris PeBenito a266e3
Chris PeBenito a266e3
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Do not audit attempts by caller to get the attributes of kernel
Chris PeBenito 414e41
##	message interfaces.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type not to audit.
Chris PeBenito 414e41
## </param>
Chris PeBenito 07d6e3
#
Chris PeBenito 199895
interface(`kernel_dontaudit_getattr_message_if',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_kmsg_t, proc_t;
Chris PeBenito cbc9d6
		class file getattr;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 proc_kmsg_t:file getattr;
Chris PeBenito 07d6e3
')
Chris PeBenito 07d6e3
Chris PeBenito 07d6e3
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read the network state information.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type reading the state.
Chris PeBenito 414e41
## </param>
Chris PeBenito 3865d6
##
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_network_state',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, proc_net_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 proc_net_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 proc_net_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Do not audit attempts by caller to search the sysctl directory.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type not to audit.
Chris PeBenito 414e41
## </param>
Chris PeBenito 3865d6
##
Chris PeBenito 3b857e
#
Chris PeBenito 199895
interface(`kernel_dontaudit_search_sysctl_dir',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type sysctl_t;
Chris PeBenito cbc9d6
		class dir search;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 sysctl_t:dir search;
Chris PeBenito 3b857e
')
Chris PeBenito 3b857e
Chris PeBenito 3b857e
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read the device sysctls.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type to allow to read the device sysctls.
Chris PeBenito 414e41
## </param>
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_device_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_dev_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_dev_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_dev_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write device sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_device_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_dev_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_dev_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read virtual memory sysctls.
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 3865d6
##
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_vm_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_vm_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_vm_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write virtual memory sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_vm_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_vm_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_vm_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Do not audit attempts by caller to search sysctl network directories.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type not to audit.
Chris PeBenito 414e41
## </param>
Chris PeBenito 3b857e
#
Chris PeBenito 199895
interface(`kernel_dontaudit_search_network_sysctl_dir',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type sysctl_net_t;
Chris PeBenito cbc9d6
		class dir search;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	dontaudit $1 sysctl_net_t:dir search;
Chris PeBenito 3b857e
')
Chris PeBenito 3b857e
Chris PeBenito 3b857e
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read network sysctls.
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 3865d6
##
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_net_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_net_t;
Chris PeBenito cbc9d6
		class dir r_dir_perms;
Chris PeBenito cbc9d6
		class file f_file_perms;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to modiry contents of sysctl network 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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_net_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_net_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read unix domain
Chris PeBenito 414e41
##	socket sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_unix_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_unix_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write unix domain
Chris PeBenito 414e41
##	socket sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_unix_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_net_unix_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read the hotplug sysctl.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_hotplug_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_hotplug_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write the hotplug sysctl.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_hotplug_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_hotplug_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read the modprobe sysctl.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_modprobe_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_modprobe_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write the modprobe sysctl.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_modprobe_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_modprobe_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read generic kernel sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_kernel_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_kernel_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write generic kernel sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_kernel_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_kernel_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_kernel_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read filesystem sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_fs_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_fs_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_fs_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_fs_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write fileystem sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_fs_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_t, sysctl_fs_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_fs_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_fs_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read IRQ sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_irq_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_irq_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_irq_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_irq_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write IRQ sysctls.
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 3865d6
##
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_irq_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, sysctl_irq_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 proc_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_irq_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_irq_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# kernel_read_rpc_sysctl(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_rpc_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, proc_net_t, sysctl_rpc_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 proc_t:dir search;
Chris PeBenito 0c73cd
	allow $1 proc_net_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_rpc_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_rpc_t:file r_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito 0fd9dc
# kernel_rw_rpc_sysctl(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_rpc_sysctl',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type proc_t, proc_net_t, sysctl_rpc_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 proc_t:dir search;
Chris PeBenito 0c73cd
	allow $1 proc_net_t:dir search;
Chris PeBenito c2c00b
	allow $1 sysctl_rpc_t:dir r_dir_perms;
Chris PeBenito c2c00b
	allow $1 sysctl_rpc_t:file rw_file_perms;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to read all sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_read_all_sysctl',`
Chris PeBenito 0c73cd
	kernel_read_device_sysctl($1)
Chris PeBenito 0fd9dc
	kernel_read_vm_sysctl($1)
Chris PeBenito 0fd9dc
	kernel_read_net_sysctl($1)
Chris PeBenito 0c73cd
	kernel_read_unix_sysctl($1)
Chris PeBenito 0c73cd
	kernel_read_hotplug_sysctl($1)
Chris PeBenito 0c73cd
	kernel_read_modprobe_sysctl($1)
Chris PeBenito 0c73cd
	kernel_read_kernel_sysctl($1)
Chris PeBenito 763c44
	kernel_read_fs_sysctl($1)
Chris PeBenito 0c73cd
	kernel_read_irq_sysctl($1)
Chris PeBenito 0c73cd
	kernel_read_rpc_sysctl($1)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Read and write all sysctls.
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 b4cd15
#
Chris PeBenito 199895
interface(`kernel_rw_all_sysctl',`
Chris PeBenito 588ffa
	kernel_rw_device_sysctl($1)
Chris PeBenito 0fd9dc
	kernel_rw_vm_sysctl($1)
Chris PeBenito 0fd9dc
	kernel_rw_net_sysctl($1)
Chris PeBenito 588ffa
	kernel_rw_unix_sysctl($1)
Chris PeBenito 588ffa
	kernel_rw_hotplug_sysctl($1)
Chris PeBenito 588ffa
	kernel_rw_modprobe_sysctl($1)
Chris PeBenito 588ffa
	kernel_rw_kernel_sysctl($1)
Chris PeBenito 588ffa
	kernel_rw_fs_sysctl($1)
Chris PeBenito 588ffa
	kernel_rw_irq_sysctl($1)
Chris PeBenito 588ffa
	kernel_rw_rpc_sysctl($1)
Chris PeBenito f5c42b
')
Chris PeBenito f5c42b
Chris PeBenito f5c42b
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Send a kill signal to unlabeled processes.
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 c6fd1f
#
Chris PeBenito 199895
interface(`kernel_kill_unlabeled',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type unlabeled_t;
Chris PeBenito cbc9d6
		class process sigkill;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 unlabeled_t:process sigkill;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Send general signals to unlabeled processes.
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 c6fd1f
#
Chris PeBenito 199895
interface(`kernel_signal_unlabeled',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type unlabeled_t;
Chris PeBenito cbc9d6
		class process signal;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 unlabeled_t:process signal;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Send a null signal to unlabeled processes.
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 c6fd1f
#
Chris PeBenito 199895
interface(`kernel_signull_unlabeled',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type unlabeled_t;
Chris PeBenito cbc9d6
		class process signull;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 unlabeled_t:process signull;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Send a stop signal to unlabeled processes.
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 c6fd1f
#
Chris PeBenito 199895
interface(`kernel_sigstop_unlabeled',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type unlabeled_t;
Chris PeBenito cbc9d6
		class process sigstop;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 unlabeled_t:process sigstop;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Send a child terminated signal to unlabeled processes.
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 c6fd1f
#
Chris PeBenito 199895
interface(`kernel_sigchld_unlabeled',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type unlabeled_t;
Chris PeBenito cbc9d6
		class process sigchld;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 unlabeled_t:process sigchld;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito ae9e27
##	List unlabeled directories.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito ae9e27
##	Domain allowed access.
Chris PeBenito 414e41
## </param>
Chris PeBenito c6fd1f
#
Chris PeBenito ae9e27
interface(`kernel_list_unlabeled',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type unlabeled_t;
Chris PeBenito ae9e27
		class dir r_dir_perms;
Chris PeBenito a42ca7
	')
Chris PeBenito a42ca7
Chris PeBenito ae9e27
	allow $1 unlabeled_t:dir r_dir_perms;
Chris PeBenito a42ca7
')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito a42ca7
##	Read and write unlabeled 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(`kernel_rw_unlabeled_dir',`
Chris PeBenito a42ca7
	gen_require(`
Chris PeBenito a42ca7
		type unlabeled_t;
Chris PeBenito a42ca7
		class dir rw_dir_perms;
Chris PeBenito a42ca7
	')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
	allow $1 unlabeled_t:dir rw_dir_perms;
Chris PeBenito a42ca7
')
Chris PeBenito a42ca7
Chris PeBenito a42ca7
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito ae9e27
##	Do not audit attempts by caller to get attributes for
Chris PeBenito ae9e27
##	unlabeled block devices.
Chris PeBenito ae9e27
## </summary>
Chris PeBenito ae9e27
## <param name="domain">
Chris PeBenito ae9e27
##	The process type not to audit.
Chris PeBenito ae9e27
## </param>
Chris PeBenito ae9e27
#
Chris PeBenito ae9e27
interface(`kernel_dontaudit_getattr_unlabeled_blk_dev',`
Chris PeBenito ae9e27
	gen_require(`
Chris PeBenito ae9e27
		type unlabeled_t;
Chris PeBenito ae9e27
		class blk_file getattr;
Chris PeBenito ae9e27
	')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
	allow $1 unlabeled_t:blk_file getattr;
Chris PeBenito ae9e27
')
Chris PeBenito ae9e27
Chris PeBenito ae9e27
########################################
Chris PeBenito ae9e27
## <summary>
Chris PeBenito a42ca7
##	Read and write unlabeled block device nodes.
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(`kernel_use_unlabeled_blk_dev',`
Chris PeBenito a42ca7
	gen_require(`
Chris PeBenito a42ca7
		type unlabeled_t;
Chris PeBenito a42ca7
		class blk_file rw_file_perms;
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito 0c73cd
	allow $1 unlabeled_t:blk_file getattr;
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito c6fd1f
########################################
Chris PeBenito a42ca7
## <summary>
Chris PeBenito 414e41
##	Allow caller to relabel unlabeled objects.
Chris PeBenito a42ca7
## </summary>
Chris PeBenito 414e41
## <param name="domain">
Chris PeBenito 414e41
##	The process type relabeling the objects.
Chris PeBenito 414e41
## </param>
Chris PeBenito c6fd1f
#
Chris PeBenito 199895
interface(`kernel_relabel_unlabeled',`
Chris PeBenito cbc9d6
	gen_require(`
Chris PeBenito cbc9d6
		type unlabeled_t;
Chris PeBenito cbc9d6
		class dir { getattr relabelfrom };
Chris PeBenito cbc9d6
		class file { getattr relabelfrom };
Chris PeBenito cbc9d6
		class lnk_file { getattr relabelfrom };
Chris PeBenito cbc9d6
		class fifo_file { getattr relabelfrom };
Chris PeBenito cbc9d6
		class sock_file { getattr relabelfrom };
Chris PeBenito cbc9d6
		class chr_file { getattr relabelfrom };
Chris PeBenito cbc9d6
		class blk_file { getattr relabelfrom };
Chris PeBenito cbc9d6
	')
Chris PeBenito 0c73cd
Chris PeBenito c2c00b
	allow $1 unlabeled_t:dir_file_class_set { getattr relabelfrom };
Chris PeBenito c6fd1f
')
Chris PeBenito c6fd1f
Chris PeBenito 9726b3
########################################
Chris PeBenito 9726b3
## <summary>
Chris PeBenito 9726b3
##	Unconfined access to the kernel.
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(`kernel_unconfined',`
Chris PeBenito 9726b3
	gen_require(`
Chris PeBenito 9726b3
		type kernel_t, unlabeled_t;
Chris PeBenito 9726b3
		attribute can_load_kernmodule, can_receive_kernel_messages;
Chris PeBenito 9726b3
	')
Chris PeBenito 9726b3
Chris PeBenito 9726b3
#	allow $1 proc_fs:{ dir file } *;
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	allow $1 sysctl_t:{ dir file } *;
Chris PeBenito c98340
Chris PeBenito 9726b3
	allow $1 kernel_t:system *;
Chris PeBenito c98340
Chris PeBenito 9726b3
	allow $1 unlabeled_t:{ dir lnk_file sock_file fifo_file blk_file } *;
Chris PeBenito c98340
	allow $1 unlabeled_t:filesystem *;
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	typeattribute $1 can_load_kernmodule, can_receive_kernel_messages;
Chris PeBenito 9726b3
Chris PeBenito 9726b3
	kernel_rw_all_sysctl($1)
Chris PeBenito 9726b3
')