cardmgr_selinux(8)

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

πŸ’– cardmgr_selinux β€” the whole SELinux Policy for cardmgr thing, explained πŸŽ€

okay so bestie, this is the manual page for cardmgr_selinux (that's the cardmgr_selinux(8) manual, iykyk) β€” the SELinux Policy for the cardmgr processes. it's giving very niche, very specific, very "your computer is protecting itself" energy and honestly? we're obsessed. let's get into it πŸ’…


✨ NAME ✨

cardmgr_selinux β€” the Security Enhanced Linux Policy for the cardmgr processes. that's it, that's the name, she's simple and she knows what she wants 🫢


🌸 DESCRIPTION 🌸

Security-Enhanced Linux secures the cardmgr processes via flexible mandatory access control. yes bestie, mandatory β€” that means it's not optional, the policy said what it said and it meant it πŸ’€

The cardmgr processes execute with the cardmgr_t SELinux type. wanna check if you've got these processes running? literally just run ps with the -Z qualifier, easy peasy:

ps -eZ | grep cardmgr_t

that's the vibe check right there. run it, screenshot it, send it to the group chat πŸ“Έ


πŸ¦‹ ENTRYPOINTS πŸ¦‹

The cardmgr_t SELinux type can be entered via the cardmgr_exec_t and cardctl_exec_t file types. so those are the doors, those are the entry points, no sneaking in through a window πŸͺŸβœ¨

The default entrypoint paths for the cardmgr_t domain are literally the following, no cap:

/usr/bin/cardmgr, /etc/apm/event.d/pcmcia, /usr/bin/cardctl

πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (aka domains) for each process running on the system. one process, one domain, everyone gets their own little room πŸšͺπŸ’–

You can see the context of a process using the -Z option to ps. iconic option, honestly, she's the main character of process inspection.

Policy governs the access confined processes have to files. the SELinux cardmgr policy is very flexible allowing users to setup their cardmgr processes in as secure a method as possible. flexible AND secure? we love a multitasker πŸ’…

The following process types are defined for cardmgr:

  • cardmgr_t
Note: semanage permissive -a cardmgr_t can be used to make the process type cardmgr_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like… she's chill now, but she's still taking notes πŸ“πŸ‘€

πŸ“ BOOLEANS πŸ“

SELinux policy is customizable based on least access required. the cardmgr policy is extremely flexible and has several booleans that allow you to manipulate the policy and run cardmgr with the tightest access possible. tightest access = tightest security = a serve, fr fr πŸ”₯

If you want to dontaudit all daemons scheduling requests (setsched, sys_nice), you must turn on the daemons_dontaudit_scheduling boolean. it's enabled by default, bestie, so she's already on unless you went and changed things πŸ™ˆ

setsebool -P daemons_dontaudit_scheduling 1

If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. also enabled by default ✨

setsebool -P fips_mode 1

πŸ’œ MANAGED FILES πŸ’œ

The SELinux process type cardmgr_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. important: the processes UID still need to have DAC permissions β€” SELinux isn't out here overriding your regular permissions, she's just adding a whole extra layer, okurrr πŸ’€

cardmgr_var_lib_t

that's it. no paths listed. she's mysterious. she's lowkey an enigma πŸ•΅οΈβ€β™€οΈ

cardmgr_var_run_t

/var/lib/pcmcia(/.*)?
/run/stab
/run/cardmgr.pid

cluster_conf_t

/etc/cluster(/.*)?

cluster_var_lib_t

/var/lib/pcsd(/.*)?
/var/lib/cluster(/.*)?
/var/lib/openais(/.*)?
/var/lib/pengine(/.*)?
/var/lib/corosync(/.*)?
/usr/lib/heartbeat(/.*)?
/var/lib/heartbeat(/.*)?
/var/lib/pacemaker(/.*)?

cluster_var_run_t

/run/crm(/.*)?
/run/cman_.*
/run/rsctmp(/.*)?
/run/aisexec.*
/run/heartbeat(/.*)?
/run/pcsd-ruby.socket
/run/corosync-qnetd(/.*)?
/run/corosync-qdevice(/.*)?
/run/pcsd.socket
/run/corosync.pid
/run/cpglockd.pid
/run/rgmanager.pid
/run/cluster/rgmanager.sk

net_conf_t

/etc/hosts[^/]*
/etc/yp.conf.*
/etc/denyhosts.*
/run/netconfig(/.*)?
/etc/hosts.deny.*
/run/cloud-init(/.*)?
/etc/resolv.conf.*
/etc/.resolv.conf.*
/etc/resolv-secure.conf.*
/run/systemd/network(/.*)?
/etc/sysconfig/network(/.*)?
/etc/sysconfig/network/.*resolv.conf
/etc/sysconfig/networking(/.*)?
/run/NetworkManager/resolv.conf.*
/run/NetworkManager/no-stub-resolv.conf.*
/etc/sysconfig/network/scripts/functions.netconfig
/etc/ethers
/etc/ntp.conf
/run/systemd/resolve/resolv.conf
/run/systemd/resolve/stub-resolv.conf

root_t

/sysroot/.aleph-version.json
/sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
/
/initrd
/var/lib/ntp

🌈 FILE CONTEXTS 🌈

SELinux requires files to have an extended attribute to define the file type. yes, extended attributes, she's fancy like that πŸ’…

You can see the context of a file using the -Z option to ls. same energy as the ps one, they're sisters 🫢

Policy governs the access confined processes have to these files. the SELinux cardmgr policy is very flexible allowing users to setup their cardmgr processes in as secure a method as possible. (yes she said it again, because it's true and she's proud 😀)

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for the cardmgr. if you wanted to store files with these types in a different paths (plural! as written! we don't fix her grammar, she's perfect πŸŽ€), you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. two steps, both iconic:

semanage fcontext -a -t cardmgr_dev_t '/srv/cardmgr/content(/.*)?'
restorecon -R -v /srv/mycardmgr_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise πŸ™Œ

The following file types are defined for cardmgr:

cardmgr_dev_t

  • Set files with the cardmgr_dev_t type, if you want to treat the files as cardmgr dev data.

cardmgr_exec_t

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

Paths:

/usr/bin/cardmgr, /etc/apm/event.d/pcmcia

cardmgr_lnk_t

  • Set files with the cardmgr_lnk_t type, if you want to treat the files as cardmgr lnk data.

cardmgr_var_lib_t

  • Set files with the cardmgr_var_lib_t type, if you want to store the cardmgr files under the /var/lib directory.

cardmgr_var_run_t

  • Set files with the cardmgr_var_run_t type, if you want to store the cardmgr files under the /run or /var/run directory.

Paths:

/var/lib/pcmcia(/.*)?, /run/stab, /run/cardmgr.pid
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 vs permanent is a whole personality difference, don't get it twisted 😭

🧚 COMMANDS 🧚

semanage fcontext can also be used to manipulate default file context mappings. slay.

semanage permissive can also be used to manipulate whether or not a process type is permissive. also slay.

semanage module can also be used to enable/disable/install/remove policy modules. the full suite, we love a versatile queen πŸ‘‘

semanage boolean can also be used to manipulate the booleans. booleans but make it manageable πŸ’–

system-config-selinux is a GUI tool available to customize SELinux policy settings. yes bestie, a GUI β€” for when the terminal is doing too much and you just want to click things with a mouse πŸ–±οΈβœ¨


πŸ™ˆ AUTHOR πŸ™ˆ

This manual page was auto-generated using sepolicy manpage . no human author to credit, only the machine, and honestly? she ate πŸ€–πŸ’…


πŸŽ€ SEE ALSO πŸŽ€

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

go read those too, bestie, the lore is deep πŸ“šπŸ¦‹


and that's the whole page!! ok bye ily, this was the cardmgr_selinux(8) page, brought to you by version cardmgr dated 26-10-06 β€” the date is giving Y2K-adjacent but she's timeless actually. mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from