xdm_selinux(8) - Linux man page

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 "xdm_exec_t,bin_t" file types. The default entrypoint paths for the xdm_t domain are the following:"

/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, /bin/.*, /opt/(.*/)?bin(/.*)?, /usr/(.*/)?Bin(/.*)?, /usr/(.*/)?bin(/.*)?, /usr/(.*/)?sbin(/.*)?, /opt/(.*/)?sbin(/.*)?, /opt/(.*/)?libexec(/.*)?, /sbin/.*, /usr/lib(64)?/dpkg/.+, /usr/lib(64)?/rpm/rpmd, /usr/lib(64)?/rpm/rpmk, /usr/lib(64)?/rpm/rpmv, /usr/lib(64)?/rpm/rpmq, /usr/lib(64)?/ipsec/.*, /usr/lib(.*/)?bin(/.*)?, /usr/lib(64)?/cups(/.*)?, /usr/lib(.*/)?sbin(/.*)?, /usr/lib(64)?/xfce4(/.*)?, /usr/lib(64)?/sftp-server, /usr/lib(64)?/xen/bin(/.*)?, /usr/lib(64)?/courier(/.*)?, /usr/lib(64)?/apt/methods.+, /usr/lib(64)?/pm-utils(/.*)?, /usr/lib(64)?/news/bin(/.*)?, /usr/lib(64)?/cyrus-imapd/.*, /usr/lib(64)?/debug/bin(/.*)?, /usr/lib(64)?/debug/sbin(/.*)?, /usr/lib(64)?/misc/sftp-server, /usr/lib(64)?/portage/bin(/.*)?, /usr/lib(64)?/mailman/bin(/.*)?, /usr/lib(64)?/emacsen-common/.*, /usr/lib(64)?/mailman/mail(/.*)?, /usr/lib(64)?/debug/usr/bin(/.*)?, /usr/lib(64)?/nspluginwrapper/np.*, /usr/lib(64)?/nagios/plugins(/.*)?, /usr/lib(64)?/[^/]*/run-mozilla.sh, /usr/lib(64)?/debug/usr/sbin(/.*)?, /usr/lib(64)?/vte/gnome-pty-helper, /usr/lib(64)?/gimp/.*/plug-ins(/.*)?, /usr/lib(64)?/netsaint/plugins(/.*)?, /usr/lib(64)?/debug/usr/libexec(/.*)?, /usr/lib(64)?/chromium-browser/chrome, /usr/lib(64)?/ConsoleKit/scripts(/.*)?, /usr/lib(64)?/pgsql/test/regress/.*.sh, /usr/lib(64)?/[^/]*firefox[^/]*/firefox, /usr/lib(64)?/[^/]*/mozilla-xremote-client, /usr/lib(64)?/ConsoleKit/run-session.d(/.*)?, /usr/lib(64)?/[^/]*thunderbird[^/]*/thunderbird, /usr/lib(64)?/thunderbird.*/mozilla-xremote-client, /usr/lib(64)?/[^/]*thunderbird[^/]*/thunderbird-bin, /usr/lib(64)?/[^/]*thunderbird[^/]*/open-browser.sh, /etc/gdm/[^/]+, /etc/gdm/[^/]+/.*, /etc/cron.daily(/.*)?, /etc/cron.hourly(/.*)?, /etc/cron.weekly(/.*)?, /etc/cron.monthly(/.*)?, /usr/lib/.*/program(/.*)?, /lib/udev/[^/]*, /etc/avahi/.*.action, /usr/lib/qt.*/bin(/.*)?, /usr/lib64/.*/program(/.*)?, /usr/lib/yp/.+, /lib64/udev/[^/]*, /var/ftp/bin(/.*)?, /usr/libexec(/.*)?, /etc/kde/env(/.*)?, /etc/profile.d(/.*)?, /etc/hotplug/.*rc, /etc/hotplug/.*agent, /usr/lib64/yp/.+, /var/qmail/bin(/.*)?, /usr/lib/fence(/.*)?, /etc/X11/xinit(/.*)?, /etc/netplug.d(/.*)?, /usr/local/lib(64)?/ipsec/.*, /usr/X11R6/lib(64)?/X11/xkb/xkbcomp, /etc/ppp/ip-up..*, /etc/cipe/ip-up.*, /etc/pm/power.d(/.*)?, /etc/pm/sleep.d(/.*)?, /var/mailman/bin(/.*)?, /etc/xen/scripts(/.*)?, /etc/ppp/ipv6-up..*, /etc/ppp/ip-down..*, /etc/cipe/ip-down.*, /usr/share/hplip/[^/]*, /etc/vmware-tools(/.*)?, /etc/kde/shutdown(/.*)?, /etc/acpi/actions(/.*)?, /etc/pki/tls/misc(/.*)?, /usr/local/Printer(/.*)?, /usr/local/Brother(/.*)?, /opt/google/chrome(/.*)?, /usr/lib/bluetooth(/.*)?, /usr/lib/ruby/gems(/.*)?/helper-scripts(/.*)?, /usr/share/debconf/.+, /etc/ppp/ipv6-down..*, /usr/share/cluster/.*.sh, /usr/share/sectool/.*.py, /usr/share/ssl/misc(/.*)?, /usr/share/e16/misc(/.*)?, /usr/lib/ccache/bin(/.*)?, /etc/racoon/scripts(/.*)?, /usr/lib/ruby/gems/.*/agents(/.*)?, /usr/local/Brother/(.*/)?inf/setup.*, /usr/local/Brother/(.*/)?inf/brprintconf.*, /usr/share/mc/extfs/.*, /etc/mcelog/triggers(/.*)?, /etc/dhcp/dhclient.d(/.*)?, /emul/ia32-linux/bin(/.*)?, /usr/lib64/bluetooth(/.*)?, /emul/ia32-linux/usr(/.*)?/bin(/.*)?, /emul/ia32-linux/usr(/.*)?/Bin(/.*)?, /emul/ia32-linux/usr(/.*)?/sbin(/.*)?, /usr/lib/wicd/monitor.py, /usr/share/createrepo(/.*)?, /emul/ia32-linux/sbin(/.*)?, /usr/share/hal/scripts(/.*)?, /usr/lib/vmware-tools/(s)?bin64(/.*)?, /usr/lib/vmware-tools/(s)?bin32(/.*)?, /etc/gdm/XKeepsCrashing[^/]*, /usr/lib/oracle/xe/apps(/.*)?, /usr/share/smolt/client(/.*)?, /usr/share/Modules/init(/.*)?, /usr/share/apr-0/build/[^/]+.sh, /usr/share/shorewall-perl(/.*)?, /usr/share/shorewall-lite(/.*)?, /usr/share/turboprint/lib(/.*)?, /usr/share/vhostmd/scripts(/.*)?, /usr/share/shorewall6-lite(/.*)?, /usr/share/shorewall-shell(/.*)?, /etc/ConsoleKit/run-seat.d(/.*)?, /usr/share/sandbox/sandboxX.sh, /usr/share/denyhosts/plugins(/.*)?, /usr/share/denyhosts/scripts(/.*)?, /emul/ia32-linux/usr/libexec(/.*)?, /usr/share/PackageKit/helpers(/.*)?, /etc/ConsoleKit/run-session.d(/.*)?, /etc/hotplug.d/default/default.*, /usr/share/cluster/checkquorum.*, /usr/local/linuxprinter/filters(/.*)?, /opt/gutenprint/cups/lib/filter(/.*)?, /usr/share/system-config-network(/netconfig)?/[^/]+.py, /etc/sysconfig/network-scripts/net.*, /etc/sysconfig/network-scripts/ifup.*, /etc/sysconfig/network-scripts/init.*, /etc/sysconfig/network-scripts/ifdown.*, /opt/OpenPrinting-Gutenprint/cups/lib/filter(/.*)?, /usr/share/gedit-2/plugins/externaltools/tools(/.*)?, /bin, /sbin, /dev/MAKEDEV, /var/qmail/rc, /var/qmail/bin, /etc/mail/make, /bin/mountpoint, /lib/udev/scsi_id, /sbin/mkfs.cramfs, /etc/xen/qemu-ifup, /etc/sysconfig/init, /etc/apcupsd/commok, /etc/sysconfig/crond, /etc/X11/xdm/Xsetup_0, /etc/init.d/functions, /etc/apcupsd/changeme, /etc/apcupsd/onbattery, /etc/sysconfig/libvirtd, /etc/apcupsd/offbattery, /etc/apcupsd/apccontrol, /etc/X11/xdm/GiveConsole, /etc/X11/xdm/TakeConsole, /etc/apcupsd/commfailure, /etc/sysconfig/netconsole, /etc/rc.d/init.d/functions, /etc/apcupsd/masterconnect, /etc/apcupsd/mastertimeout, /usr/share/pydict/pydict.py, /usr/share/clamav/clamd-gen, /sbin/insmod_ksymoops_clean, /etc/mgetty+sendfax/new_fax, /etc/sysconfig/readonly-root, /usr/share/cvs/contrib/rcs2log, /usr/share/hwbrowser/hwbrowser, /usr/share/shorewall/getparams, /usr/share/cluster/SAPDatabase, /usr/share/cluster/SAPInstance, /usr/share/apr-0/build/libtool, /etc/hotplug/hotplug.functions, /usr/share/texmf/web2c/mktexdir, /usr/share/texmf/web2c/mktexnam, /usr/share/texmf/web2c/mktexupd, /usr/share/shorewall/configpath, /etc/mcelog/cache-error-trigger, /usr/share/shorewall/compiler.pl, /usr/share/dayplanner/dayplanner, /usr/libexec/openssh/sftp-server, /usr/share/texmf/texconfig/tcfmgr, /usr/share/clamav/freshclam-sleep, /usr/share/cluster/ocf-shellfuncs, /usr/share/cluster/svclib_nfslock, /usr/share/pwlib/make/ptlib-config, /usr/share/fedora-usermgmt/wrapper, /usr/share/printconf/util/print.py, /etc/pki/tls/certs/make-dummy-cert, /usr/share/rhn/rhn_applet/applet.py, /usr/share/authconfig/authconfig.py, /usr/share/spamassassin/sa-update.cron, /usr/share/selinux/devel/policygentool, /usr/share/gnucash/finance-quote-check, /usr/share/cluster/fence_scsi_check.pl, /usr/share/switchdesk/switchdesk-gui.py, /usr/share/authconfig/authconfig-tui.py, /usr/share/authconfig/authconfig-gtk.py, /usr/share/gnucash/finance-quote-helper, /usr/share/gitolite/hooks/common/update, /usr/share/system-config-services/gui.py, /lib/security/pam_krb5/pam_krb5_storetmp, /usr/share/system-config-netboot/pxeos.py, /usr/share/system-config-printer/applet.py, /usr/share/system-config-nfs/nfs-export.py, /usr/share/system-config-selinux/polgen.py, /lib64/security/pam_krb5/pam_krb5_storetmp, /usr/share/PackageKit/pk-upgrade-distro.sh, /usr/share/system-config-netboot/pxeboot.py, /usr/share/rhn/rhn_applet/needed-packages.py, /usr/share/system-logviewer/system-logviewer.py, /usr/share/system-config-network/neat-control.py, /usr/share/system-config-services/serviceconf.py, /usr/share/hal/device-manager/hal-device-manager, /usr/share/system-config-lvm/system-config-lvm.py, /usr/share/system-config-nfs/system-config-nfs.py, /usr/share/system-config-httpd/system-config-httpd, /usr/share/system-config-mouse/system-config-mouse, /usr/share/system-config-users/system-config-users, /usr/share/system-config-date/system-config-date.py, /usr/share/gitolite/hooks/gitolite-admin/post-update, /usr/share/system-config-samba/system-config-samba.py, /usr/share/system-config-display/system-config-display, /usr/share/system-config-keyboard/system-config-keyboard, /usr/share/system-config-language/system-config-language, /usr/share/system-config-services/system-config-services, /usr/share/system-config-netboot/system-config-netboot.py, /usr/share/system-config-selinux/system-config-selinux.py, /usr/share/system-config-soundcard/system-config-soundcard, /usr/share/system-config-rootpassword/system-config-rootpassword, /usr/share/system-config-securitylevel/system-config-securitylevel.py

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. Permissive process types are not denied access by SELinux. AVC messages will still be 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.

setsebool -P xdm_exec_bootloader 1

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

setsebool -P xdm_sysadm_login 1

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

setsebool -P xdm_exec_bootloader 1

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

setsebool -P xdm_sysadm_login 1

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.

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.

xdm_home_t

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

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.

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.

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.

xdm_var_run_t

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

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.

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:

xdmcp_port_t
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(/.*)?

etc_runtime_t

/[^/]+

/etc/mtab.*

/etc/blkid(/.*)?

/etc/nologin.*

/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

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)?(/.*)?

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/spool/postfix/etc/localtime

mnt_t

/mnt(/[^/]*)

/mnt(/[^/]*)?

/rhev(/[^/]*)?

/media(/[^/]*)

/media(/[^/]*)?

/etc/rhgb(/.*)?

/media/.hal-.*

/net

/afs

/misc

/rhev

nfs_t

pam_var_console_t

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

pam_var_run_t

/var/run/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

tmp_t

/tmp

/usr/tmp

/var/tmp

/var/tmp/vi.recover

user_fonts_t

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

user_tmp_t

/tmp/gconfd-.*

user_tmpfs_t

/dev/shm/mono.*

/dev/shm/pulse-shm.*

var_auth_t

/var/lib/abl(/.*)?

/var/lib/pam_ssh(/.*)?

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

/var/lib/pam_shield(/.*)?

/var/opt/quest/vas/vasd(/.*)?

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.*

xdm_home_t

/home/[^/]*/.dmrc.*

/home/[^/]*/.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

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 by mgrepl.

See Also

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