sandbox_selinux(8)
β¨ sandbox_selinux(8) β the sandbox processes glow-up guide β¨
okay so bestie, you already know what sandbox_selinux is giving β it's the whole Security Enhanced Linux situation for the sandbox processes, and we're gonna break it down together π
π NAME
sandbox_selinux β the SELinux policy that keeps the sandbox processes in check, fr fr π
πΈ DESCRIPTION
Security-Enhanced Linux secures the sandbox processes via flexible mandatory access control. like, it's literally the bodyguard for your sandbox vibes β¨
The sandbox processes execute with the sandbox_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier, no cap π
For example:
ps -eZ | grep sandbox_t
π PROCESS TYPES
SELinux defines process types (aka domains) for every single process running on the system π«Ά
You can see the context of a process using the -Z option to ps β it's giving main character energy, iykyk π«
Policy governs the access confined processes have to files. the SELinux sandbox policy is very flexible, allowing users to set up their sandbox processes in as secure a method as possible. slay π₯
The following process types are defined for sandbox:
sandbox_tsandbox_xserver_tsandbox_min_tsandbox_min_client_tsandbox_x_tsandbox_x_client_tsandbox_web_tsandbox_web_client_tsandbox_net_tsandbox_net_client_t
Note:semanage permissive -a sandbox_tcan be used to make the process typesandbox_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it's still watching you bestie π
π MCS Constrained
The SELinux process type sandbox_t is an MCS (Multi Category Security) constrained type. sometimes this separation is referred to as sVirt β iconic π
These types are usually used for securing multi-tenant environments, such as virtualization, containers or separation of users. the tools used to launch MCS types pick out a different MCS label for each process group π§
For example, one process might be launched with sandbox_t:s0:c1,c2, and another process launched with sandbox_t:s0:c3,c4. The SELinux kernel only allows these processes to write to content with a matching MCS label, or an MCS Label of s0. so a process running with the MCS level of s0:c1,c2 is not allowed to write to content with the MCS label of s0:c3,c4 π boundaries, periodt.
π BOOLEANS
SELinux policy is customizable based on least access required. sandbox policy is extremely flexible and has several booleans that allow you to manipulate the policy and run sandbox with the tightest access possible πΈ
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
π¦ FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type. it's literally the file's whole identity π
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 sandbox policy is very flexible, allowing users to set up their sandbox processes in as secure a method as possible. obsessed π«Ά
β STANDARD FILE CONTEXT
SELinux defines the file context types for sandbox. 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 sandbox_exec_t '/srv/sandbox/content(/.*)?'
restorecon -R -v /srv/mysandbox_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise π
The following file types are defined for sandbox:
sandbox_devpts_tβ set files with thesandbox_devpts_ttype if you want to treat the files as sandbox devpts data π»sandbox_exec_tβ set files with thesandbox_exec_ttype if you want to transition an executable to thesandbox_tdomain πββοΈsandbox_file_tβ set files with thesandbox_file_ttype if you want to treat the files as sandbox content πsandbox_min_client_tmpfs_tβ set files with thesandbox_min_client_tmpfs_ttype if you want to store sandbox min client files on a tmpfs file system πsandbox_net_client_tmpfs_tβ set files with thesandbox_net_client_tmpfs_ttype if you want to store sandbox net client files on a tmpfs file system πsandbox_web_client_tmpfs_tβ set files with thesandbox_web_client_tmpfs_ttype if you want to store sandbox web client files on a tmpfs file system πΈοΈsandbox_x_client_tmpfs_tβ set files with thesandbox_x_client_tmpfs_ttype if you want to store sandbox x client files on a tmpfs file system π₯οΈsandbox_xserver_tmpfs_tβ set files with thesandbox_xserver_tmpfs_ttype if you want to store sandbox xserver files on a tmpfs file system π¨
Note: file context can be temporarily modified with thechconcommand. if you want to permanently change the file context you need to use thesemanage fcontextcommand. this will modify the SELinux labeling database. you will need to userestoreconto apply the labels. no shortcuts, bestie π€
π οΈ COMMANDS
semanage fcontextcan also be used to manipulate default file context mappings ποΈsemanage permissivecan also be used to manipulate whether or not a process type is permissive ποΈsemanage modulecan also be used to enable/disable/install/remove policy modules π¦semanage booleancan also be used to manipulate the booleans πsystem-config-selinuxis a GUI tool available to customize SELinux policy settings π±οΈβ¨
βοΈ AUTHOR
This manual page was auto-generated using sepolicy manpage. the robots did this one, not me ππ€
π SEE ALSO
selinux(8), sandbox(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), sandbox_min_selinux(8), sandbox_min_selinux(8), sandbox_min_client_selinux(8), sandbox_min_client_selinux(8), sandbox_net_selinux(8), sandbox_net_selinux(8), sandbox_net_client_selinux(8), sandbox_net_client_selinux(8), sandbox_web_selinux(8), sandbox_web_selinux(8), sandbox_web_client_selinux(8), sandbox_web_client_selinux(8), sandbox_x_selinux(8), sandbox_x_selinux(8), sandbox_x_client_selinux(8), sandbox_x_client_selinux(8), sandbox_xserver_selinux(8), sandbox_xserver_selinux(8) π (yes there are duplicates, and yes that's the vibe, don't @ me)
and that's the whole sandbox_selinux tea, bestie π«π
this little masterpiece is from the sandbox package, version 26-10-06, dated sandbox_selinux(8) β catch you in the next manpage, mwah ππ
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms