games_selinux(8)

๐Ÿ“ฆ
version 20250627+git412.dbf877ab7 ยท 7 versions
, in opensuse-leap 16.0

โœจ games_selinux(8) โœจ

okay so bestie, you're reading the games_selinux page from the SELinux Policy games manual โ€” yeah, the whole thing lives under that games manual name, iykyk ๐Ÿ’…. buckle up, we're getting into it.


๐ŸŽ€ NAME ๐ŸŽ€

games_selinux โ€” Security Enhanced Linux Policy for the games processes ๐ŸŽฎโœจ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Security-Enhanced Linux secures the games processes via flexible mandatory access control. that's the whole vibe โ€” SELinux is the bouncer at the club and it is not letting just anyone in ๐Ÿซถ.

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

for example:

ps -eZ | grep games_t

literally that simple, no cap.


๐ŸŒธ ENTRYPOINTS ๐ŸŒธ

The games_t SELinux type can be entered via the games_exec_t file type. that's the door ๐Ÿšชโœจ

The default entrypoint paths for the games_t domain are the following โ€” and bestie there are so many, do not lose focus:

/usr/games/.*, /usr/lib/games(/.*)?, /usr/bin/civclient.*,
/usr/bin/civserver.*, /usr/bin/sol, /usr/bin/kolf, /usr/bin/kpat,
/usr/bin/micq, /usr/bin/gnect, /usr/bin/gtali, /usr/bin/iagno,
/usr/bin/ksame, /usr/bin/ktron, /usr/bin/kwin4, /usr/bin/lskat,
/usr/bin/gataxx, /usr/bin/glines, /usr/bin/klines, /usr/bin/kmines,
/usr/bin/kpoker, /usr/bin/ksnake, /usr/bin/gnomine, /usr/bin/gnotski,
/usr/bin/katomic, /usr/bin/kbounce, /usr/bin/kshisen, /usr/bin/ksirtet,
/usr/bin/atlantik, /usr/bin/gnibbles, /usr/bin/gnobots2,
/usr/bin/kenolaba, /usr/bin/klickety, /usr/bin/konquest,
/usr/bin/kreversi, /usr/bin/ksokoban, /usr/bin/mahjongg,
/usr/bin/Maelstrom, /usr/bin/blackjack, /usr/bin/gnotravex,
/usr/bin/kblackbox, /usr/bin/kfouleggs, /usr/bin/kmahjongg,
/usr/bin/kwin4proc, /usr/bin/lskatproc, /usr/bin/kasteroids,
/usr/bin/ksmiletris, /usr/bin/kspaceduel, /usr/bin/ktuberling,
/usr/bin/same-gnome, /usr/bin/kbackgammon, /usr/bin/kbattleship,
/usr/bin/kgoldrunner, /usr/bin/gnome-stones, /usr/bin/kjumpingcube

likeโ€ฆ that's a lot of games, iconic behavior honestly ๐Ÿ’€๐Ÿ‘‘


๐Ÿ‘‘ PROCESS TYPES ๐Ÿ‘‘

SELinux defines process types (domains) for each process running on the system. yes, every single one gets a little label, main character energy.

you can see the context of a process using the -Z option to ps ๐Ÿ”

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

The following process types are defined for games:

games_t, games_srv_t

Note: semanage permissive -a games_t can be used to make the process type games_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 you but it still talks about you. rude but helpful ๐Ÿ’…

๐Ÿ’– BOOLEANS ๐Ÿ’–

SELinux policy is customizable based on least access required. games policy is extremely flexible and has several booleans that allow you to manipulate the policy and run games with the tightest access possible. so many little switches, we love options ๐ŸŽ€

deny_execmem โ€” if you want to deny user domains applications 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 deny_execmem boolean. Disabled by default. โš ๏ธ

setsebool -P deny_execmem 1

fips_mode โ€” 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

nscd_use_shm โ€” 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

selinuxuser_direct_dri_enabled โ€” if you want to allow regular users direct dri device access, you must turn on the selinuxuser_direct_dri_enabled boolean. Disabled by default. ๐Ÿšซ

setsebool -P selinuxuser_direct_dri_enabled 1

xserver_clients_write_xshm โ€” if you want to allows clients to write to the X server shared memory segments, you must turn on the xserver_clients_write_xshm boolean. Disabled by default. ๐Ÿšซ

setsebool -P xserver_clients_write_xshm 1

๐ŸŒˆ MANAGED FILES ๐ŸŒˆ

The SELinux process type games_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. and bestie, note the processes UID still need to have DAC permissions โ€” SELinux isn't doing everything for you, okay? ๐Ÿ˜Œ

games_data_t

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

games_tmp_t

(no paths listed, that's just how it is ๐Ÿซถ)

games_tmpfs_t

(also no paths listed โœจ)

user_fonts_cache_t

/root/.fontconfig(/.*)?
/root/.fonts/auto(/.*)?
/root/.fonts.cache-.*
/root/.cache/fontconfig(/.*)?
/home/[^/]+/.fontconfig(/.*)?
/home/[^/]+/.fonts/auto(/.*)?
/home/[^/]+/.fonts.cache-.*
/home/[^/]+/.cache/fontconfig(/.*)?

๐Ÿ’œ FILE CONTEXTS ๐Ÿ’œ

SELinux requires files to have an extended attribute to define the file type. every file's got a little name tag, adorable.

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 games policy is very flexible, allowing users to setup their games processes in as secure a method as possible. again. still true. ๐ŸŒธ

โญ STANDARD FILE CONTEXT โญ

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

semanage fcontext -a -t games_exec_t '/srv/games/content(/.*)?'
restorecon -R -v /srv/mygames_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex my beloved ๐Ÿ˜ญ

The following file types are defined for games:

games_data_t

  • Set files with the games_data_t type, if you want to treat the files as games content.

Paths:

/var/games(/.*)?, /var/lib/games(/.*)?

games_exec_t

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

Paths:

/usr/games/.*, /usr/lib/games(/.*)?, /usr/bin/civclient.*,
/usr/bin/civserver.*, /usr/bin/sol, /usr/bin/kolf, /usr/bin/kpat,
/usr/bin/micq, /usr/bin/gnect, /usr/bin/gtali, /usr/bin/iagno,
/usr/bin/ksame, /usr/bin/ktron, /usr/bin/kwin4, /usr/bin/lskat,
/usr/bin/gataxx, /usr/bin/glines, /usr/bin/klines, /usr/bin/kmines,
/usr/bin/kpoker, /usr/bin/ksnake, /usr/bin/gnomine,
/usr/bin/gnotski, /usr/bin/katomic, /usr/bin/kbounce,
/usr/bin/kshisen, /usr/bin/ksirtet, /usr/bin/atlantik,
/usr/bin/gnibbles, /usr/bin/gnobots2, /usr/bin/kenolaba,
/usr/bin/klickety, /usr/bin/konquest, /usr/bin/kreversi,
/usr/bin/ksokoban, /usr/bin/mahjongg, /usr/bin/Maelstrom,
/usr/bin/blackjack, /usr/bin/gnotravex, /usr/bin/kblackbox,
/usr/bin/kfouleggs, /usr/bin/kmahjongg, /usr/bin/kwin4proc,
/usr/bin/lskatproc, /usr/bin/kasteroids, /usr/bin/ksmiletris,
/usr/bin/kspaceduel, /usr/bin/ktuberling, /usr/bin/same-gnome,
/usr/bin/kbackgammon, /usr/bin/kbattleship, /usr/bin/kgoldrunner,
/usr/bin/gnome-stones, /usr/bin/kjumpingcube

games_srv_var_run_t

  • Set files with the games_srv_var_run_t type, if you want to store the games srv files under the /run or /var/run directory.

games_tmp_t

  • Set files with the games_tmp_t type, if you want to store games temporary files in the /tmp directories.

games_tmpfs_t

  • Set files with the games_tmpfs_t type, if you want to store games files on a tmpfs file system.
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. temporary vs permanent, choose wisely bestie ๐Ÿ’…

๐Ÿ”ฅ 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. a GUI!! for the girlies who like clicking ๐Ÿ–ฑ๏ธโœจ


๐Ÿงš AUTHOR ๐Ÿงš

This manual page was auto-generated using sepolicy manpage . yes, a robot wrote it. and now i'm rewriting it. we're through the looking glass fr fr ๐Ÿ˜ญ


๐Ÿ“ SEE ALSO ๐Ÿ“

selinux(8), games(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), games_srv_selinux(8), games_srv_selinux(8)

(yeah games_srv_selinux(8) is in there twice, that's the original's business not mine ๐Ÿซถ)


and that's the whole page bestie!! this one came from the games manual, dated 26-10-06 โ€” go forth and game securely, mwah ๐Ÿ’‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from