selinux_bi...olicy_path(3)

πŸ’– selinux_bi...olicy_path β€” the SELinux API Documentation girlies πŸ’–

okay bestie, welcome to the selinux_bi...olicy_path(3) page, part of the SELinux API Documentation ✨ yes the title is literally cut off in the middle, that's just how it is, we don't ask questions πŸ’…


🌸 NAME 🌸

selinux_path, selinux_policy_root, selinux_binary_policy_path, selinux_current_policy_path, selinux_failsafe_context_path, selinux_removable_context_path, selinux_default_context_path, selinux_user_contexts_path, selinux_file_context_path, selinux_media_context_path, selinux_contexts_path β€” these functions return the paths to the active SELinux policy configuration directories and files 🫢

like. that's the whole job. path-finders. little tour guides for your SELinux config πŸ‘‘


✨ SYNOPSIS ✨

#include <selinux/selinux.h>

const char *selinux_path(void);

const char *selinux_policy_root(void);

const char *selinux_binary_policy_path(void);

const char *selinux_current_policy_path(void);

const char *selinux_failsafe_context_path(void);

const char *selinux_removable_context_path(void);

const char *selinux_default_context_path(void);

const char *selinux_user_contexts_path(void);

const char *selinux_usersconf_path(void);

const char *selinux_x_context_path(void);

const char *selinux_sepgsql_context_path(void);

const char *selinux_file_context_path(void);

const char *selinux_media_context_path(void);

const char *selinux_securetty_types_path(void);

const char *selinux_contexts_path(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, these functions return the paths to the active policy configuration directories and files, and they figure all that out based on the settings in /etc/selinux/config πŸ‘€ that file is the source of truth, bestie. no cap.

  • selinux_path() β€” returns the top-level SELinux configuration directory πŸ’–
  • selinux_policy_root() β€” returns the top-level policy directory 🌸
  • selinux_binary_policy_path() β€” returns the binary policy file loaded into kernel πŸ”₯
  • selinux_current_policy_path() β€” returns the currently loaded policy file from the kernel πŸ‘‘
  • selinux_default_type_path() β€” returns the context file mapping roles to default types πŸŽ€
  • selinux_failsafe_context_path() β€” returns the failsafe context for emergency logins 🚨 (emergency!! like, the backup plan energy)
  • selinux_removable_context_path() β€” returns the filesystem context for removable media πŸ’Ύ
  • selinux_default_context_path() β€” returns the system-wide default contexts for user sessions 🌈
  • selinux_user_contexts_path() β€” returns the directory containing per-user default contexts 🫢
  • selinux_usersconf_path() β€” returns the file containing mapping between Linux Users and SELinux users 🧚
  • selinux_x_context_path() β€” returns the file containing configuration for XSELinux extension πŸ–₯️
  • selinux_sepgsql_context_path() β€” returns the file containing configuration for SE-PostgreSQL πŸ“
  • selinux_netfilter_context_path() β€” returns the default netfilter context πŸ”₯
  • selinux_file_context_path() β€” returns the default system file contexts configuration πŸ’…
  • selinux_file_context_local_path() β€” returns the local customization file contexts configuration ✨
  • selinux_file_context_homedir_path() β€” returns the home directory file contexts configuration 🏠
  • selinux_media_context_path() β€” returns the file contexts for media device nodes πŸ“€
  • selinux_contexts_path() β€” returns the directory containing all of the context configuration files 🌟
  • selinux_securetty_types_path() β€” returns the defines tty types for newrole securettys πŸ’œ
lowkey obsessed with how every single one of these is just "here is a path, bestie, go wild." main character energy fr fr πŸ’€

πŸŽ€ AUTHOR πŸŽ€

this manual page was written by Dan Walsh <dwalsh@redhat.com> 🫢 absolute icon, we stan πŸ‘‘


⭐ SEE ALSO ⭐

  • selinux(8) β€” go read that one next, iykyk πŸ’–

and that's the page!! thanks for reading my little path-tour, bestie 🌸 this was the selinux_bi...olicy_path(3) page, written by <dwalsh@redhat.com>, dated 15 November 2004 ✨ slay, bye πŸ’…πŸ’–πŸ¦‹

πŸ“¦ where this page comes from