xauth_selinux(8)

πŸ“¦
version 20250627+git412.dbf877ab7 Β· 7 versions
, in opensuse-leap 16.0

πŸ’… xauth_selinux(8) β€” like, the whole manual, but make it make sense

okay so bestie, welcome to xauth_selinux(8) β€” this one lives in the SELinux Policy xauth corner of the manual-verse, and it's literally all about how SELinux handles the xauth processes. grab a snack, we're doing this πŸ“


✨ NAME ✨

xauth_selinux β€” the Security Enhanced Linux Policy for the xauth processes. that's it, that's the vibe πŸ’–


🌸 DESCRIPTION 🌸

Security-Enhanced Linux secures the xauth processes via flexible mandatory access control. no cap, that's the whole flex πŸ”₯

The xauth processes execute with the xauth_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier, easy.

For example:

ps -eZ | grep xauth_t

see? iconic. πŸ‘‘


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The xauth_t SELinux type can be entered via the xauth_exec_t file type. that's the doorway, bestie πŸšͺ✨

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

/usr/bin/xauth, /usr/X11R6/bin/xauth


πŸŽ€ PROCESS TYPES πŸŽ€

SELinux defines process types (domains) for each process running on the system. yes, every single one gets its own little domain. main character energy fr fr πŸ’…

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

Policy governs the access confined processes have to files. SELinux xauth policy is very flexible, allowing users to setup their xauth processes in as secure a method as possible. highkey the whole point 🫢

The following process types are defined for xauth:

xauth_t

Note: semanage permissive -a xauth_t can be used to make the process type xauth_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like… it stops blocking stuff, but it's still gonna snitch to the logs 😭 literally.

⭐ BOOLEANS ⭐

SELinux policy is customizable based on least access required. xauth policy is extremely flexible and has several booleans that allow you to manipulate the policy and run xauth with the tightest access possible. tightest access = the slay-est access, iykyk.

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

setsebool -P fips_mode 1

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

setsebool -P nis_enabled 1

🧚 MANAGED FILES 🧚

The SELinux process type xauth_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and hey β€” note the processes UID still need to have DAC permissions. SELinux can't save you from regular old permissions, sorry babe πŸ™ˆ

  • cifs_t β€” no default paths listed here, it just exists and we respect it πŸ’œ
  • ecryptfs_t
    • /home/[^/]+/.Private(/.*)?
    • /home/[^/]+/.ecryptfs(/.*)?
  • fusefs_t
    • /run/user/[0-9]+/gvfs
  • krb5_host_rcache_t
    • /var/tmp/krb5_0.rcache2
    • /var/cache/krb5rcache(/.*)?
    • /var/tmp/nfs_0
    • /var/tmp/DNS_25
    • /var/tmp/host_0
    • /var/tmp/imap_0
    • /var/tmp/HTTP_23
    • /var/tmp/HTTP_48
    • /var/tmp/ldap_55
    • /var/tmp/ldap_487
    • /var/tmp/ldapmap1_0
  • nfs_t β€” again, no paths listed, and that's fine 🌈
  • user_home_t
    • /home/[^/]+/.+
  • xauth_home_t
    • /root/.Xauth.*
    • /root/.xauth.*
    • /root/.Xauthority.*
    • /root/.serverauth.*
    • /var/lib/pqsql/.xauth.*
    • /var/lib/pqsql/.Xauthority.*
    • /var/lib/nxserver/home/.xauth.*
    • /var/lib/nxserver/home/.Xauthority.*
    • /home/[^/]+/.Xauth.*
    • /home/[^/]+/.xauth.*
    • /home/[^/]+/.Xauthority.*
    • /home/[^/]+/.serverauth.*
  • xauth_tmp_t β€” no default paths listed πŸŽ€
  • xdm_var_run_t
    • /run/[kgm]dm(/.*)?
    • /run/gdm(3)?.pid
    • /run/gdm(3)?(/.*)?
    • /etc/kde[34]?/kdm/backgroundrc
    • /run/slim.*
    • /run/lxdm(/.*)?
    • /run/sddm(/.*)?
    • /run/xauth(/.*)?
    • /run/xdmctl(/.*)?
    • /run/greetd[^/]*.sock
    • /run/lightdm(/.*)?
    • /usr/lib/qt-.*/etc/settings(/.*)?
    • /run/systemd/multi-session-x(/.*)?
    • /run/xdm.pid
    • /run/lxdm.pid
    • /run/lxdm.auth
    • /run/greetd.run
    • /run/gdm_socket

🫢 FILE CONTEXTS 🫢

SELinux requires files to have an extended attribute to define the file type. that's just how it works, no shortcuts πŸ’…

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 xauth policy is very flexible, allowing users to setup their xauth processes in as secure a method as possible. (yes, it's said twice in this manpage, and yes, it still slaps.)

πŸŽ€ STANDARD FILE CONTEXT

SELinux defines the file context types for the xauth, so if you wanted to store files with these types in different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. two-step glow-up ✨

semanage fcontext -a -t xauth_exec_t '/srv/xauth/content(/.*)?'
restorecon -R -v /srv/myxauth_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies stay winning 🧚

The following file types are defined for xauth:

xauth_exec_t

  • Set files with the xauth_exec_t type, if you want to transition an executable to the xauth_t domain.

Paths:

/usr/bin/xauth, /usr/X11R6/bin/xauth

xauth_home_t

  • Set files with the xauth_home_t type, if you want to store xauth files in the users home directory.

Paths:

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

xauth_tmp_t

  • Set files with the xauth_tmp_t type, if you want to store xauth temporary files in the /tmp directories.
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. so like β€” chcon is the cute temporary tattoo, semanage fcontext + restorecon is the real permanent ink πŸ’€ choose wisely.

πŸ’œ 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 boolean can also be used to manipulate the booleans.
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. yes, a GUI. for the girlies who like buttons πŸ–±οΈβœ¨

🌈 AUTHOR 🌈

This manual page was auto-generated using sepolicy manpage. not me being a bot-written icon πŸ˜­πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

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


k that's the whole thing, bestie 🫢 this page is from xauth, dated 26-10-06, and it'll always be hanging out at xauth_selinux(8). go forth and label responsibly πŸ’…πŸŒΈ

πŸ“¦ where this page comes from