__policy_strn_find(9)
β¨ NAME β¨
okay bestie, this is __policy_strn_find(9) from the Kernel API Manual β the AppArmor helper whose whole vibe is: find a policy that's name matches @len chars of @str π
. Yes, the grammar is doing cardio, but the mission is clear: match a policy by a chunk of its name π.
πΈ SYNOPSIS πΈ
struct aa_policy * __policy_strn_find (struct list_head *head , const
char *str , int len );
π ARGUMENTS π
headβ list to search (NOT NULL) πstrβ string to search for (NOT NULL) π§lenβ length of match required π
π¦ DESCRIPTION π¦
Requires: rcu_read_lock be held β no cap, lock it before you come through, bestie π.
Here's the tea: if len == strlen(strlen) then this is equiv to __policy_find; otherwise it allows searching for policy by a partial match of name. The way that one little branch changes the whole search vibe? iconic β¨.
strlen(strlen) is literally what the page says, so I'm passing it to you exactly like that β do not come for me, I'm just the messenger π.
π RETURN π
It returns an unrefcounted policy that match str, or NULL if not found π«Ά. That's the whole return story β no extra lore, no secret refcount glow-up π.
π SEE ALSO π
- Kernel file
./security/apparmor/include/lib.h aa_strneq(9)aa_dfa_null_transition(9)basename(9)__policy_find(9)
xoxo, signing off β source/version ./security/apparmor/include, dated October 2026, from the Kernel API Manual, page __policy_strn_find(9) ππ
π¦ 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