## Unconfined user role
########################################
##
## Change from the unconfineduser role.
##
##
##
## Change from the unconfineduser role to
## the specified role.
##
##
## This is an interface to support third party modules
## and its use is not allowed in upstream reference
## policy.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`unconfined_role_change_to',`
gen_require(`
role unconfined_r;
')
allow unconfined_r $1;
')
########################################
##
## Transition to the unconfined domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_domtrans',`
gen_require(`
type unconfined_t, unconfined_exec_t;
')
domtrans_pattern($1,unconfined_exec_t,unconfined_t)
')
########################################
##
## Execute specified programs in the unconfined domain.
##
##
##
## The type of the process performing this action.
##
##
##
##
## The role to allow the unconfined domain.
##
##
#
interface(`unconfined_run',`
gen_require(`
type unconfined_t;
')
unconfined_domtrans($1)
role $2 types unconfined_t;
')
########################################
##
## Transition to the unconfined domain by executing a shell.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_shell_domtrans',`
gen_require(`
attribute unconfined_login_domain;
')
typeattribute $1 unconfined_login_domain;
')
########################################
##
## Execute an Xserver session in unconfined domain. This
## is an explicit transition, requiring the
## caller to use setexeccon().
##
##
##
## Domain allowed to transition.
##
##
#
interface(`unconfined_xsession_spec_domtrans',`
gen_require(`
type unconfined_t;
')
xserver_xsession_spec_domtrans($1, unconfined_t)
allow unconfined_t $1:fd use;
allow unconfined_t $1:fifo_file rw_file_perms;
allow unconfined_t $1:process sigchld;
')
########################################
##
## Allow unconfined to execute the specified program in
## the specified domain.
##
##
##
## Allow unconfined to execute the specified program in
## the specified domain.
##
##
## This is a interface to support third party modules
## and its use is not allowed in upstream reference
## policy.
##
##
##
##
## Domain to execute in.
##
##
##
##
## Domain entry point file.
##
##
#
interface(`unconfined_domtrans_to',`
gen_require(`
type unconfined_t;
')
domtrans_pattern(unconfined_t,$2,$1)
')
########################################
##
## Allow unconfined to execute the specified program in
## the specified domain. Allow the specified domain the
## unconfined role and use of unconfined user terminals.
##
##
##
## Allow unconfined to execute the specified program in
## the specified domain. Allow the specified domain the
## unconfined role and use of unconfined user terminals.
##
##
## This is a interface to support third party modules
## and its use is not allowed in upstream reference
## policy.
##
##
##
##
## Domain to execute in.
##
##
##
##
## Domain entry point file.
##
##
#
interface(`unconfined_run_to',`
gen_require(`
type unconfined_t;
role unconfined_r;
')
domtrans_pattern(unconfined_t,$2,$1)
role unconfined_r types $1;
userdom_use_user_terminals($1)
')
######################################
##
## Stub unconfined role.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_stub_role',`
gen_require(`
role unconfined_r;
')
')
########################################
##
## Inherit file descriptors from the unconfined domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_use_fds',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:fd use;
')
########################################
##
## Send a SIGCHLD signal to the unconfined domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_sigchld',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:process sigchld;
')
########################################
##
## Send a SIGNULL signal to the unconfined domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_signull',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:process signull;
')
########################################
##
## Send generic signals to the unconfined domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_signal',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:process signal;
')
########################################
##
## List unconfined domain directories
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_list_dirs',`
gen_require(`
type unconfined_t;
')
list_dirs_pattern($1, unconfined_t, unconfined_t)
')
########################################
##
## Read unconfined domain files.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_read_files',`
gen_require(`
type unconfined_t;
')
read_files_pattern($1, unconfined_t, unconfined_t)
')
########################################
##
## Read unconfined domain unnamed pipes.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_read_pipes',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:fifo_file read_fifo_file_perms;
')
########################################
##
## Do not audit attempts to read unconfined domain unnamed pipes.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dontaudit_read_pipes',`
gen_require(`
type unconfined_t;
')
dontaudit $1 unconfined_t:fifo_file read;
')
########################################
##
## Read and write unconfined domain unnamed pipes.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_rw_pipes',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:fifo_file rw_fifo_file_perms;
')
########################################
##
## Do not audit attempts to read and write
## unconfined domain unnamed pipes.
##
##
##
## Domain to not audit.
##
##
#
interface(`unconfined_dontaudit_rw_pipes',`
gen_require(`
type unconfined_t;
')
dontaudit $1 unconfined_t:fifo_file rw_file_perms;
')
########################################
##
## Do not audit attempts to read and write
## unconfined domain stream.
##
##
##
## Domain to not audit.
##
##
#
interface(`unconfined_dontaudit_rw_stream',`
gen_require(`
type unconfined_t;
')
dontaudit $1 unconfined_t:unix_stream_socket rw_socket_perms;
')
########################################
##
## Connect to the unconfined domain using
## a unix domain stream socket.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_stream_connect',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:unix_stream_socket connectto;
')
########################################
##
## Do not audit attempts to read or write
## unconfined domain tcp sockets.
##
##
##
## Do not audit attempts to read or write
## unconfined domain tcp sockets.
##
##
## This interface was added due to a broken
## symptom in ldconfig.
##
##
##
##
## Domain to not audit.
##
##
#
interface(`unconfined_dontaudit_rw_tcp_sockets',`
gen_require(`
type unconfined_t;
')
dontaudit $1 unconfined_t:tcp_socket { read write };
')
########################################
##
## Do not audit attempts to read or write
## unconfined domain packet sockets.
##
##
##
## Do not audit attempts to read or write
## unconfined domain packet sockets.
##
##
## This interface was added due to a broken
## symptom.
##
##
##
##
## Domain to not audit.
##
##
#
interface(`unconfined_dontaudit_rw_packet_sockets',`
gen_require(`
type unconfined_t;
')
dontaudit $1 unconfined_t:packet_socket { read write };
')
########################################
##
## Create keys for the unconfined domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_create_keys',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:key create;
')
########################################
##
## Dontaudit write process information for unconfined process.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dontaudit_write_state',`
gen_require(`
type unconfined_t;
')
dontaudit $1 unconfined_t:file write;
')
########################################
##
## Dontaudit read process information for unconfined process.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dontaudit_read_state',`
gen_require(`
type unconfined_t;
')
dontaudit $1 unconfined_t:dir list_dir_perms;
dontaudit $1 unconfined_t:file read_file_perms;
')
########################################
##
## Write keys for the unconfined domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_write_keys',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:key write;
')
########################################
##
## Send messages to the unconfined domain over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dbus_send',`
gen_require(`
type unconfined_t;
class dbus send_msg;
')
allow $1 unconfined_t:dbus send_msg;
allow unconfined_t $1:dbus send_msg;
')
########################################
##
## Create communication channel with unconfined domain over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dbus_acquire_svc',`
gen_require(`
type unconfined_t;
class dbus acquire_svc;
')
allow $1 unconfined_t:dbus acquire_svc;
')
########################################
##
## Send and receive messages from
## unconfined_t over dbus.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dbus_chat',`
gen_require(`
type unconfined_t;
class dbus send_msg;
')
allow $1 unconfined_t:dbus send_msg;
allow unconfined_t $1:dbus send_msg;
')
########################################
##
## Connect to the the unconfined DBUS
## for service (acquire_svc).
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dbus_connect',`
gen_require(`
type unconfined_t;
class dbus acquire_svc;
')
allow $1 unconfined_t:dbus acquire_svc;
')
########################################
##
## Allow ptrace of unconfined domain
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_ptrace',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:process ptrace;
')
########################################
##
## Read and write to unconfined shared memory.
##
##
##
## The type of the process performing this action.
##
##
#
interface(`unconfined_rw_shm',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:shm rw_shm_perms;
')
########################################
##
## Allow apps to set rlimits on unconfined user
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_set_rlimitnh',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:process rlimitinh;
')
########################################
##
## Allow apps to setsched on unconfined user
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_setsched',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:process setsched;
')
########################################
##
## Get the process group of unconfined.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_getpgid',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:process getpgid;
')
########################################
##
## Change to the unconfined role.
##
##
##
## Role allowed access.
##
##
##
#
interface(`unconfined_role_change',`
gen_require(`
role unconfined_r;
')
allow $1 unconfined_r;
')
########################################
##
## Allow domain to attach to TUN devices created by unconfined_t users.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_attach_tun_iface',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:tun_socket relabelfrom;
allow $1 self:tun_socket relabelto;
')
########################################
##
## Allow domain to transition to unconfined_t user
##
##
##
## Domain allowed access.
##
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_transition',`
gen_require(`
type unconfined_t;
')
domtrans_pattern($1,$2,unconfined_t)
allow unconfined_t $2:file entrypoint;
allow $1 unconfined_t:process signal_perms;
')
########################################
##
## unconfined_t domain typebounds calling domain.
##
##
##
## Domain to be typebound.
##
##
#
interface(`unconfined_typebounds',`
gen_require(`
type unconfined_t;
')
typebounds unconfined_t $1;
')
########################################
##
## unconfined_exec_t domain typebounds file_type.
##
##
##
## File type to be typebound.
##
##
#
interface(`unconfined_exec_typebounds',`
gen_require(`
type unconfined_exec_t;
')
typebounds unconfined_exec_t $1;
')
########################################
##
## Send a message to unconfined user over a unix domain datagram socket.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_dgram_send',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:unix_dgram_socket sendto;
')
########################################
##
## Destroy unconfined user's message queue entries.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_destroy_msgq',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:msgq destroy;
')
########################################
##
## Destroy unconfined user's SysV shared memory segments.
##
##
##
## Domain allowed access.
##
##
#
interface(`unconfined_destroy_shm',`
gen_require(`
type unconfined_t;
')
allow $1 unconfined_t:shm destroy;
')