selinux_r...t_rootpath(3)

πŸ’– selinux_restorecon_set_alt_rootpath(3) πŸ’–

okay bestie, welcome to the SELinux API documentation β€” this one's a lil function from the SELinux crew and she is SHORT but she is IMPORTANT, so pay attention 🫢


✨ NAME ✨

selinux_restorecon_set_alt_rootpath β€” the way she just... sets an alternate rootpath. that's it. that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

#include <selinux/restorecon.h>

int selinux_restorecon_set_alt_rootpath(const char *alt_rootpath);

like yes, one header, one function, one argument. minimalism is the vibe ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie πŸ“ β€” selinux_restorecon_set_alt_rootpath() hands over to selinux_restorecon(3) a pointer that's holding an alternate rootpath, and that pointer is called alt_rootpath. that's literally the entire plot.

⚠️ IMPORTANT ⚠️ selinux_restorecon_set_alt_rootpath() must be called prior to selinux_restorecon(3). like. before. not after. before. don't be out here calling it late, she does not do tardiness 😭

πŸ‘‘ RETURN VALUE πŸ‘‘

  • Success β€” she returns zero πŸ’š slay, iconic, no notes.
  • Error β€” she returns -1 and errno gets set appropriately. it's giving "something went wrong and she's telling you about it" πŸ’€

🌈 SEE ALSO 🌈

the whole friend group, fr fr:


and that's the whole page, bestie!! no cap, every flag, every return value, every reference β€” all accounted for πŸ’œ

this lil baddie came out of Security Enhanced Linux and her page is dated 29 May 2016 β€” vintage, lowkey, still serving πŸŽ€

periodt. go call your functions in the right order. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from