aa_setprocattr_changehat(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aa_setprocattr_changehat(9) β€” Kernel API Manual πŸ’…

okay so bestie, this is the Kernel API Manual page for aa_setprocattr_changehat β€” the one that handles the procattr interface to change_hat. iconic little kernel moment, honestly πŸŽ€


✨ NAME ✨

aa_setprocattr_changehat β€” handle procattr interface to change_hat πŸ¦‹


🌸 SYNOPSIS 🌸

int aa_setprocattr_changehat (char *args , size_t size , int flags );

πŸŽ€ ARGUMENTS πŸŽ€

  • args β€” the args received from writing to /proc/<pid>/attr/current. and listen: this one is NOT NULL, okay? no cap πŸ™ˆ
  • size β€” the size of the args.
  • flags β€” the set of flags governing behavior. yes ma’am, behavior gets governed πŸ’…

⭐ RETURN ⭐

Returns 0 or an error code if change_hat fails.

so yeah: success gives you 0, and if change_hat fails you get an error code. that’s the whole vibe check 😭✨


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./security/apparmor/procattr.c β€” plus aa_getprocattr(9) and split_token_from_name(9). go peep those, iykyk πŸ‘‘


made with πŸ’– from ./security/apparmor, dated October 2026. periodt 🫢🌈

πŸ“¦ where this page comes from