selinux_audit_rule_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– selinux_audit_rule_init(9) πŸ’–

okay bestie, welcome to the Kernel API Manual entry for selinux_audit_rule_init(9) β€” it’s giving β€œtiny but important kernel helper,” and we’re gonna read it together. πŸ’…

🌸 NAME 🌸

selinux_audit_rule_init β€” alloc/init an selinux audit rule structure.

✨ SYNOPSIS ✨

int selinux_audit_rule_init (u32 field , u32 op , char *rulestr , void
       **rule , gfp_t gfp );

πŸŽ€ ARGUMENTS πŸŽ€

  • field β€” the field this rule refers to.
  • op β€” the operator the rule uses.
  • rulestr β€” the text "target" of the rule.
  • rule β€” pointer to the new rule structure returned via this.
  • gfp β€” GFP flag used for kmalloc.

πŸ’… DESCRIPTION πŸ’…

Returns 0 if successful, -errno if not. On success, the rule structure will be allocated internally. The caller must free this structure with selinux_audit_rule_free after use.

bestie, do not forget the cleanup: selinux_audit_rule_free is your post-use bestie. ✨

πŸ¦‹ SEE ALSO πŸ¦‹


xoxo, your kernel bestie β€” from ./security/selinux/include, dated October 2026, on the selinux_audit_rule_init(9) page πŸ’–πŸ«Ά

πŸ“¦ where this page comes from