aa_task_setrlimit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ aa_task_setrlimit(9) ✨

okay bestie so this one is from the Kernel API Manual (section 9, kernel-functions vibes) and it's literally the AppArmor girlie whose whole job is checking whether a task is allowed to set an rlimit πŸ’…


🌸 NAME 🌸

aa_task_setrlimit β€” test permission to set an rlimit

like, it's the vibe check before the limit gets set, iykyk πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int aa_task_setrlimit (const struct cred *subj_cred , struct aa_label
*label , struct task_struct *task , unsigned int resource , struct
rlimit *new_rlim );

that's the whole signature, no cap β€” copy it exactly, don't be out here renaming things πŸ™ˆ


πŸ’– ARGUMENTS πŸ’–

so there's five of them and each one is doing its own little main character thing:

  • subj_cred β€” the cred that's setting the limit, aka who's doing it πŸ‘‘
  • label β€” the label confining the task. it's (NOT NULL) so like… do not pass null, fr fr
  • task β€” the task the resource is being set on, the actual target
  • resource β€” the resource being set, which one we're talking about
  • new_rlim β€” the new resource limit. also (NOT NULL) bestie, don't test me 😭

🌈 DESCRIPTION 🌈

control raising the process's hard limit ✨

that's the whole bit β€” it's the gatekeeper for bumping that hard limit up. very "you shall not pass" but make it kernel 🫢


⭐ RETURN ⭐

0 β€” slayed, all good πŸ’…

or an error code if setting the resource failed 😭 (so like, check it, don't just assume)


πŸ”₯ SEE ALSO πŸ”₯

go read those if you want the full lore 🧚


ngl this is AppArmor territory β€” ./security/apparmor β€” so if you're poking around in there, you're in the right neighborhood 🏑

and that's the page bestie!! πŸ’œ source is ./security/apparmor, dated October 2026 β€” iconic, obsessed, periodt πŸ“βœ¨

πŸ“¦ where this page comes from