semanage_set_root(3)

✨ semanage_set_root β€” SELinux Management API ✨

okay bestie, welcome to the Libsemanage API documentation πŸ’– this one's a little two-for-one deal, it's the semanage_set_root page but it's also bringing semanage_root along for the ride. so it's a setter AND a getter, it's giving dynamic duo energy πŸ¦‹


🌸 SYNOPSIS 🌸

setting / getting the alternate root directory for the SELinux configuration directory, no cap:

#include <semanage/handle.h>

extern int semanage_set_root(const char *path);

extern const char *semanage_root(void);

πŸ’… DESCRIPTION πŸ’…

so semanage_set_root() sets an alternate root directory for the SELinux configuration paths that the semanage library is gonna use. that's it, that's the whole vibe. you hand it a path and it's like "okay bet, we're rooting everything here now" πŸŽ€


πŸ‘‘ RETURN VALUE πŸ‘‘

  • semanage_set_root() returns -1 if it fails 😭 like it did NOT slay. otherwise it returns 0 ✨ success era.
  • semanage_root() returns the semanage root 🫢
⚠️ the value that semanage_root() gives you back should not be modified by the caller β€” hands off bestie, look but don't touch πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

  • semanage_handle_create(3)
  • semanage_connect(3)

and that's the whole page, you ate that fr fr πŸ’œ this iconic lil doc was written by dwalsh@redhat.com, dated 1 June 2011 β€” yeah she's a legacy queen but she still serves πŸ‘‘ mwah, go forth and root responsibly πŸ§šπŸ’–