lockdev_selinux(8)
π lockdev_selinux β the glow-up edition β¨
Okay bestie, so this is the SELinux policy page for the lockdev processes, and I'm gonna walk you through it like we're studying together at 2am. It's giving "niche but important," and honestly? We love that for us.
π NAME π
lockdev_selinux β Security Enhanced Linux Policy for the lockdev processes. That's literally the whole vibe. It's the SELinux glossary entry that tells you how lockdev gets locked down. πΈ
β¨ DESCRIPTION β¨
Security-Enhanced Linux secures the lockdev processes via flexible mandatory access control. No cap, that's the whole point. π«Ά
The lockdev processes execute with the lockdev_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 lockdev_t
That's it, that's the check. Run it, see if lockdev_t shows up, and if it does, slay, you've got lockdev processes. π
πͺ ENTRYPOINTS πͺ
The lockdev_t SELinux type can be entered via the lockdev_exec_t file type. Think of it like the VIP entrance, but for processes. ποΈ
The default entrypoint paths for the lockdev_t domain are the following:
/usr/bin/lockdev
Iconic, iconic, iconic.
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system. It's lowkey the whole system's way of keeping track of who's who.
You can see the context of a process using the -Z option to ps. Yep, same trick as before, -Z is your bestie for context.
Policy governs the access confined processes have to files. SELinux lockdev policy is very flexible allowing users to set up their lockdev processes as secure as possible. Highkey obsessed with how customizable this is.
The following process types are defined for lockdev:
lockdev_t
Note:semanage permissive -a lockdev_tcan be used to make the process typelockdev_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So it's like, "okay, I'll let it slide, but I'm still gonna write it down in my notes." π
π BOOLEANS π
SELinux policy is customizable based on least access required. The lockdev policy is extremely flexible and has several booleans that allow you to manipulate the policy and run lockdev with the tightest access possible. Very "minimum necessary, maximum security" energy. π
If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. Periodt.
setsebool -P fips_mode 1
That's the command, bestie. Memorize it, love it, use it. π
π FILE CONTEXTS π
SELinux requires files to have an extended attribute to define the file type. Like every file has to carry its little ID badge around. πͺͺ
You can see the context of a file using the -Z option to ls. Yes, -Z is everywhere, it's the main character of this manpage.
Policy governs the access confined processes have to these files. SELinux lockdev policy is very flexible allowing users to set up their lockdev processes as secure as possible. We love a system that lets you customize.
π STANDARD FILE CONTEXT π
SELinux defines the file context types for lockdev. 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. It's a two-step slay.
semanage fcontext -a -t lockdev_exec_t '/srv/lockdev/content(/.*)?'
restorecon -R -v /srv/mylockdev_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. Regex my beloved. π§
The following file types are defined for lockdev:
lockdev_exec_tβ Set files with thelockdev_exec_ttype, if you want to transition an executable to thelockdev_tdomain. It's the "who dis" file type. π¦lockdev_lock_tβ Set files with thelockdev_lock_ttype, if you want to treat the files aslockdevlock data, stored under the/var/lockdirectory. It's the locket of file types, keeping things safe. π
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. Sochconis for a quick little fling, butsemanage fcontextis for the long-term relationship. π
π» COMMANDS π»
semanage fcontext can also be used to manipulate default file context mappings. She's versatile.
semanage permissive can also be used to manipulate whether or not a process type is permissive. She's flexible.
semanage module can also be used to enable/disable/install/remove policy modules. She contains multitudes.
semanage boolean can also be used to manipulate the booleans. She's a little boolean baddie.
system-config-selinux is a GUI tool available to customize SELinux policy settings. For when you want a more ~visual~ experience, you know? π
βοΈ AUTHOR βοΈ
This manual page was auto-generated using sepolicy manpage. Not me being auto-generated and still iconic. π
π SEE ALSO π
selinux(8), lockdev(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)
Click through, bestie, there's lore in every one of those. π
And that's the whole page, okay? You're welcome.
This little masterpiece is from the lockdev manual source/version 26-10-06. π Go forth and SELinux responsibly. π
π¦ 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