Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Macros for all user login domains.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
define(`network_home_dir', `
Chris PeBenito 0fbfa5
create_dir_file($1, $2)
Chris PeBenito 0fbfa5
can_exec($1, $2)
Chris PeBenito 0fbfa5
allow $1 $2:{ sock_file fifo_file } create_file_perms;
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# base_user_domain(domain_prefix)
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Define derived types and rules for an ordinary user domain.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# The type declaration and role authorization for the domain must be
Chris PeBenito 0fbfa5
# provided separately.  Likewise, domain transitions into this domain
Chris PeBenito 0fbfa5
# must be specified separately.  
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# base_user_domain() is also called by the admin_domain() macro
Chris PeBenito 0fbfa5
undefine(`base_user_domain')
Chris PeBenito 0fbfa5
define(`base_user_domain', `
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t self:capability { setgid chown fowner };
Chris PeBenito 0fbfa5
dontaudit $1_t self:capability { sys_nice fsetid };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# $1_r is authorized for $1_t for the initial login domain.
Chris PeBenito 0fbfa5
role $1_r types $1_t;
Chris PeBenito 0fbfa5
allow system_r $1_r;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
r_dir_file($1_t, usercanread)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Grant permissions within the domain.
Chris PeBenito 0fbfa5
general_domain_access($1_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (allow_execmem) {
Chris PeBenito 0fbfa5
# Allow loading DSOs that require executable stack.
Chris PeBenito 0fbfa5
allow $1_t self:process execmem;
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (allow_execmod) {
Chris PeBenito 0fbfa5
# Allow text relocations on system shared libraries, e.g. libGL.
Chris PeBenito 0fbfa5
allow $1_t texrel_shlib_t:file execmod;
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# kdeinit wants this access
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
allow $1_t device_t:dir { getattr search };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Find CDROM devices
Chris PeBenito 0fbfa5
r_dir_file($1_t, sysctl_dev_t)
Chris PeBenito 0fbfa5
# for eject
Chris PeBenito 0fbfa5
allow $1_t fixed_disk_device_t:blk_file getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t fs_type:dir getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t event_device_t:chr_file { getattr read ioctl };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# open office is looking for the following
Chris PeBenito 0fbfa5
allow $1_t dri_device_t:chr_file getattr;
Chris PeBenito 0fbfa5
dontaudit $1_t dri_device_t:chr_file rw_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
file_browse_domain($1_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# allow ptrace
Chris PeBenito 0fbfa5
can_ptrace($1_t, $1_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Create, access, and remove files in home directory.
Chris PeBenito 0fbfa5
file_type_auto_trans($1_t, $1_home_dir_t, $1_home_t)
Chris PeBenito 0fbfa5
allow $1_t $1_home_t:notdevfile_class_set { relabelfrom relabelto };
Chris PeBenito 0fbfa5
can_setfscreate($1_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t autofs_t:dir { search getattr };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (use_nfs_home_dirs) {
Chris PeBenito 0fbfa5
network_home_dir($1_t, nfs_t)
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (use_samba_home_dirs) {
Chris PeBenito 0fbfa5
network_home_dir($1_t, cifs_t)
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
can_exec($1_t, { removable_t noexattrfile } )
Chris PeBenito 0fbfa5
if (user_rw_noexattrfile) {
Chris PeBenito 0fbfa5
create_dir_file($1_t, noexattrfile)
Chris PeBenito 0fbfa5
create_dir_file($1_t, removable_t)
Chris PeBenito 0fbfa5
# Write floppies 
Chris PeBenito 0fbfa5
allow $1_t removable_device_t:blk_file rw_file_perms;
Chris PeBenito 0fbfa5
allow $1_t usbtty_device_t:chr_file write;
Chris PeBenito 0fbfa5
} else {
Chris PeBenito 0fbfa5
r_dir_file($1_t, noexattrfile)
Chris PeBenito 0fbfa5
r_dir_file($1_t, removable_t)
Chris PeBenito 0fbfa5
allow $1_t removable_device_t:blk_file r_file_perms;
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
allow $1_t usbtty_device_t:chr_file read;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# GNOME checks for usb and other devices
Chris PeBenito 0fbfa5
rw_dir_file($1_t,usbfs_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
can_exec($1_t, noexattrfile)
Chris PeBenito 0fbfa5
# Bind to a Unix domain socket in /tmp.
Chris PeBenito 0fbfa5
allow $1_t $1_tmp_t:unix_stream_socket name_bind;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Access ttys.
Chris PeBenito 0fbfa5
allow $1_t privfd:fd use;
Chris PeBenito 0fbfa5
allow $1_t $1_tty_device_t:chr_file { setattr rw_file_perms };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Use the type when relabeling terminal devices.
Chris PeBenito 0fbfa5
type_change $1_t tty_device_t:chr_file $1_tty_device_t;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# read localization information
Chris PeBenito 0fbfa5
read_locale($1_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Debian login is from shadow utils and does not allow resetting the perms.
Chris PeBenito 0fbfa5
# have to fix this!
Chris PeBenito 0fbfa5
type_change $1_t ttyfile:chr_file $1_tty_device_t;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for running TeX programs
Chris PeBenito 0fbfa5
r_dir_file($1_t, tetex_data_t)
Chris PeBenito 0fbfa5
can_exec($1_t, tetex_data_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Use the type when relabeling pty devices.
Chris PeBenito 0fbfa5
type_change $1_t server_pty:chr_file $1_devpts_t;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
tmpfs_domain($1)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`cardmgr.te', `
Chris PeBenito 0fbfa5
# to allow monitoring of pcmcia status
Chris PeBenito 0fbfa5
allow $1_t cardmgr_var_run_t:file { getattr read };
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Read and write /var/catman.
Chris PeBenito 0fbfa5
allow $1_t catman_t:dir rw_dir_perms;
Chris PeBenito 0fbfa5
allow $1_t catman_t:file create_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Modify mail spool file.
Chris PeBenito 0fbfa5
allow $1_t mail_spool_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
allow $1_t mail_spool_t:file rw_file_perms;
Chris PeBenito 0fbfa5
allow $1_t mail_spool_t:lnk_file read;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Allow graphical boot to check battery lifespan
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
ifdef(`apmd.te', `
Chris PeBenito 0fbfa5
allow $1_t apmd_t:unix_stream_socket connectto;
Chris PeBenito 0fbfa5
allow $1_t apmd_var_run_t:sock_file write;
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Allow the query of filesystem quotas
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
allow $1_t fs_type:filesystem quotaget;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Run helper programs.
Chris PeBenito 0fbfa5
can_exec_any($1_t)
Chris PeBenito 0fbfa5
# Run programs developed by other users in the same domain.
Chris PeBenito 0fbfa5
can_exec($1_t, $1_home_t)
Chris PeBenito 0fbfa5
can_exec($1_t, $1_tmp_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Run user programs that require different permissions in their own domain.
Chris PeBenito 0fbfa5
# These rules were moved into the individual program domains.
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Instantiate derived domains for a number of programs.
Chris PeBenito 0fbfa5
# These derived domains encode both information about the calling
Chris PeBenito 0fbfa5
# user domain and the program, and allow us to maintain separation
Chris PeBenito 0fbfa5
# between different instances of the program being run by different
Chris PeBenito 0fbfa5
# user domains.
Chris PeBenito 0fbfa5
ifdef(`gnome-pty-helper.te', `gph_domain($1, $1)')
Chris PeBenito 0fbfa5
ifdef(`chkpwd.te', `chkpwd_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`fingerd.te', `fingerd_macro($1)')
Chris PeBenito 0fbfa5
ifdef(`mta.te', `mail_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`crontab.te', `crontab_domain($1)')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`screen.te', `screen_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`tvtime.te', `tvtime_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`mozilla.te', `mozilla_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`samba.te', `samba_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`games.te', `games_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`gpg.te', `gpg_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`xauth.te', `xauth_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`startx.te', `xserver_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`lpr.te', `lpr_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`ssh.te', `ssh_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`irc.te', `irc_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`using_spamassassin', `spamassassin_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`uml.te', `uml_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`cdrecord.te', `cdrecord_domain($1)')
Chris PeBenito 0fbfa5
ifdef(`mplayer.te', `mplayer_domains($1)')
Chris PeBenito 0fbfa5
ifdef(`gift.te', `gift_domains($1)')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Instantiate a derived domain for user cron jobs.
Chris PeBenito 0fbfa5
ifdef(`crond.te', `crond_domain($1)')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`vmware.te', `vmware_domain($1)')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (user_direct_mouse) {
Chris PeBenito 0fbfa5
# Read the mouse.
Chris PeBenito 0fbfa5
allow $1_t mouse_device_t:chr_file r_file_perms;
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
# Access other miscellaneous devices.
Chris PeBenito 0fbfa5
allow $1_t misc_device_t:{ chr_file blk_file } rw_file_perms;
Chris PeBenito 0fbfa5
allow $1_t device_t:lnk_file { getattr read };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
can_resmgrd_connect($1_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# evolution and gnome-session try to create a netlink socket
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
dontaudit $1_t self:netlink_socket create_socket_perms;
Chris PeBenito 0fbfa5
dontaudit $1_t self:netlink_route_socket create_netlink_socket_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Use the network.
Chris PeBenito 0fbfa5
can_network($1_t)
Chris PeBenito 0fbfa5
can_ypbind($1_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`pamconsole.te', `
Chris PeBenito 0fbfa5
allow $1_t pam_var_console_t:dir search;
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t var_lock_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Grant permissions to access the system DBus
Chris PeBenito 0fbfa5
ifdef(`dbusd.te', `
Chris PeBenito 0fbfa5
dbusd_client(system, $1)
Chris PeBenito 0fbfa5
can_network_server_tcp($1_dbusd_t)
Chris PeBenito 0fbfa5
allow $1_dbusd_t reserved_port_t:tcp_socket name_bind;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t system_dbusd_t:dbus { send_msg acquire_svc };
Chris PeBenito 0fbfa5
dbusd_client($1, $1)
Chris PeBenito 0fbfa5
allow $1_t $1_dbusd_t:dbus { send_msg acquire_svc };
Chris PeBenito 0fbfa5
dbusd_domain($1)
Chris PeBenito 0fbfa5
ifdef(`hald.te', `
Chris PeBenito 0fbfa5
allow $1_t hald_t:dbus send_msg;
Chris PeBenito 0fbfa5
allow hald_t $1_t:dbus send_msg;
Chris PeBenito 0fbfa5
') dnl end ifdef hald.te
Chris PeBenito 0fbfa5
') dnl end ifdef dbus.te
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# allow port_t name binding for UDP because it is not very usable otherwise
Chris PeBenito 0fbfa5
allow $1_t port_t:udp_socket name_bind;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Gnome pannel binds to the following
Chris PeBenito 0fbfa5
ifdef(`cups.te', `
Chris PeBenito 0fbfa5
allow $1_t { cupsd_etc_t cupsd_rw_etc_t }:file { read getattr };
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for perl
Chris PeBenito 0fbfa5
dontaudit $1_t net_conf_t:file ioctl;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Communicate within the domain.
Chris PeBenito 0fbfa5
can_udp_send($1_t, self)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Connect to inetd.
Chris PeBenito 0fbfa5
ifdef(`inetd.te', `
Chris PeBenito 0fbfa5
can_tcp_connect($1_t, inetd_t)
Chris PeBenito 0fbfa5
can_udp_send($1_t, inetd_t)
Chris PeBenito 0fbfa5
can_udp_send(inetd_t, $1_t)
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Connect to portmap.
Chris PeBenito 0fbfa5
ifdef(`portmap.te', `can_tcp_connect($1_t, portmap_t)')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Inherit and use sockets from inetd
Chris PeBenito 0fbfa5
ifdef(`inetd.te', `
Chris PeBenito 0fbfa5
allow $1_t inetd_t:fd use;
Chris PeBenito 0fbfa5
allow $1_t inetd_t:tcp_socket rw_stream_socket_perms;')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Very permissive allowing every domain to see every type.
Chris PeBenito 0fbfa5
allow $1_t kernel_t:system ipc_info;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# When the user domain runs ps, there will be a number of access
Chris PeBenito 0fbfa5
# denials when ps tries to search /proc.  Do not audit these denials.
Chris PeBenito 0fbfa5
dontaudit $1_t domain:dir r_dir_perms;
Chris PeBenito 0fbfa5
dontaudit $1_t domain:notdevfile_class_set r_file_perms;
Chris PeBenito 0fbfa5
dontaudit $1_t domain:process { getattr getsession };
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Cups daemon running as user tries to write /etc/printcap
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
dontaudit $1_t usr_t:file setattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`xserver.te', `
Chris PeBenito 0fbfa5
# for /tmp/.ICE-unix
Chris PeBenito 0fbfa5
file_type_auto_trans($1_t, xdm_xserver_tmp_t, $1_tmp_t, sock_file)
Chris PeBenito 0fbfa5
allow $1_t xserver_misc_device_t:{ chr_file blk_file } rw_file_perms;
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`xdm.te', `
Chris PeBenito 0fbfa5
# Connect to the X server run by the X Display Manager.
Chris PeBenito 0fbfa5
can_unix_connect($1_t, xdm_t)
Chris PeBenito 0fbfa5
allow $1_t xdm_tmp_t:sock_file rw_file_perms;
Chris PeBenito 0fbfa5
allow $1_t xdm_tmp_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
allow $1_t xdm_tmp_t:file { getattr read };
Chris PeBenito 0fbfa5
allow $1_t xdm_xserver_tmp_t:sock_file { read write };
Chris PeBenito 0fbfa5
allow $1_t xdm_xserver_tmp_t:dir search;
Chris PeBenito 0fbfa5
allow $1_t xdm_xserver_t:unix_stream_socket connectto;
Chris PeBenito 0fbfa5
# certain apps want to read xdm.pid file
Chris PeBenito 0fbfa5
r_dir_file($1_t, xdm_var_run_t)
Chris PeBenito 0fbfa5
allow $1_t xdm_var_lib_t:file { getattr read };
Chris PeBenito 0fbfa5
allow xdm_t $1_home_dir_t:dir getattr;
Chris PeBenito 0fbfa5
ifdef(`xauth.te', `
Chris PeBenito 0fbfa5
file_type_auto_trans(xdm_t, $1_home_dir_t, $1_xauth_home_t, file)
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for shared memory
Chris PeBenito 0fbfa5
allow xdm_xserver_t $1_tmpfs_t:file { read write };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
')dnl end ifdef xdm.te
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Access the sound device.
Chris PeBenito 0fbfa5
allow $1_t sound_device_t:chr_file { getattr read write ioctl };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Access the power device.
Chris PeBenito 0fbfa5
allow $1_t power_device_t:chr_file { getattr read write ioctl };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t var_log_t:dir { getattr search };
Chris PeBenito 0fbfa5
dontaudit $1_t logfile:file getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Check to see if cdrom is mounted
Chris PeBenito 0fbfa5
allow $1_t mnt_t:dir { getattr search };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Get attributes of file systems.
Chris PeBenito 0fbfa5
allow $1_t fs_type:filesystem getattr;
Chris PeBenito 0fbfa5
allow $1_t removable_t:filesystem getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Read and write /dev/tty and /dev/null.
Chris PeBenito 0fbfa5
allow $1_t devtty_t:chr_file rw_file_perms;
Chris PeBenito 0fbfa5
allow $1_t null_device_t:chr_file rw_file_perms;
Chris PeBenito 0fbfa5
allow $1_t zero_device_t:chr_file { rw_file_perms execute };
Chris PeBenito 0fbfa5
allow $1_t { random_device_t urandom_device_t }:chr_file { getattr read ioctl };
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Added to allow reading of cdrom
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
allow $1_t rpc_pipefs_t:dir getattr;
Chris PeBenito 0fbfa5
allow $1_t nfsd_fs_t:dir getattr;
Chris PeBenito 0fbfa5
allow $1_t binfmt_misc_fs_t:dir getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# /initrd is left mounted, various programs try to look at it
Chris PeBenito 0fbfa5
dontaudit $1_t ramfs_t:dir getattr;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Emacs wants this access
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
allow $1_t wtmp_t:file r_file_perms;
Chris PeBenito 0fbfa5
dontaudit $1_t wtmp_t:file write;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Read the devpts root directory.
Chris PeBenito 0fbfa5
allow $1_t devpts_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow $1_t src_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
allow $1_t src_t:notdevfile_class_set r_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
if (read_default_t) {
Chris PeBenito 0fbfa5
allow $1_t default_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
allow $1_t default_t:notdevfile_class_set r_file_perms;
Chris PeBenito 0fbfa5
}
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
read_sysctl($1_t);
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Caused by su - init scripts
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
dontaudit $1_t initrc_devpts_t:chr_file { ioctl read write };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Running ifconfig as a user generates the following
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
dontaudit $1_t self:socket create;
Chris PeBenito 0fbfa5
dontaudit $1_t sysctl_net_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
dontaudit $1_t default_context_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
ifdef(`rpcd.te', `
Chris PeBenito 0fbfa5
create_dir_file($1_t, nfsd_rw_t)
Chris PeBenito 0fbfa5
')
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
')dnl end base_user_domain macro
Chris PeBenito 0fbfa5