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 toselinux_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
-1anderrnogets set appropriately. it's giving "something went wrong and she's telling you about it" π
π SEE ALSO π
the whole friend group, fr fr:
selinux_restorecon(3)selinux_restorecon_set_sehandle(3)selinux_restorecon_default_handle(3)selinux_restorecon_set_exclude_list(3)selinux_restorecon_xattr(3)
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
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-devel 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- debian bookworm: libselinux1-dev 3.4-1+b6
- debian trixie: libselinux1-dev 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: libselinux1-dev 3.3-1build2
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: libselinux1-dev 3.8.1-1build1
- ubuntu resolute: libselinux-dev 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: libselinux-dev 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms