2005-06-01 14:17:43 +00:00
|
|
|
## <summary>
|
2005-07-05 17:47:15 +00:00
|
|
|
## Policy for kernel threads, proc filesystem,and unlabeled processes and objects.
|
2005-06-01 14:17:43 +00:00
|
|
|
## </summary>
|
2005-07-05 17:47:15 +00:00
|
|
|
## <required val="true">
|
|
|
|
## This policy has initial SIDs.
|
|
|
|
## </required>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-05-13 20:21:50 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allows to start userland processes
|
|
|
|
## by transitioning to the specified domain.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type entered by kernel.
|
|
|
|
## </param>
|
|
|
|
## <param name="entrypoint">
|
|
|
|
## The executable type for the entrypoint.
|
|
|
|
## </param>
|
2005-05-13 20:21:50 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_userland_entry',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class process sigchld;
|
|
|
|
class fifo_file rw_file_perms;
|
|
|
|
class fd use;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
domain_auto_trans(kernel_t, $2, $1)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 kernel_t:fd use;
|
|
|
|
allow kernel_t $1:fd use;
|
|
|
|
allow kernel_t $1:fifo_file rw_file_perms;
|
|
|
|
allow $1 kernel_t:process sigchld;
|
2005-05-13 20:21:50 +00:00
|
|
|
')
|
|
|
|
|
2005-06-09 20:50:17 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allows the kernel to mount filesystems on
|
|
|
|
## the specified directory type.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="directory_type">
|
|
|
|
## The type of the directory to use as a mountpoint.
|
|
|
|
## </param>
|
2005-06-09 20:50:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rootfs_mountpoint',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class dir mounton;
|
|
|
|
')
|
2005-06-09 20:50:17 +00:00
|
|
|
|
|
|
|
allow kernel_t $1:dir mounton;
|
|
|
|
')
|
|
|
|
|
2005-09-15 21:03:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Set the process group of kernel threads.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_setpgid',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class process setpgid;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 kernel_t:process setpgid;
|
|
|
|
')
|
|
|
|
|
2005-06-20 17:41:29 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send a SIGCHLD signal to kernel threads.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process sending the signal.
|
|
|
|
## </param>
|
2005-06-20 17:41:29 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_sigchld',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class process sigchld;
|
|
|
|
')
|
|
|
|
|
2005-09-15 21:03:29 +00:00
|
|
|
allow $1 kernel_t:process sigchld;
|
2005-06-20 17:41:29 +00:00
|
|
|
')
|
|
|
|
|
2005-09-13 13:06:07 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send a generic signal to kernel threads.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process sending the signal.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_signal',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class process signal;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:process signal;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allows the kernel to share state information with
|
|
|
|
## the caller.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process with which to share state information.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_share_state',`
|
2005-06-20 17:41:29 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class process share;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow kernel_t $1:process share;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Permits caller to use kernel file descriptors.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process using the descriptors.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_use_fd',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class fd use;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 kernel_t:fd use;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts to use
|
|
|
|
## kernel file descriptors.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of process not to audit.
|
|
|
|
## </param>
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_dontaudit_use_fd',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class fd use;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 kernel_t:fd use;
|
2005-04-28 21:41:09 +00:00
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
2005-07-11 19:15:54 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## Read and write kernel unnamed pipes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_rw_pipe',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class fifo_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 kernel_t:fifo_file { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write kernel unix datagram sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_rw_unix_dgram_socket',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class unix_dgram_socket { read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 kernel_t:unix_dgram_socket { read write ioctl };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send messages to kernel unix datagram sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_sendto_unix_dgram_socket',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class unix_dgram_socket sendto;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 kernel_t:unix_dgram_socket sendto;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-18 18:31:49 +00:00
|
|
|
## <summary>
|
|
|
|
## Receive messages from kernel TCP sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_tcp_recvfrom',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class tcp_socket recvfrom;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 kernel_t:tcp_socket recvfrom;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Receive messages from kernel UDP sockets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_udp_recvfrom',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class udp_socket recvfrom;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 kernel_t:udp_socket recvfrom;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allows caller to load kernel modules
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type to allow to load kernel modules.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_load_module',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_load_kernmodule;
|
|
|
|
class capability sys_module;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 self:capability sys_module;
|
|
|
|
typeattribute $1 can_load_kernmodule;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allows caller to read the ring buffer.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type allowed to read the ring buffer.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_ring_buffer',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class system syslog_read;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 kernel_t:system syslog_read;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts to read the ring buffer.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The domain to not audit.
|
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_dontaudit_read_ring_buffer',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class system syslog_read;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 kernel_t:system syslog_read;
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-06-27 20:59:28 +00:00
|
|
|
## <summary>
|
|
|
|
## Change the level of kernel messages logged to the console.
|
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2005-06-27 20:59:28 +00:00
|
|
|
## The type of the process performing this action.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_change_ring_buffer_level',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class system syslog_console;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 kernel_t:system syslog_console;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allows the caller to clear the ring buffer.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type clearing the buffer.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_clear_ring_buffer',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class system syslog_mod;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 kernel_t:system syslog_mod;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Get information on all System V IPC objects.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
##
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_get_sysvipc_info',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class system ipc_info;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 kernel_t:system ipc_info;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
|
|
|
## Get the attributes of the proc filesystem.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_getattr_proc',`
|
|
|
|
gen_require(`
|
|
|
|
type proc_t;
|
|
|
|
class filesystem getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 proc_t:filesystem getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search directories in /proc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_search_proc',`
|
|
|
|
gen_require(`
|
|
|
|
type proc_t;
|
|
|
|
class dir search;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## List the contents of directories in /proc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_list_proc',`
|
|
|
|
gen_require(`
|
|
|
|
type proc_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 proc_t:dir r_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read symbolic links in /proc.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_read_proc_symlinks',`
|
|
|
|
gen_require(`
|
|
|
|
type proc_t;
|
|
|
|
class dir search;
|
|
|
|
class lnk_file { getattr read };
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
|
|
|
allow $1 proc_t:lnk_file { getattr read };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allows caller to read system state information in proc.
|
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type reading the system state information.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_system_state',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class lnk_file { getattr read };
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir r_dir_perms;
|
|
|
|
allow $1 proc_t:lnk_file { getattr read };
|
|
|
|
allow $1 proc_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 18:42:33 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts by caller to
|
2005-07-08 20:44:57 +00:00
|
|
|
## read system state information in proc.
|
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type not to audit.
|
|
|
|
## </param>
|
2005-05-02 18:42:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_dontaudit_read_system_state',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t;
|
|
|
|
class file read;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-08-31 15:25:12 +00:00
|
|
|
dontaudit $1 proc_t:file read;
|
2005-05-02 18:42:33 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
#######################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read the state information for software raid.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type reading software raid state.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_software_raid_state',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, proc_mdstat_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 proc_t:dir r_dir_perms;
|
|
|
|
allow $1 proc_mdstat_t:file r_file_perms;
|
2005-07-15 20:45:26 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Allow caller to read and set the state information for software raid.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## The process type reading software raid state.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_rw_software_raid_state',`
|
|
|
|
gen_require(`
|
|
|
|
type proc_t, proc_mdstat_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 proc_t:dir r_dir_perms;
|
|
|
|
allow $1 proc_mdstat_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allows caller to get attribues of core kernel interface.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type getting the attibutes.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_getattr_core',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, proc_kcore_t;
|
|
|
|
class dir { search getattr read };
|
|
|
|
class file getattr;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 proc_t:dir r_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 proc_kcore_t:file getattr;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts to get the attributes of
|
|
|
|
## core kernel interfaces.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type to not audit.
|
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_dontaudit_getattr_core',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_kcore_t;
|
|
|
|
class file getattr;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 proc_kcore_t:file getattr;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-04-25 16:11:21 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read kernel messages
|
|
|
|
## using the /proc/kmsg interface.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type reading the messages.
|
|
|
|
## </param>
|
2005-04-25 16:11:21 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_messages',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute can_receive_kernel_messages;
|
|
|
|
type proc_kmsg_t, proc_t;
|
|
|
|
class dir search;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 proc_kmsg_t:file r_file_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 can_receive_kernel_messages;
|
2005-04-25 16:11:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to get the attributes of kernel message
|
|
|
|
## interface (/proc/kmsg).
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type getting the attributes.
|
|
|
|
## </param>
|
2005-04-25 16:11:21 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_getattr_message_if',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_kmsg_t, proc_t;
|
|
|
|
class dir search;
|
|
|
|
class file getattr;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
|
|
|
allow $1 proc_kmsg_t:file getattr;
|
2005-04-25 16:11:21 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts by caller to get the attributes of kernel
|
|
|
|
## message interfaces.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type not to audit.
|
|
|
|
## </param>
|
2005-05-02 21:02:14 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_dontaudit_getattr_message_if',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_kmsg_t, proc_t;
|
|
|
|
class file getattr;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 proc_kmsg_t:file getattr;
|
2005-05-02 21:02:14 +00:00
|
|
|
')
|
|
|
|
|
2005-08-30 20:47:41 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to search the network
|
|
|
|
## state directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## The process type reading the state.
|
|
|
|
## </param>
|
|
|
|
##
|
|
|
|
#
|
|
|
|
interface(`kernel_dontaudit_search_network_state',`
|
|
|
|
gen_require(`
|
|
|
|
type proc_net_t;
|
|
|
|
class dir search;
|
|
|
|
')
|
|
|
|
|
2005-09-12 15:17:39 +00:00
|
|
|
dontaudit $1 proc_net_t:dir search;
|
2005-08-30 20:47:41 +00:00
|
|
|
')
|
|
|
|
|
2005-05-02 21:02:14 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read the network state information.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type reading the state.
|
|
|
|
## </param>
|
2005-06-07 22:36:07 +00:00
|
|
|
##
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_network_state',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, proc_net_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 proc_net_t:dir r_dir_perms;
|
|
|
|
allow $1 proc_net_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 21:25:45 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts by caller to search the sysctl directory.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type not to audit.
|
|
|
|
## </param>
|
2005-06-07 22:36:07 +00:00
|
|
|
##
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_dontaudit_search_sysctl_dir',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type sysctl_t;
|
|
|
|
class dir search;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 sysctl_t:dir search;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read the device sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type to allow to read the device sysctls.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_device_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_dev_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_dev_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_dev_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write device sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_device_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_dev_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_dev_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read virtual memory sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-06-07 22:36:07 +00:00
|
|
|
##
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_vm_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_vm_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_vm_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write virtual memory sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_vm_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_vm_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_vm_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-31 21:25:45 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Do not audit attempts by caller to search sysctl network directories.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type not to audit.
|
|
|
|
## </param>
|
2005-05-31 21:25:45 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_dontaudit_search_network_sysctl_dir',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type sysctl_net_t;
|
|
|
|
class dir search;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
dontaudit $1 sysctl_net_t:dir search;
|
2005-05-31 21:25:45 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read network sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-06-07 22:36:07 +00:00
|
|
|
##
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_net_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_net_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file f_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to modiry contents of sysctl network files.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_net_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_net_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read unix domain
|
|
|
|
## socket sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_unix_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_unix_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write unix domain
|
|
|
|
## socket sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_unix_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_net_unix_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read the hotplug sysctl.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_hotplug_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_hotplug_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write the hotplug sysctl.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_hotplug_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_hotplug_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read the modprobe sysctl.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_modprobe_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_modprobe_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write the modprobe sysctl.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_modprobe_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_modprobe_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read generic kernel sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_kernel_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_kernel_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-08-08 15:51:15 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to write generic kernel sysctls.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain to not audit.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_dontaudit_write_kernel_sysctl',`
|
|
|
|
gen_require(`
|
|
|
|
type sysctl_kernel_t;
|
|
|
|
class file write;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 sysctl_kernel_t:file write;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write generic kernel sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_kernel_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_kernel_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_kernel_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read filesystem sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_fs_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_fs_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_fs_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_fs_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write fileystem sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_fs_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_t, sysctl_fs_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_fs_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_fs_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read IRQ sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_irq_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_irq_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_irq_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_irq_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write IRQ sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-06-07 22:36:07 +00:00
|
|
|
##
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_irq_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, sysctl_irq_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_irq_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_irq_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# kernel_read_rpc_sysctl(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_rpc_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, proc_net_t, sysctl_rpc_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
|
|
|
allow $1 proc_net_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_rpc_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_rpc_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2005-06-10 01:01:13 +00:00
|
|
|
# kernel_rw_rpc_sysctl(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_rpc_sysctl',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type proc_t, proc_net_t, sysctl_rpc_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file rw_file_perms;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 proc_t:dir search;
|
|
|
|
allow $1 proc_net_t:dir search;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 sysctl_rpc_t:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_rpc_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to read all sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_read_all_sysctl',`
|
2005-07-20 17:06:10 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute sysctl_type;
|
|
|
|
type proc_t, proc_net_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file r_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
# proc_net_t for /proc/net/rpc sysctls
|
|
|
|
allow $1 { proc_t proc_net_t }:dir search;
|
|
|
|
|
|
|
|
allow $1 sysctl_type:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_type:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write all sysctls.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_rw_all_sysctl',`
|
2005-07-20 17:06:10 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute sysctl_type;
|
|
|
|
type proc_t, proc_net_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class file { rw_file_perms setattr };
|
|
|
|
')
|
|
|
|
|
|
|
|
# proc_net_t for /proc/net/rpc sysctls
|
|
|
|
allow $1 { proc_t proc_net_t }:dir search;
|
|
|
|
|
|
|
|
allow $1 sysctl_type:dir r_dir_perms;
|
|
|
|
allow $1 sysctl_type:file { rw_file_perms setattr };
|
2005-05-30 21:17:20 +00:00
|
|
|
')
|
|
|
|
|
2005-05-27 20:44:05 +00:00
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send a kill signal to unlabeled processes.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-05-27 20:44:05 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_kill_unlabeled',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class process sigkill;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 unlabeled_t:process sigkill;
|
2005-05-27 20:44:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send general signals to unlabeled processes.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-05-27 20:44:05 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_signal_unlabeled',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class process signal;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 unlabeled_t:process signal;
|
2005-05-27 20:44:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send a null signal to unlabeled processes.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-05-27 20:44:05 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_signull_unlabeled',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class process signull;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 unlabeled_t:process signull;
|
2005-05-27 20:44:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send a stop signal to unlabeled processes.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-05-27 20:44:05 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_sigstop_unlabeled',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class process sigstop;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 unlabeled_t:process sigstop;
|
2005-05-27 20:44:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send a child terminated signal to unlabeled processes.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </param>
|
2005-05-27 20:44:05 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_sigchld_unlabeled',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class process sigchld;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 unlabeled_t:process sigchld;
|
2005-05-27 20:44:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-07-11 19:02:50 +00:00
|
|
|
## List unlabeled directories.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2005-07-11 19:02:50 +00:00
|
|
|
## Domain allowed access.
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-27 20:44:05 +00:00
|
|
|
#
|
2005-07-11 19:02:50 +00:00
|
|
|
interface(`kernel_list_unlabeled',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
2005-07-11 19:02:50 +00:00
|
|
|
class dir r_dir_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
allow $1 unlabeled_t:dir r_dir_perms;
|
2005-07-08 20:44:57 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write unlabeled directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_rw_unlabeled_dir',`
|
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class dir rw_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 unlabeled_t:dir rw_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-07-11 19:02:50 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts by caller to get attributes for
|
|
|
|
## unlabeled block devices.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## The process type not to audit.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_dontaudit_getattr_unlabeled_blk_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class blk_file getattr;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 unlabeled_t:blk_file getattr;
|
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write unlabeled block device nodes.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_use_unlabeled_blk_dev',`
|
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class blk_file rw_file_perms;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 unlabeled_t:blk_file getattr;
|
2005-05-27 20:44:05 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-08 20:44:57 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Allow caller to relabel unlabeled objects.
|
2005-07-08 20:44:57 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
|
|
|
## The process type relabeling the objects.
|
|
|
|
## </param>
|
2005-05-27 20:44:05 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`kernel_relabel_unlabeled',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
2005-07-20 17:06:10 +00:00
|
|
|
gen_require_set({ getattr relabelfrom },dir_file_class_set)
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 unlabeled_t:dir_file_class_set { getattr relabelfrom };
|
2005-05-27 20:44:05 +00:00
|
|
|
')
|
|
|
|
|
2005-07-05 20:59:51 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Unconfined access to the kernel.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain allowed access.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_unconfined',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t, unlabeled_t;
|
2005-07-20 17:06:10 +00:00
|
|
|
attribute proc_type, sysctl_type;
|
|
|
|
attribute kern_unconfined;
|
2005-07-05 20:59:51 +00:00
|
|
|
attribute can_load_kernmodule, can_receive_kernel_messages;
|
2005-07-20 17:06:10 +00:00
|
|
|
class dir r_dir_perms;
|
|
|
|
class file { rw_file_perms setattr };
|
2005-07-05 20:59:51 +00:00
|
|
|
')
|
|
|
|
|
2005-07-20 17:06:10 +00:00
|
|
|
allow $1 proc_type:{ dir file } *;
|
2005-07-05 20:59:51 +00:00
|
|
|
|
|
|
|
allow $1 sysctl_t:{ dir file } *;
|
2005-07-06 20:28:29 +00:00
|
|
|
|
2005-07-05 20:59:51 +00:00
|
|
|
allow $1 kernel_t:system *;
|
2005-07-06 20:28:29 +00:00
|
|
|
|
2005-07-20 17:06:10 +00:00
|
|
|
allow $1 unlabeled_t:dir_file_class_set *;
|
2005-07-06 20:28:29 +00:00
|
|
|
allow $1 unlabeled_t:filesystem *;
|
2005-07-05 20:59:51 +00:00
|
|
|
|
|
|
|
typeattribute $1 can_load_kernmodule, can_receive_kernel_messages;
|
2005-07-20 17:06:10 +00:00
|
|
|
typeattribute $1 kern_unconfined;
|
2005-07-05 20:59:51 +00:00
|
|
|
|
|
|
|
kernel_rw_all_sysctl($1)
|
|
|
|
')
|
2005-09-12 15:17:39 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# Reversed interfaces
|
|
|
|
#
|
|
|
|
# The following are reversed interfaces, meaning the point of view of the caller
|
|
|
|
# of the interface is the object (target) type, rather than the subject (source)
|
|
|
|
# type, like all other interfaces in the policy. These interfaces are here to
|
|
|
|
# decouple policy from the base module, and should not be used anywhere else.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to send a SIGCHLD
|
|
|
|
## signal to the specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain receiving the SIGCHLD.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_sigchld_from',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class process sigchld;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:process sigchld;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow unlabeled processes to send a SIGCHLD
|
|
|
|
## signal to the specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## Domain receiving the SIGCHLD.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_sigchld_from_unlabeled',`
|
|
|
|
gen_require(`
|
|
|
|
type unlabeled_t;
|
|
|
|
class process sigchld;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow unlabeled_t $1:process sigchld;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to search the
|
|
|
|
## specified directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="dir_type">
|
|
|
|
## Directory type to search.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_search_from',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class dir search;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:dir search;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to read the contents
|
|
|
|
## of the specified directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="dir_type">
|
|
|
|
## Directory type to list.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_list_from',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:dir r_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to read the
|
|
|
|
## specified file.
|
|
|
|
## </summary>
|
|
|
|
## <param name="dir_type">
|
|
|
|
## Directory type to list.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_read_file_from',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:file r_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to search the
|
|
|
|
## specified directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="dir_type">
|
|
|
|
## Directory type to search.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_search_from',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class dir search;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:dir search;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Use the specified types for /lib directory
|
|
|
|
## and use the dynamic link/loader for automatic loading
|
|
|
|
## of shared libraries, and the link/loader
|
|
|
|
## cache.
|
|
|
|
## </summary>
|
|
|
|
## <param name="lib_type">
|
|
|
|
## The type of the lib directories.
|
|
|
|
## </param>
|
|
|
|
## <param name="ld_type">
|
|
|
|
## The type of the dynamic link/loader.
|
|
|
|
## </param>
|
|
|
|
## <param name="cache_type">
|
|
|
|
## The type of the dynamic link/loader cache.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_use_ld_so_from',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class dir r_dir_perms;
|
|
|
|
class lnk_file r_file_perms;
|
|
|
|
class file rx_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_list_etc(kernel_t)
|
|
|
|
allow kernel_t $1:dir r_dir_perms;
|
|
|
|
allow kernel_t $1:lnk_file r_file_perms;
|
|
|
|
allow kernel_t $2:lnk_file r_file_perms;
|
|
|
|
allow kernel_t $2:file rx_file_perms;
|
|
|
|
allow kernel_t $3:file r_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to load and execute
|
|
|
|
## functions from the specified shared libraries.
|
|
|
|
## </summary>
|
|
|
|
## <param name="lib_dir_type">
|
|
|
|
## The type of the lib directories.
|
|
|
|
## </param>
|
|
|
|
## <param name="shlib_type">
|
|
|
|
## Shared library type.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_use_shared_libs_from',`
|
|
|
|
gen_require(`
|
|
|
|
type kernel_t;
|
|
|
|
class lnk_file r_file_perms;
|
2005-09-15 15:34:31 +00:00
|
|
|
class file rx_file_perms;
|
2005-09-12 15:17:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:dir r_dir_perms;
|
|
|
|
allow kernel_t $1:lnk_file r_file_perms;
|
|
|
|
allow kernel_t $2:lnk_file r_file_perms;
|
|
|
|
allow kernel_t $2:file rx_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to send a syslog
|
|
|
|
## message to the specified domain,
|
|
|
|
## connecting over the specified named
|
|
|
|
## socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="socket">
|
|
|
|
## The type of the named socket file.
|
|
|
|
## </param>
|
|
|
|
## <param name="syslog_type">
|
|
|
|
## The domain of the syslog daemon.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_send_syslog_msg_from',`
|
|
|
|
gen_require(`
|
|
|
|
type syslogd_t, devlog_t;
|
|
|
|
class lnk_file read;
|
|
|
|
class sock_file rw_file_perms;
|
|
|
|
class unix_dgram_socket sendto;
|
|
|
|
class unix_stream_socket connectto;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:lnk_file read;
|
|
|
|
allow kernel_t $1:sock_file rw_file_perms;
|
|
|
|
|
|
|
|
# the type of socket depends on the syslog daemon
|
|
|
|
allow kernel_t $2:unix_dgram_socket sendto;
|
|
|
|
allow kernel_t $2:unix_stream_socket connectto;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow the kernel to send UDP network traffic
|
|
|
|
## the specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## The type of the receiving domain.
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`kernel_udp_sendfrom',`
|
|
|
|
gen_require(`
|
|
|
|
type portmap_t;
|
|
|
|
class udp_socket { sendto recvfrom };
|
|
|
|
')
|
|
|
|
|
|
|
|
allow kernel_t $1:udp_socket sendto;
|
|
|
|
allow $1 kernel_t:udp_socket recvfrom;
|
|
|
|
')
|