aa_policy_init(9)
π aa_policy_init(9) β like, the Kernel API Manual page you actually wanna read π
okay so bestie, gather round πΈ this one's a kernel API manual page (yes, that Kernel API Manual), and it's about aa_policy_init β literally the function that gets a policy structure all set up and ready to slay. it's short, it's sweet, and it's giving "small but crucial," so let's go π
β¨ NAME β¨
aa_policy_init β initialize a policy structure π«Ά
π SYNOPSIS π
bool aa_policy_init (struct aa_policy *policy , const char *prefix ,
const char *name , gfp_t gfp );
π¦ ARGUMENTS π¦
policyβ the policy you want to initialize. this one is NOT NULL fr fr, no skipping it πprefixβ a prefix name, but only if one is required. this one is MAYBE NULL, so it's flexible like that β¨nameβ the name of the policy. init is gonna make a copy of it, so don't worry about it wandering off π NOT NULL tho, that part's non-negotiable.gfpβ the allocation mode. that's the vibe for how memory gets grabbed π
π NOTE π
this fn creates a copy of the strings passed in π«Ά yes bestie, it's making its own little copies β that's just the kind of main character energy we're working with here π
β RETURN β
returns true if the policy init was successful π (so like, a happy little boolean, iconic)
π₯ SEE ALSO π₯
- Kernel file
./security/apparmor/lib.c val_mask_to_str(9)aa_destroy_str_table(9)skipn_spaces(9)aa_info_message(9)aa_perm_mask_to_str(9)aa_apply_modes_to_perms(9)aa_check_perms(9)aa_policy_destroy(9)
and that's the whole page, bestie, you ate that π ok so this little baddie lives over in ./security/apparmor and it's dated October 2026 β so mark your calendars, mwah πβ¨π§
π¦ 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