security_audit_rule_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to security_audit_rule_init(9) from the Kernel API Manual πŸ’– this is the page where we allocate and init an LSM audit rule struct, and it’s honestly giving β€œsmall function, big security vibes.” no cap.

✨ NAME ✨

security_audit_rule_init β€” Allocate and init an LSM audit rule struct πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int security_audit_rule_init (u32 field , u32 op , char *rulestr , void
       **lsmrule , gfp_t gfp );

πŸŽ€ ARGUMENTS πŸŽ€

  • field β€” audit action
  • op β€” rule operator
  • rulestr β€” rule context
  • lsmrule β€” receive buffer for audit rule struct
  • gfp β€” GFP flag used for kmalloc

πŸ’… DESCRIPTION πŸ’…

Allocate and initialize an LSM audit rule structure. that’s the whole plot, and it ate. ✨


🌸 RETURN 🌸

Return 0 if lsmrule has been successfully set, and -EINVAL in case of an invalid rule. so valid rule = slay, invalid rule = -EINVAL bestie 😭


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./security/security.c is right here, and the whole iconic cross-reference squad is below β€” every single one, no cap 🫢


signed off with main-character energy from ./security, dated October 2026, all for security_audit_rule_init(9) πŸ’…βœ¨

πŸ“¦ where this page comes from