selinux_l...on_default(3)
π selinux_l...on_default(3) π
okay bestie, welcome to the SELinux API documentation β yes, the manual name is literally selinux_l...on_default(3), it's giving "we ran out of room in the header" and honestly? iconic. sit down, we're doing file contexts today π
β¨ NAME β¨
selinux_lsetfilecon_default β set the file context to the system defaults
no cap, that's the whole job description.
πΈ SYNOPSIS πΈ
#include <selinux/selinux.h>
int selinux_lsetfilecon_default(const char *path);
look at her. one header, one function, one path. clean. minimal. main character energy π
π¦ DESCRIPTION π¦
so selinux_lsetfilecon_default() sets the file context to the system defaults. that's it. that's the function. she takes your path and she gives it the system-default file context, periodt π
(if you were expecting a spicy twist β nope. the manpage is short and unbothered and I respect it fr fr.)
β RETURN VALUE β
- returns zero on success β¨
- returns
-1otherwise π
so like, check it. 0 good, -1 not good. vibe check accordingly π«Ά
π SEE ALSO π
go read these next, bestie, the lore goes deep:
selinux(8)selinux_file_context_cmp(3)selinux_file_context_verify(3)matchpathcon(3)freecon(3)setfilecon(3)setfscreatecon(3)
and that's the whole page, bestie. written by stephen.smalley.work@gmail.com, 21 November 2009 β yes, 2009, she's a vintage queen and she still serves πβ¨ mwah, go set some file contexts, ily ππ§πΈ
π¦ 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 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 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