__policy_strn_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 🌈


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