selinux_audit_rule_init(9)
π 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 forkmalloc.
π 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 π¦
- Kernel file
./security/selinux/include/audit.h selinux_audit_rule_avc_callback(9)selinux_audit_rule_free(9)selinux_audit_rule_match(9)selinux_audit_rule_known(9)
xoxo, your kernel bestie β from ./security/selinux/include, dated October 2026, on the selinux_audit_rule_init(9) page ππ«Ά
π¦ 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