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-1if it fails π like it did NOT slay. otherwise it returns0β¨ 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 π§π
π¦ where this page comes from
- centos-stream 10: libsemanage-devel 3.11-3.el10 Β· LGPL-2.1-or-later
- centos-stream 9: libsemanage-devel 3.6-5.el9 Β· LGPLv2+
- centos-stream 9: libsemanage-devel 3.6-5.el9 Β· LGPLv2+
- debian bookworm: libsemanage-dev 3.4-1+b5
- debian trixie: libsemanage-dev 3.8.1-1 Β· LGPL-2.1-or-later
- fedora 43: libsemanage-devel 3.9-4.fc43 Β· LGPL-2.1-or-later
- fedora 43: libsemanage-devel 3.9-4.fc43 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.10-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.10-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.11-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: libsemanage-devel 3.11-1.fc44 Β· LGPL-2.1-or-later
- nixos 26.05: libsemanage 3.10
- nixpkgs unstable: libsemanage 3.11
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libsemanage-devel 3.8.1-160000.3.1 Β· LGPL-2.1-or-later
- ubuntu jammy: libsemanage-dev 3.3-1build2
- ubuntu noble: libsemanage-dev 3.5-1build5 Β· LGPL-2.1-or-later
- ubuntu questing: libsemanage-dev 3.8.1-1
- ubuntu resolute: libsemanage-dev 3.9-1build1 Β· LGPL-2.1-or-later
- ubuntu stonking: libsemanage-dev 3.11-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms