selinux_secmark_enabled(9)
π selinux_secmark_enabled β the "is SECMARK on rn??" check π
okay so this one is a kernel API manual page, bestie β it's selinux_secmark_enabled(9), and it lives in the SELinux corner of the kernel. it's short, it's sweet, and it's literally just a vibe check for SECMARK. let's go β¨
πΈ NAME πΈ
selinux_secmark_enabled β check to see if SECMARK is currently enabled π
like. that's the whole job. she peeks, she reports, she leaves. iconic behaviour tbh π
β¨ SYNOPSIS β¨
int selinux_secmark_enabled (void );
that's it. no params, no drama, no argc/argv situations. she takes nothing and she gives you an int π«Ά
π¦ ARGUMENTS π¦
voidβ no arguments. literally none. zero. not a single one. she needs nothing from you, she's independent like that π
π₯ DESCRIPTION π₯
okay so here's the tea β β this function goes and checks the SECMARK reference counter to see if any SECMARK targets are currently configured.
the logic is honestly so simple it's giving main character energy:
- if the reference counter is greater than zero, SECMARK is considered to be enabled π
- it returns true (1) if SECMARK is enabled
- it returns false (0) if SECMARK is disabled π
and then there's the plot twist π β if the always_check_network policy capability is enabled, then SECMARK is always considered enabled. like, no matter what the counter says. periodt. she said "always" and she meant it β¨
ngl thealways_check_networkthing is the one sneaky bit β if that policy capability is on, you're getting1back and that's just how it is, bestie π€·ββοΈ
π SEE ALSO π
go read the source, it's right here in the kernel, no cap:
- Kernel file
./security/selinux/hooks.c
and the whole friend group of related functions β collect them all like stickers π:
selinux_peerlbl_enabled(9)task_avdcache_reset(9)task_avdcache_search(9)task_avdcache_update(9)selinux_inode_permission(9)selinux_inode_xattr_skipcap(9)selinux_mmap_backing_file(9)selinux_skb_peerlbl_sid(9)selinux_conn_sid(9)selinux_getselfattr(9)selinux_uring_override_creds(9)selinux_uring_sqpoll(9)selinux_uring_cmd(9)selinux_uring_allowed(9)
okay that's the whole page, and honestly? she ate π
this one came from ./security/selinux, dated October 2026 β so like, mark your calendars bestie, and go check that counter π¦β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms