ncftool_selinux(8)

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

πŸ’… ncftool_selinux(8) β€” the SELinux glow-up for ncftool

okay so bestie, you've stumbled into ncftool_selinux(8), the SELinux Policy ncftool manual, and honestly? it's giving "protective older sibling energy" for the ncftool processes. let's get into it 🫢


✨ NAME ✨

ncftool_selinux β€” Security Enhanced Linux Policy for the ncftool processes. that's it, that's the whole vibe. πŸŽ€


🌸 DESCRIPTION 🌸

Security-Enhanced Linux secures the ncftool processes via flexible mandatory access control. yes, mandatory. it's not asking, it's telling. πŸ’…

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

for example:

ps -eZ | grep ncftool_t

literally go try it, i'll wait. πŸ¦‹


πŸšͺ ENTRYPOINTS πŸšͺ

The ncftool_t SELinux type can be entered via the ncftool_exec_t file type. that's the door, that's the whole gateway.

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

/usr/bin/ncftool

one path. iconic. no cap. ✨


πŸ‘‘ PROCESS TYPES πŸ‘‘

SELinux defines process types (domains) for each process running on the system. yes, every process gets its own little domain. main character energy for real.

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

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

the following process types are defined for ncftool:

  • ncftool_t
Note: semanage permissive -a ncftool_t can be used to make the process type ncftool_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like… it still talks about it, it just doesn't stop you. messy but useful πŸ™ˆ

πŸ—‚οΈ MANAGED FILES πŸ—‚οΈ

The SELinux process type ncftool_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 can't cover for a UID that doesn't have perms, sorry bestie 😭

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

systemd_passwd_var_run_t

/run/systemd/ask-password(/.*)?
/run/systemd/ask-password-block(/.*)?

that's a lot of paths but we don't skip a single one around here πŸ“


πŸŽ€ FILE CONTEXTS πŸŽ€

SELinux requires files to have an extended attribute to define the file type. it's not a suggestion, it's the whole system bb.

you can see the context of a file using the -Z option to ls.

Policy governs the access confined processes have to these files. SELinux ncftool policy is very flexible, allowing users to setup their ncftool processes in as secure a method as possible. she's consistent, we stan. 🌈

⭐ STANDARD FILE CONTEXT ⭐

SELinux defines the file context types for the ncftool, and 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. two steps, no shortcuts. πŸ’…

semanage fcontext -a -t ncftool_exec_t '/srv/ncftool/content(/.*)?'
restorecon -R -v /srv/myncftool_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise 🧚

the following file types are defined for ncftool:

ncftool_exec_t

  • Set files with the ncftool_exec_t type, if you want to transition an executable to the ncftool_t domain. that's the glow-up pipeline right there ✨
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 β€” choose wisely bestie, chcon is the "i'll fix it later" of the SELinux world 😭

πŸ› οΈ 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.
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. a whole GUI, for the people who like clicking πŸ‘‘

✍️ AUTHOR ✍️

This manual page was auto-generated using sepolicy manpage . β€” yes, the robot wrote it, and honestly it ate πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€

selinux(8), ncftool(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)

like i said, the whole friend group. go read them, iykyk πŸ’–


and that's the page! brought to you by ncftool, dated 26-10-06, living in ncftool_selinux(8) β€” slay, periodt, go label some files πŸŒΈπŸ’…πŸ¦‹

πŸ“¦ where this page comes from