utempter_selinux(8)

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

πŸ’… utempter_selinux β€” the manual page, bestie edition ✨

Okay so first things first: the manual name is utempter_selinux, and this whole page is literally about the Security Enhanced Linux Policy for the utempter processes. Buckle up, we're getting into it πŸŽ€


🌸 NAME 🌸

utempter_selinux β€” Security Enhanced Linux Policy for the utempter processes. That's it, that's the name, no cap πŸ’–


✨ SYNOPSIS ✨

Bestie, this one's a whole manual page, not a command you run β€” so there's no synopsis line to copy here. The vibe is: read the sections below and understand the policy πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

Security-Enhanced Linux secures the utempter processes via flexible mandatory access control. Slay, mandatory access control is doing the absolute most and we love that for us πŸ‘‘

The utempter processes execute with the utempter_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 utempter_t

Lowkey iconic command, run it and see what's up πŸ’…


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The utempter_t SELinux type can be entered via the utempter_exec_t file type. That's the doorway, the main character entrance, iykyk πŸšͺ✨

The default entrypoint paths for the utempter_t domain are the following:

  • /usr/bin/utempter
  • /usr/lib/utempter/utempter
  • /usr/libexec/utempter/utempter

Three paths, all three gotta be in your notes, periodt πŸŽ€


πŸŽ€ PROCESS TYPES πŸŽ€

SELinux defines process types (domains) for each process running on the system. It's giving organized, it's giving structured, we stan a system that labels everything 🫢

You can see the context of a process using the -Z option to ps. Run that flag, get the context, feel powerful πŸ’ͺ

Policy governs the access confined processes have to files. SELinux utempter policy is very flexible allowing users to setup their utempter processes in as secure a method as possible. Flexible and secure? Obsessed, honestly πŸ”₯

The following process types are defined for utempter:

  • utempter_t
Note: semanage permissive -a utempter_t can be used to make the process type utempter_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. So like, it's permissive but it's still watching, bestie β€” the AVC messages don't stop, they're just receipts πŸ‘€πŸ’€

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. utempter policy is extremely flexible and has several booleans that allow you to manipulate the policy and run utempter with the tightest access possible. Booleans are literally the toggles of the SELinux world and they are so fun to flip (safely!) πŸŽ›οΈβœ¨

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

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

Two booleans, two commands, no skipping, that's the whole tea β˜•πŸ’–


🌸 MANAGED FILES 🌸

The SELinux process type utempter_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. Like yes the SELinux policy is flexible but DAC still gets a say too, it's a whole team effort 🀝

initrc_var_run_t

/run/sysconfig(/.*)?
/run/utmp
/run/keymap
/run/numlock-on
/run/setleds-on
/run/runlevel.dir
/run/setmixer_flag
/run/bootsplashctl

Eight paths, all of them, I'm not skipping a single one because every detail matters πŸŽ€

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

Eleven paths here and yes I typed every single one because that's what besties do πŸ’…

wtmp_t

/var/log/wtmp.*

Just one path, she's lowkey, she's simple, she's /var/log/wtmp.* and we respect her 🌸


πŸ‘‘ FILE CONTEXTS πŸ‘‘

SELinux requires files to have an extended attribute to define the file type. It's mandatory, it's the whole system, no extended attribute no label no vibe check pass πŸ”

You can see the context of a file using the -Z option to ls. Same -Z energy as ps, we love consistency ✨

Policy governs the access confined processes have to these files. SELinux utempter policy is very flexible allowing users to setup their utempter processes in as secure a method as possible. (Yes that sentence is basically the same as before, but the facts stay the facts, bestie πŸ’–)

πŸŽ€ STANDARD FILE CONTEXT πŸŽ€

SELinux defines the file context types for the utempter, 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 utempter_exec_t '/srv/utempter/content(/.*)?'
restorecon -R -v /srv/myutempter_content

Two commands, that's the flow: semanage fcontext first to set the mapping, restorecon after to actually put the labels on disk. In that order, no switching, periodt 🫢

Note: SELinux often uses regular expressions to specify labels that match multiple files. Regex doing regex things, iconic behavior 🧚

The following file types are defined for utempter:

utempter_exec_t

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

Paths:

/usr/bin/utempter
/usr/lib/utempter/utempter
/usr/libexec/utempter/utempter

Same three paths as the entrypoints section, because that's literally how the transition works and the manual said it twice so I'm saying it twice too 😌

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. So like <pink>chcon</pink> is the quick vibe, <purple>semanage fcontext</purple> is the permanent move, and <cyan>restorecon</cyan> makes it real. Don't confuse them, bestie, that's the whole lesson πŸ’€πŸ’–

πŸ’» COMMANDS πŸ’»

  • semanage fcontext can also be used to manipulate default file context mappings. It's the mapping manager πŸ“Œ
  • semanage permissive can also be used to manipulate whether or not a process type is permissive. Toggle that permissive energy 🎚️
  • semanage module can also be used to enable/disable/install/remove policy modules. Modules getting the full treatment: enable, disable, install, and remove 🧩
  • semanage boolean can also be used to manipulate the booleans. All those booleans from earlier? This is the tool that pokes them πŸŽ›οΈ
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. A whole GUI, for when the terminal is a lot and you want buttons πŸ–±οΈβœ¨

🫢 AUTHOR 🫢

This manual page was auto-generated using sepolicy manpage . β€” yes, the robot wrote it, and I'm just here making it cute. Credit where it's due πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

That's all seven references, every single one, no cap πŸŽ€


and that's a wrap, bestie! This iconic page came from the utempter_selinux(8) manual β€” policy utempter, dated 26-10-06 β€” auto-generated with sepolicy manpage ., so go forth and be secure, flexible, and maybe a little dramatic about it πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from