sulogin_selinux(8)

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

✨ sulogin_selinux β€” the SELinux glow-up for sulogin πŸ’…

okay so bestie, this is the <pink>sulogin_selinux(8)manual page β€” like, the whole entire scoop on how SELinux policy handles thesulogin` processes. it's from the SELinux Policy sulogin collection and honestly it's giving "niche but iconic." let's get into it 🫢


🌸 NAME 🌸

<purple>sulogin_selinuxβ€” the Security Enhanced Linux Policy for thesulogin` processes. that's it, that's the whole vibe check.


πŸ’– DESCRIPTION πŸ’–

so, Security-Enhanced Linux secures the sulogin processes via flexible mandatory access control. yes ma'am, flexible and mandatory, she contains multitudes.

the sulogin processes execute with the <cyan>sulogin_tSELinux type. you can check if you have these processes running by executing thepscommand with the-Zqualifier. lowkey the-Z` flag is the main character here β€” it shows you the security context, iykyk.

for example:

ps -eZ | grep sulogin_t

run that and see who's living in sulogin_t land πŸ¦‹


πŸšͺ ENTRYPOINTS πŸšͺ

the <cyan>sulogin_tSELinux type can be entered via thesulogin_exec_t</mint> file type. that's the door, basically. the velvet rope.

the default entrypoint paths for the sulogin_t domain are the following:

/usr/bin/sulogin, /usr/bin/sushell

those two are the ones with the wristbands πŸŽ€


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (domains) for each process running on the system. literally every process gets a little name tag.

you can see the context of a process using the -Z option to ps. yes, -Z again. she's everywhere, she's booked and busy.

Policy governs the access confined processes have to files. SELinux sulogin policy is very flexible allowing users to setup their sulogin processes in as secure a method as possible. no cap β€” flexible and secure is the whole point.

the following process types are defined for sulogin:

  • <cyan>sulogin_t`
Note: semanage permissive -a sulogin_t can be used to make the process type sulogin_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, she'll stop blocking you but she's still gonna talk about it 😭 the receipts stay.

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. sulogin policy is extremely flexible and has several booleans that allow you to manipulate the policy and run sulogin with the tightest access possible. tightest access possible = the most locked-down slay.

the booleans, one by one 🧚

  • 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. (yes bestie, she's already on)
setsebool -P fips_mode 1
  • nis_enabled β€” 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

that -P makes it persistent btw, so it survives a reboot. we love commitment πŸ’œ


πŸ“ MANAGED FILES πŸ“

the SELinux process type <cyan>sulogin_t` can manage files labeled with the following file types. the paths listed are the default paths for these file types. and remember β€” the processes UID still need to have DAC permissions. SELinux is not out here overriding your regular perms, she's an additional layer. periodt.

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

look at all those cache files, she's got a whole collection πŸ“

security_t

/selinux

just the one path and honestly? iconic minimalism.


πŸ—‚οΈ FILE CONTEXTS πŸ—‚οΈ

SELinux requires files to have an extended attribute to define the file type. like a little label on everything.

you can see the context of a file using the -Z option to ls. (the -Z cinematic universe continues ✨)

Policy governs the access confined processes have to these files. SELinux sulogin policy is very flexible allowing users to setup their sulogin processes in as secure a method as possible.

πŸ“Œ STANDARD FILE CONTEXT

SELinux defines the file context types for the sulogin, 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. so like: semanage writes down the plan, restorecon actually goes and does the thing. teamwork 🫢

semanage fcontext -a -t sulogin_exec_t '/srv/sulogin/content(/.*)?'
restorecon -R -v /srv/mysulogin_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. that (/.*)? at the end is not decoration, bestie, it means "and everything under here."

the following file types are defined for sulogin:

<mint>sulogin_exec_t`

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

Paths:

/usr/bin/sulogin, /usr/bin/sushell
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. ngl chcon is the "temporary tattoo" option and semanage fcontext is the real one πŸ’€ don't get it twisted.

πŸ› οΈ COMMANDS πŸ› οΈ

<purple>semanage fcontext` can also be used to manipulate default file context mappings.

<purple>semanage permissive` can also be used to manipulate whether or not a process type is permissive.

<purple>semanage module` can also be used to enable/disable/install/remove policy modules. enable, disable, install, remove β€” she does it all.

<purple>semanage boolean` can also be used to manipulate the booleans.

<purple>system-config-selinux` is a GUI tool available to customize SELinux policy settings. for the girlies who prefer a mouse over a terminal (no judgement, we all have our moments πŸ™ˆ)


✍️ AUTHOR ✍️

This manual page was auto-generated using sepolicy manpage .

yes, a robot wrote this. she's doing great πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

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

go read those next, bestie, the lore is deep 🌊


okay and finally, the receipts: this page is sulogin from 26-10-06, manual name sulogin_selinux(8) β€” that's the version-and-date situation, consider it signed, sealed, and delivered with a little sparkle βœ¨πŸŽ€πŸ’– stay safe out there in your security contexts, ily! πŸ¦‹

πŸ“¦ where this page comes from