tomoyo_permstr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tomoyo_permstr β€” a kernel API manual, but make it make sense

okay so bestie, welcome to tomoyo_permstr, straight out of section 9 of the Kernel API Manual (yes, the kernel API manual, we're fancy now πŸ‘‘). It's a tiny little function with one very specific job and honestly? She ate. Let's get into it ✨


🌸 NAME 🌸

tomoyo_permstr β€” the girl who finds permission keywords. That's it. That's the whole job description πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

bool tomoyo_permstr(const char *string, const char *keyword);

look at her. two const char * args, returns a bool. clean. minimal. main character energy fr fr πŸŽ€


πŸ’– ARGUMENTS πŸ’–

  • string β€” the string representation for permissions, and it's gotta be in foo/bar/buz format. like, that exact shape. bestie do not free-style the format, I'm begging πŸ™ˆ
  • keyword β€” the keyword you're trying to find from string. as in, you go looking inside string for this. iykyk πŸ”

✨ DESCRIPTION ✨

So here's the vibe check: she returns true if keyword was found in string, and false otherwise. simple. elegant. no cap πŸ’―

Now for the one slightly unhinged assumption, and I need you to hear me on this one: the function assumes that

strncmp(w1, w2, strlen(w1)) != 0

whenever w1 != w2. like, it just takes that as a given. that's the whole foundation she's built on, okay? so if you roll up with two different words where one is a prefix of the other and they compare equal over strlen(w1) bytes… yeah that's not her problem, that's your problem 😭 don't say I didn't warn you 🫢


🌈 SEE ALSO 🌈

okay this is the part where she tags literally everyone in the group chat πŸ’€ all of these live in the kernel file ./security/tomoyo/util.c:

like I said. everyone. the whole squad πŸ§šβ€β™€οΈ


and that's the tea, bestie πŸ“ this lil page came from ./security/tomoyo and it's dated October 2026, and yes it's still filed under tomoyo_permstr(9) β€” slay, periodt πŸ’œ

πŸ“¦ where this page comes from