dirsrvad..._selinux(8)

πŸ“¦ version 38.1.87, in centos-stream 9

πŸ’… dirsrvadmin_script_selinux β€” the girlies' guide to the SELinux policy for dirsrvadmin_script

okay so bestie, you've stumbled into dirsrvad..._selinux(8) (yes the title is abbreviated, no I don't know why, we move on) and it's literally all about the Security Enhanced Linux Policy for the dirsrvadmin_script processes. Buckle up, this is gonna be iconic. ✨


πŸ›‘οΈ NAME

dirsrvadmin_script_selinux β€” the Security Enhanced Linux Policy for the dirsrvadmin_script processes. that's it, that's the whole name, she's doing her best. πŸŽ€


🌸 DESCRIPTION

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

The dirsrvadmin_script processes execute with the dirsrvadmin_script_t SELinux type. wanna check if you've got these processes running? just run the ps command with the -Z qualifier, easy.

for example:

ps -eZ | grep dirsrvadmin_script_t

look at you go, detective. πŸ•΅οΈβ€β™€οΈ


πŸšͺ ENTRYPOINTS

The dirsrvadmin_script_t SELinux type can be entered via the dirsrvadmin_script_exec_t file type. that's the doorway, the portal, the main character entrance. πŸ¦‹

the default entrypoint paths for the dirsrvadmin_script_t domain are literally these:

/usr/lib/dirsrv/cgi-bin(/.*)?, /usr/lib/dirsrv/dsgw-cgi-bin(/.*)?

πŸ‘‘ PROCESS TYPES

SELinux defines process types (domains) for each process running on the system. every process gets a little name tag, it's giving kindergarten orientation.

you can see the context of a process using the -Z option to ps. lowkey the most useful flag, no cap.

Policy governs the access confined processes have to files. the SELinux dirsrvadmin_script policy is very flexible, allowing users to setup their dirsrvadmin_script processes in as secure a method as possible. flexible and secure? she said both, periodt.

the following process types are defined for dirsrvadmin_script:

  • dirsrvadmin_script_t
πŸ’€ Note: semanage permissive -a dirsrvadmin_script_t can be used to make the process type dirsrvadmin_script_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, she's off the leash but she's still being watched. πŸ™ˆ

πŸ”₯ BOOLEANS

SELinux policy is customizable based on least access required. the dirsrvadmin_script policy is extremely flexible and has several booleans that let you manipulate the policy and run dirsrvadmin_script with the tightest access possible. so many little switches, so little time. πŸŽ›οΈ

  • 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.
setsebool -P fips_mode 1
  • httpd_enable_cgi β€” if you want to allow httpd cgi support, you must turn on the httpd_enable_cgi boolean. Enabled by default.
setsebool -P httpd_enable_cgi 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

πŸ—‚οΈ MANAGED FILES

The SELinux process type dirsrvadmin_script_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. heads up though: the processes UID still need to have DAC permissions. SELinux said "I'll handle my half, you handle yours". πŸ’…

  • dirsrv_config_t
/etc/dirsrv(/.*)?
  • dirsrv_var_lib_t
/var/lib/dirsrv(/.*)?
  • dirsrv_var_log_t
/var/log/dirsrv(/.*)?
  • dirsrv_var_run_t
/var/run/slapd.*
/var/run/dirsrv(/.*)?
  • dirsrvadmin_config_t
/etc/dirsrv/dsgw(/.*)?
/etc/dirsrv/admin-serv(/.*)?
  • dirsrvadmin_lock_t
/var/lock/subsys/dirsrv-admin
  • dirsrvadmin_rw_content_t
  • dirsrvadmin_tmp_t
  • systemd_passwd_var_run_t
/var/run/systemd/ask-password(/.*)?
/var/run/systemd/ask-password-block(/.*)?

(yeah dirsrvadmin_rw_content_t and dirsrvadmin_tmp_t don't list any default paths here β€” that's just how the page is, don't come for me 😭)


🏷️ FILE CONTEXTS

SELinux requires files to have an extended attribute to define the file type. every file's gotta have a little something extra, we love a file with layers. πŸŽ€

you can see the context of a file using the -Z option to ls. yes, ls -Z, my beloved.

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

the following file types are defined for dirsrvadmin_script:

dirsrvadmin_script_exec_t

  • set files with the dirsrvadmin_script_exec_t type if you want to transition an executable to the dirsrvadmin_script_t domain. boom, she's in.

Paths:

/usr/lib/dirsrv/cgi-bin(/.*)?, /usr/lib/dirsrv/dsgw-cgi-bin(/.*)?
⚠️ 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. temporary fix vs. permanent glow-up, know the difference bestie. πŸ’–

🧰 COMMANDS

  • 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. (booleans again!! she's everywhere!!)
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. a GUI! for the girlies who like a little clicky-clicky. πŸ–±οΈβœ¨

✍️ AUTHOR

This manual page was auto-generated using sepolicy manpage . β€” yes a robot wrote this, and honestly? she ate. πŸ€–πŸ’…


πŸ”— SEE ALSO

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

go read those next, iykyk. πŸ“šπŸ¦‹


and that's the whole page, bestie! 🌈 this cutie was brought to you by dirsrvadmin_script, version/date 26-10-23, and the original footer title dirsrvad..._selinux(8) β€” she's abbreviated, she's iconic, she's literally serving SELinux realness. mwah! πŸ’‹πŸ‘‘β­

πŸ“¦ where this page comes from