cronjob_selinux(8)

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

πŸ’… cronjob_selinux(8) β€” the SELinux Policy for cronjob, bestie edition ✨

okay so this is the manual page for cronjob_selinux β€” it's section 8 of the manual, lives under the "SELinux Policy cronjob" umbrella, and it's literally your whole guide to how SELinux handles cronjob. grab a strawberry drink πŸ“ and let's go.


🌸 NAME 🌸

cronjob_selinux β€” the Security Enhanced Linux Policy for the cronjob processes. that's it, that's the name, no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

Security-Enhanced Linux secures the cronjob processes via flexible mandatory access control. yes, mandatory β€” it's giving main character energy, it does not ask permission, it just enforces. πŸ’…

The cronjob processes execute with the cronjob_t SELinux type. you can check if you have these processes running by executing the ps command with the -Z qualifier. the -Z is the vibe check for security contexts, iykyk.

For example:

ps -eZ | grep cronjob_t

run that and see who's showing up to the party. πŸ”₯


πŸŽ€ ENTRYPOINTS πŸŽ€

The cronjob_t SELinux type can be entered via the shell_exec_t, user_cron_spool_t file types. those are the two doors in. πŸšͺ

The default entrypoint paths for the cronjob_t domain are the following β€” read 'em and weep, there are a lot of them:

/usr/bin/d?ash, /usr/bin/ksh.*, /usr/bin/zsh.*, /usr/bin/esh,
/usr/bin/bash, /usr/bin/fish, /usr/bin/mksh, /usr/bin/sash,
/usr/bin/sesh, /usr/bin/tcsh, /usr/bin/yash, /usr/bin/bash2,
/usr/bin/smrsh, /usr/bin/nologin, /usr/bin/scponly, /usr/bin/scponlyc,
/usr/libexec/sesh, /usr/bin/git-shell, /usr/libexec/sudo/sesh,
/usr/bin/cockpit-bridge, /usr/libexec/cockpit-agent, /usr/libexec/git-
core/git-shell, /var/spool/at(/.*)?, /var/spool/atjobs/.SEQ,
/var/spool/cron, /var/spool/cron/tabs/[^/]+

look at all those shells, it's a whole friend group tbh 🫢. and yes, the git-shell path is split across lines up there β€” that's just the original page wrapping, the path is /usr/libexec/git-core/git-shell.


πŸ‘‘ PROCESS TYPES πŸ‘‘

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

You can see the context of a process using the -Z option to ps.

Policy governs the access confined processes have to files. SELinux cronjob policy is very flexible allowing users to setup their cronjob processes in as secure a method as possible. flexible and secure? we love a multitasker. ✨

The following process types are defined for cronjob:

  • cronjob_t
Note: semanage permissive -a cronjob_t can be used to make the process type cronjob_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, it stops blocking you but it's still watching, and it still writes down everything you did 😭. the receipts stay.

🌈 BOOLEANS 🌈

SELinux policy is customizable based on least access required. cronjob policy is extremely flexible and has several booleans that allow you to manipulate the policy and run cronjob with the tightest access possible. tightest access possible = the smallest possible guest list, periodt. πŸŽ€

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

note the difference bestie β€” fips_mode is already on, nis_enabled you gotta flip on yourself. πŸ‘€


πŸ’œ COMMANDS πŸ’œ

so here are the tools that do the actual work:

  • 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. a whole GUI, for when the terminal is doing too much. πŸ™ˆ

🧚 AUTHOR 🧚

This manual page was auto-generated using sepolicy manpage.

so nobody hand-wrote this, it's machine-made, but honestly? it ate. πŸ’…


⭐ SEE ALSO ⭐

go read those next, bestie, the lore goes deep. πŸ“š


okay that's the whole page! πŸŽ‰ cute little sign-off for the footer: this was cronjob manual page, dated 26-10-06, belonging to cronjob_selinux(8). mwah, go forth and be secure πŸ’–πŸ”₯

πŸ“¦ where this page comes from