Scroll to navigation

xdm_selinux(8) SELinux Policy xdm xdm_selinux(8)

NAME

xdm_selinux - Security Enhanced Linux Policy for the xdm processes

DESCRIPTION

Security-Enhanced Linux secures the xdm processes via flexible mandatory access control.

The xdm processes execute with the xdm_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier.

For example:

ps -eZ | grep xdm_t

ENTRYPOINTS

The xdm_t SELinux type can be entered via the bin_t, xdm_exec_t file types.

The default entrypoint paths for the xdm_t domain are the following:

All executeables with the default executable label, usually stored in /usr/bin and /usr/sbin. /usr/(s)?bin/lxdm, /usr/(s)?bin/[xgkw]dm, /usr/(s)?bin/gdm-binary, /usr/(s)?bin/lxdm-binary, /usr/X11R6/bin/[xgkw]dm, /usr/bin/slim, /usr/bin/gpe-dm, /opt/kde3/bin/kdm

PROCESS TYPES

SELinux defines process types (domains) for each process running on the system

You can see the context of a process using the -Z option to ps

Policy governs the access confined processes have to files. SELinux xdm policy is very flexible allowing users to setup their xdm processes in as secure a method as possible.

The following process types are defined for xdm:

xdm_t, xdm_dbusd_t

Note: semanage permissive -a xdm_t can be used to make the process type xdm_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated.

BOOLEANS

SELinux policy is customizable based on least access required. xdm policy is extremely flexible and has several booleans that allow you to manipulate the policy and run xdm with the tightest access possible.

If you want to allows xdm to execute bootloader, you must turn on the xdm_exec_bootloader boolean. Disabled by default.

setsebool -P xdm_exec_bootloader 1

If you want to allow xdm logins as sysadm, you must turn on the xdm_sysadm_login boolean. Disabled by default.

setsebool -P xdm_sysadm_login 1

If you want to allow all daemons the ability to read/write terminals, you must turn on the allow_daemons_use_tty boolean. Disabled by default.

setsebool -P allow_daemons_use_tty 1

If you want to allow all domains to use other domains file descriptors, you must turn on the allow_domain_fd_use boolean. Enabled by default.

setsebool -P allow_domain_fd_use 1

If you want to allow unconfined executables to map a memory region as both executable and writable, this is dangerous and the executable should be reported in bugzilla), you must turn on the allow_execmem boolean. Enabled by default.

setsebool -P allow_execmem 1

If you want to allow unconfined executables to make their stack executable. This should never, ever be necessary. Probably indicates a badly coded executable, but could indicate an attack. This executable should be reported in bugzilla), you must turn on the allow_execstack boolean. Enabled by default.

setsebool -P allow_execstack 1

If you want to allow confined applications to run with kerberos, you must turn on the allow_kerberos boolean. Enabled by default.

setsebool -P allow_kerberos 1

If you want to enable polyinstantiated directory support, you must turn on the allow_polyinstantiation boolean. Enabled by default.

setsebool -P allow_polyinstantiation 1

If you want to allow sysadm to debug or ptrace all processes, you must turn on the allow_ptrace boolean. Disabled by default.

setsebool -P allow_ptrace 1

If you want to allow system to run with NIS, you must turn on the allow_ypbind boolean. Disabled by default.

setsebool -P allow_ypbind 1

If you want to allow users to login using a radius server, you must turn on the authlogin_radius boolean. Disabled by default.

setsebool -P authlogin_radius 1

If you want to allow users login programs to access /etc/shadow, you must turn on the authlogin_shadow boolean. Disabled by default.

setsebool -P authlogin_shadow 1

If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default.

setsebool -P domain_kernel_load_modules 1

If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.

setsebool -P fips_mode 1

If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default.

setsebool -P global_ssp 1

If you want to enable support for upstart as the init program, you must turn on the init_upstart boolean. Enabled by default.

setsebool -P init_upstart 1

If you want to allow confined applications to use nscd shared memory, you must turn on the nscd_use_shm boolean. Enabled by default.

setsebool -P nscd_use_shm 1

If you want to allow a user to login as an unconfined domain, you must turn on the unconfined_login boolean. Enabled by default.

setsebool -P unconfined_login 1

If you want to support NFS home directories, you must turn on the use_nfs_home_dirs boolean. Disabled by default.

setsebool -P use_nfs_home_dirs 1

If you want to support SAMBA home directories, you must turn on the use_samba_home_dirs boolean. Disabled by default.

setsebool -P use_samba_home_dirs 1

If you want to support X userspace object manager, you must turn on the xserver_object_manager boolean. Disabled by default.

setsebool -P xserver_object_manager 1

PORT TYPES

SELinux defines port types to represent TCP and UDP ports.

You can see the types associated with a port by using the following command:

semanage port -l

Policy governs the access confined processes have to these ports. SELinux xdm policy is very flexible allowing users to setup their xdm processes in as secure a method as possible.

The following port types are defined for xdm:


Default Defined Ports: tcp 177 udp 177

MANAGED FILES

The SELinux process type xdm_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions.

anon_inodefs_t

auth_cache_t

/var/cache/coolkey(/.*)?

cgroup_t

/cgroup(/.*)?

cifs_t

etc_runtime_t

/[^/]+
/etc/mtab.*
/etc/blkid(/.*)?
/etc/nologin.*
/etc/zipl.conf.*
/etc/smartd.conf.*
/etc/.fstab.hal..+
/etc/sysconfig/ip6?tables.save
/halt
/etc/motd
/fastboot
/poweroff
/etc/issue
/etc/cmtab
/forcefsck
/.autofsck
/.suspended
/fsckoptions
/etc/HOSTNAME
/.autorelabel
/etc/securetty
/etc/nohotplug
/etc/issue.net
/etc/killpower
/etc/ioctl.save
/etc/reader.conf
/etc/fstab.REVOKE
/etc/mtab.fuselock
/etc/network/ifstate
/etc/sysconfig/hwconf
/etc/ptal/ptal-printd-like
/etc/xorg.conf.d/00-system-setup-keyboard.conf

etc_t

/etc/.*
/var/db/.*.db
/usr/etc(/.*)?
/var/ftp/etc(/.*)?
/usr/local/etc(/.*)?
/var/lib/openshift/.limits.d(/.*)?
/var/lib/openshift/.openshift-proxy.d(/.*)?
/var/lib/openshift/.stickshift-proxy.d(/.*)?
/var/lib/stickshift/.limits.d(/.*)?
/var/lib/stickshift/.stickshift-proxy.d(/.*)?
/var/named/chroot/etc(/.*)?
/etc/ipsec.d/examples(/.*)?
/var/spool/postfix/etc(/.*)?
/etc
/etc/cups/client.conf

faillog_t

/var/log/btmp.*
/var/log/faillog.*
/var/log/tallylog.*
/var/run/faillock(/.*)?

fonts_cache_t

/var/cache/fontconfig(/.*)?

gconf_home_t

/root/.local.*
/root/.gconf(d)?(/.*)?
/home/[^/]*/.local.*
/home/[^/]*/.gconf(d)?(/.*)?
/home/staff/.local.*
/home/staff/.gconf(d)?(/.*)?

gnome_home_type

initrc_tmp_t

initrc_var_run_t

/var/run/utmp
/var/run/random-seed
/var/run/runlevel.dir
/var/run/setmixer_flag

krb5_host_rcache_t

/var/cache/krb5rcache(/.*)?
/var/tmp/host_0
/var/tmp/HTTP_23

lastlog_t

/var/log/lastlog.*

locale_t

/usr/lib/locale(/.*)?
/usr/share/locale(/.*)?
/usr/share/zoneinfo(/.*)?
/usr/share/X11/locale(/.*)?
/etc/timezone
/etc/localtime
/etc/sysconfig/clock
/etc/avahi/etc/localtime
/var/empty/sshd/etc/localtime
/var/named/chroot/etc/localtime
/var/spool/postfix/etc/localtime

mnt_t

/mnt(/[^/]*)
/mnt(/[^/]*)?
/rhev(/[^/]*)?
/media(/[^/]*)
/media(/[^/]*)?
/etc/rhgb(/.*)?
/media/.hal-.*
/net
/afs
/rhev
/misc

nfs_t

pam_var_console_t

/var/run/console(/.*)?

pam_var_run_t

/var/(db|adm)/sudo(/.*)?
/var/run/sudo(/.*)?
/var/lib/sudo(/.*)?
/var/run/sepermit(/.*)?
/var/run/pam_mount(/.*)?

pcscd_var_run_t

/var/run/pcscd.events(/.*)?
/var/run/pcscd.pid
/var/run/pcscd.pub
/var/run/pcscd.comm

security_t

shadow_t

/etc/shadow.*
/etc/gshadow.*
/var/db/shadow.*
/etc/passwd.adjunct.*
/etc/.pwd.lock
/etc/group.lock
/etc/passwd.lock

tmp_t

/tmp
/usr/tmp
/var/tmp
/tmp-inst
/var/tmp-inst
/var/tmp/vi.recover

user_fonts_t

/home/[^/]*/.fonts(/.*)?
/home/staff/.fonts(/.*)?

user_home_t

/home/[^/]*/.+
/home/staff/.+

user_tmp_t

/tmp/gconfd-.*
/tmp/gconfd-staff

user_tmpfs_t

/dev/shm/mono.*
/dev/shm/pulse-shm.*

var_auth_t

/var/ace(/.*)?
/var/rsa(/.*)?
/var/lib/rsa(/.*)?
/var/lib/abl(/.*)?
/var/run/pam_ssh(/.*)?
/var/lib/pam_ssh(/.*)?
/var/lib/pam_shield(/.*)?
/var/opt/quest/vas/vasd(/.*)?
/var/lib/google-authenticator(/.*)?

wtmp_t

/var/log/wtmp.*

xauth_home_t

/root/.Xauth.*
/root/.xauth.*
/root/.serverauth.*
/var/lib/pqsql/.xauth.*
/var/lib/pqsql/.Xauthority.*
/var/lib/nxserver/home/.xauth.*
/var/lib/nxserver/home/.Xauthority.*
/home/[^/]*/.xauth.*
/home/[^/]*/.Xauthority.*
/home/[^/]*/.serverauth.*
/home/staff/.xauth.*
/home/staff/.Xauthority.*
/home/staff/.serverauth.*

xdm_home_t

/home/[^/]*/.dmrc.*
/home/[^/]*/.xsession-errors.*
/home/staff/.dmrc.*
/home/staff/.xsession-errors.*

xdm_lock_t

xdm_log_t

/var/log/gdm(/.*)?
/var/log/lxdm.log.*
/var/log/slim.log.*

xdm_rw_etc_t

/etc/X11/wdm(/.*)?

xdm_spool_t

/var/spool/gdm(/.*)?

xdm_tmp_t

/tmp/.X11-unix(/.*)?
/tmp/.ICE-unix(/.*)?
/tmp/.X0-lock

xdm_tmpfs_t

xdm_var_lib_t

/var/lib/[gxkw]dm(/.*)?
/var/lib/lxdm(/.*)?
/var/cache/gdm(/.*)?

xdm_var_run_t

/usr/lib(64)?/qt-.*/etc/settings(/.*)?
/var/run/[gx]dm.pid
/etc/kde3?/kdm/backgroundrc
/var/run/kdm(/.*)?
/var/run/gdm(/.*)?
/var/run/slim.*
/var/run/lxdm(/*.)?
/var/run/slim(/.*)?
/var/run/xauth(/.*)?
/var/run/xdmctl(/.*)?
/var/run/lxdm.pid
/var/run/lxdm.auth
/var/run/gdm_socket

xkb_var_lib_t

/var/lib/xkb(/.*)?
/usr/X11R6/lib/X11/xkb/.*
/usr/X11R6/lib/X11/xkb

xserver_log_t

/var/[xgk]dm(/.*)?
/var/log/[kw]dm.log.*
/usr/var/[xgkw]dm(/.*)?
/var/log/Xorg.*
/var/log/XFree86.*
/var/log/nvidia-installer.log.*

xserver_tmpfs_t

FILE CONTEXTS

SELinux requires files to have an extended attribute to define the file type.

You can see the context of a file using the -Z option to ls

Policy governs the access confined processes have to these files. SELinux xdm policy is very flexible allowing users to setup their xdm processes in as secure a method as possible.

EQUIVALENCE DIRECTORIES

xdm policy stores data with multiple different file context types under the /var/run/gdm directory. If you would like to store the data in a different directory you can use the semanage command to create an equivalence mapping. If you wanted to store this data under the /srv dirctory you would execute the following command:

semanage fcontext -a -e /var/run/gdm /srv/gdm
restorecon -R -v /srv/gdm

xdm policy stores data with multiple different file context types under the /var/run/slim directory. If you would like to store the data in a different directory you can use the semanage command to create an equivalence mapping. If you wanted to store this data under the /srv dirctory you would execute the following command:

semanage fcontext -a -e /var/run/slim /srv/slim
restorecon -R -v /srv/slim

STANDARD FILE CONTEXT

SELinux defines the file context types for the xdm, if you wanted to store files with these types in a diffent paths, you need to execute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk.

semanage fcontext -a -t xdm_var_run_t '/srv/myxdm_content(/.*)?'
restorecon -R -v /srv/myxdm_content

Note: SELinux often uses regular expressions to specify labels that match multiple files.

The following file types are defined for xdm:

xdm_etc_t

- Set files with the xdm_etc_t type, if you want to store xdm files in the /etc directories.

xdm_exec_t

- Set files with the xdm_exec_t type, if you want to transition an executable to the xdm_t domain.

/usr/(s)?bin/lxdm, /usr/(s)?bin/[xgkw]dm, /usr/(s)?bin/gdm-binary, /usr/(s)?bin/lxdm-binary, /usr/X11R6/bin/[xgkw]dm, /usr/bin/slim, /usr/bin/gpe-dm, /opt/kde3/bin/kdm

xdm_home_t

- Set files with the xdm_home_t type, if you want to store xdm files in the users home directory.

/home/[^/]*/.dmrc.*, /home/[^/]*/.xsession-errors.*, /home/staff/.dmrc.*, /home/staff/.xsession-errors.*

xdm_lock_t

- Set files with the xdm_lock_t type, if you want to treat the files as xdm lock data, stored under the /var/lock directory

xdm_log_t

- Set files with the xdm_log_t type, if you want to treat the data as xdm log data, usually stored under the /var/log directory.

/var/log/gdm(/.*)?, /var/log/lxdm.log.*, /var/log/slim.log.*

xdm_rw_etc_t

- Set files with the xdm_rw_etc_t type, if you want to store xdm rw files in the /etc directories.

xdm_spool_t

- Set files with the xdm_spool_t type, if you want to store the xdm files under the /var/spool directory.

xdm_tmp_t

- Set files with the xdm_tmp_t type, if you want to store xdm temporary files in the /tmp directories.

/tmp/.X11-unix(/.*)?, /tmp/.ICE-unix(/.*)?, /tmp/.X0-lock

xdm_tmpfs_t

- Set files with the xdm_tmpfs_t type, if you want to store xdm files on a tmpfs file system.

xdm_var_lib_t

- Set files with the xdm_var_lib_t type, if you want to store the xdm files under the /var/lib directory.

/var/lib/[gxkw]dm(/.*)?, /var/lib/lxdm(/.*)?, /var/cache/gdm(/.*)?

xdm_var_run_t

- Set files with the xdm_var_run_t type, if you want to store the xdm files under the /run or /var/run directory.

/usr/lib(64)?/qt-.*/etc/settings(/.*)?, /var/run/[gx]dm.pid, /etc/kde3?/kdm/backgroundrc, /var/run/kdm(/.*)?, /var/run/gdm(/.*)?, /var/run/slim.*, /var/run/lxdm(/*.)?, /var/run/slim(/.*)?, /var/run/xauth(/.*)?, /var/run/xdmctl(/.*)?, /var/run/lxdm.pid, /var/run/lxdm.auth, /var/run/gdm_socket

Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels.

COMMANDS

semanage fcontext can also be used to manipulate default file context mappings.

semanage permissive can also be used to manipulate whether or not a process type is permissive.

semanage module can also be used to enable/disable/install/remove policy modules.

semanage port can also be used to manipulate the port definitions

semanage boolean can also be used to manipulate the booleans

system-config-selinux is a GUI tool available to customize SELinux policy settings.

AUTHOR

This manual page was auto-generated using sepolicy manpage .

SEE ALSO

selinux(8), xdm(8), semanage(8), restorecon(8), chcon(1) , setsebool(8), xdm_dbusd_selinux(8), xdm_dbusd_selinux(8)

15-06-03 xdm