selinux_l...on_default(3)

πŸ“¦
version 3.11 Β· 2 versions
, in alpine 3.24, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 -1 otherwise 😭

so like, check it. 0 good, -1 not good. vibe check accordingly 🫢


🌈 SEE ALSO 🌈

go read these next, bestie, the lore goes deep:


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