AUDIT_SET_LOGINUID_IMMUTABLE(3)

πŸ’– AUDIT_SET_LOGINUID_IMMUTABLE β€” the Linux Audit API, section 3, bestie edition πŸ’–

okay so. imagine a value that you set once and then nobody, not even you, not even root, not even your most chaotic shell script, can ever change again. that's this function. it's giving "locked in" and honestly? iconic. πŸ”’βœ¨


✨ NAME ✨

audit_set_loginuid_immutable β€” make loginuid value immutable 🫢


🌸 SYNOPSIS 🌸

#include <libaudit.h>

int audit_set_loginuid_immutable(int fd);"

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. audit_set_loginuid_immutable() locks the loginuid so that it can no longer be changed. that's it. that's the whole vibe. once it's locked, it's locked, periodt. πŸ’…

the descriptor fd must be an open audit netlink socket β€” no random fd, no vibes-based guessing, an actual audit netlink socket, fr fr.

and here's the tea: this call is equivalent to using audit_set_feature() to enable and lock the AUDIT_FEATURE_LOGINUID_IMMUTABLE bit. same energy, different entrance. ✨


πŸ‘‘ RETURN VALUE πŸ‘‘

the return value is <= 0 on error 😭, otherwise it's the netlink sequence id number 🌈. so like, if you get something greater than zero, you ate. if you get <= 0, something went sideways and you should go check.


πŸŽ€ SEE ALSO πŸŽ€

go read those too, they're part of the same friend group 🫢


πŸ’œ AUTHOR πŸ’œ

Steve Grubb πŸ‘‘


okay that's the whole page bestie, mwah πŸ’‹

this lil legend comes to you from Red Hat, dated July 2025, and yes it's AUDIT_SET_LOGINUID_IMMUTABLE(3) in the flesh β€” stay immutable, stay unbothered, drink water πŸ§šπŸ’–πŸŒΈ