wine_selinux(8)

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

πŸ’… wine_selinux(8) β€” the SELinux wine policy, explained bestie-style

okay so the manual name here is wine_selinux, from the wine SELinux Policy section (wine_selinux(8), if you're citing it in a paper πŸ’…). Let's get into it.


✨ NAME ✨

wine_selinux β€” the Security Enhanced Linux Policy for the wine processes 🍷


πŸ¦‹ DESCRIPTION πŸ¦‹

Security-Enhanced Linux secures the wine processes via flexible mandatory access control. no cap, that's the whole vibe.

The wine processes execute with the wine_t SELinux type. Want to check if you've got these processes running? bestie, just run the ps command with the -Z qualifier:

ps -eZ | grep wine_t

slay. that's it. that's the check. πŸ”₯


πŸŽ€ ENTRYPOINTS πŸŽ€

The wine_t SELinux type can be entered via the wine_exec_t file type.

The default entrypoint paths for the wine_t domain are literally these:

/usr/bin/wine.*, /opt/teamviewer(/.*)?/bin/wine.*,
/opt/google/picasa(/.*)?/bin/wdi, /opt/google/picasa(/.*)?/bin/wine.*,
/opt/google/picasa(/.*)?/bin/msiexec,
/opt/google/picasa(/.*)?/bin/notepad,
/opt/google/picasa(/.*)?/bin/progman,
/opt/google/picasa(/.*)?/bin/regedit,
/opt/google/picasa(/.*)?/bin/regsvr32,
/opt/google/picasa(/.*)?/Picasa3/.*exe,
/opt/google/picasa(/.*)?/bin/uninstaller, /opt/cxoffice/bin/wine.*,
/opt/picasa/wine/bin/wine.*, /usr/bin/msiexec, /usr/bin/notepad,
/usr/bin/regedit, /usr/bin/regsvr32, /usr/bin/uninstaller,
/home/[^/]+/cxoffice/bin/wine.+

like, that's a LOT of paths, but every single one matters, so we keep them all πŸ’–


πŸ‘‘ 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. The SELinux wine policy is very flexible β€” it allows users to set up their wine processes in as secure a method as possible. main character security energy, honestly.

The following process types are defined for wine:

  • wine_t
Note: semanage permissive -a wine_t can be used to make the process type wine_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's not a free pass, it's just a "we're still watching you" pass πŸ‘€

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. The wine policy is extremely flexible and has several booleans that allow you to manipulate the policy and run wine with the tightest access possible. tightest access = bestie behaviour fr fr 🫢

If you want to determine whether attempts by wine to mmap low regions should be silently blocked, you must turn on the wine_mmap_zero_ignore boolean. Disabled by default.

setsebool -P wine_mmap_zero_ignore 1

If you want to control the ability to mmap a low area of the address space, as configured by /proc/sys/vm/mmap_min_addr, you must turn on the mmap_low_allowed boolean. Disabled by default.

setsebool -P mmap_low_allowed 1

If you want to disable kernel module loading, you must turn on the secure_mode_insmod boolean. Disabled by default.

setsebool -P secure_mode_insmod 1

🌸 MANAGED FILES 🌸

The SELinux process type wine_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 β€” SELinux isn't out here overriding DAC, that's not the vibe.

  • file_type
    • all files on the system

like... yes. all of them. iconic scope, honestly πŸ’€


🧚 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. The SELinux wine policy is very flexible, allowing users to set up their wine processes in as secure a method as possible. we love a flexible queen ✨

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for wine. 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:

semanage fcontext -a -t wine_exec_t '/srv/wine/content(/.*)?'
restorecon -R -v /srv/mywine_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex my beloved πŸŽ€

The following file types are defined for wine:

wine_exec_t

  • Set files with the wine_exec_t type if you want to transition an executable to the wine_t domain.

Paths:

/usr/bin/wine.*, /opt/teamviewer(/.*)?/bin/wine.*,
/opt/google/picasa(/.*)?/bin/wdi,
/opt/google/picasa(/.*)?/bin/wine.*,
/opt/google/picasa(/.*)?/bin/msiexec,
/opt/google/picasa(/.*)?/bin/notepad,
/opt/google/picasa(/.*)?/bin/progman,
/opt/google/picasa(/.*)?/bin/regedit,
/opt/google/picasa(/.*)?/bin/regsvr32,
/opt/google/picasa(/.*)?/Picasa3/.*exe,
/opt/google/picasa(/.*)?/bin/uninstaller, /opt/cxoffice/bin/wine.*,
/opt/picasa/wine/bin/wine.*, /usr/bin/msiexec, /usr/bin/notepad,
/usr/bin/regedit, /usr/bin/regsvr32, /usr/bin/uninstaller,
/home/[^/]+/cxoffice/bin/wine.+

wine_home_t

  • Set files with the wine_home_t type if you want to store wine files in the user's home directory. cozy home-directory vibes 🏠
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, know the difference 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. yes, a GUI, for when the terminal is doing too much πŸ™ˆ


πŸ“ AUTHOR πŸ“

This manual page was auto-generated using sepolicy manpage. (auto-generated and still ate, we love to see it πŸ’…)


πŸ”₯ SEE ALSO πŸ”₯

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


and that's the whole page bestie 🫢 β€” brought to you by wine, dated 26-10-06, living in section wine_selinux(8). go forth and label responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from