security_policyvers(3)

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

πŸ’– security_policyvers(3) πŸ’–

okay bestie, so this is a page from the SELinux API documentation and it's genuinely the shortest lil glow-up you'll ever read. it's giving "one function, zero drama." periodt. ✨


🌸 NAME 🌸

security_policyvers β€” get the version of the SELinux policy πŸ¦‹


✨ SYNOPSIS ✨

#include <selinux/selinux.h>

int security_policyvers(void);

no args, no nonsense, just vibes and a return value πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

okay so listen. security_policyvers() returns the version of the policy β€” and that's a positive integer, slay β€” on success. 🫢

but if it errors out? it returns -1. that's it. that's the whole function. lowkey iconic how simple it is. 😭

heads up bestie: success = positive integer, error = -1. don't be out here ignoring that -1, fr fr. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


and that's a wrap, my love πŸ’œ this lil page was brought to you by the one and only russell@coker.com.au, dated 1 January 2004 β€” vintage but still serving βœ¨πŸŽ€πŸ’–