PR_CAP_AMBIENT_RAISE(2const)

✨ PR_CAP_AMBIENT_RAISE ✨

okay bestie, so this one lives in the Linux man-pages collection, section 2const (that's the constants gang, not the syscall girlies). It's a sub-page of prctl(2), and it's literally just ONE vibe of PR_CAP_AMBIENT, so if you're confused, that's a you-not-reading-the-parent-page thing. πŸ’…


πŸ’– NAME πŸ’–

PR_CAP_AMBIENT_RAISE β€” add to the ambient capability set of the calling thread 🫢

like. it raises. it ambients. it does exactly what it says on the tin, no cap.

πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc) πŸŽ€

yes queen, just the regular libc, nothing spicy.

🌸 SYNOPSIS 🌸

#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>

int prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, long cap, 0L, 0L);
not me including the header comment verbatim because it's the whole point of that include. iykyk. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea. The capability you stuck in cap gets added to the ambient capability set. That's the move. πŸŽ€

But β€” and this is the part where everyone gets humbled β€” the specified capability must already be present in BOTH the permitted AND the inheritable sets of the process. Both. Not one. Not "close enough." Both, bestie. If either one's missing, this whole operation is a no. 😭

And if the SECBIT_NO_CAP_AMBIENT_RAISE securebit is set? Sweetie, the door is locked. This operation is not permitted. Periodt. πŸ”’

πŸ‘‘ RETURN VALUE πŸ‘‘

  • On success, 0 is returned. slay. ✨
  • On error, -1 is returned, and errno is set to indicate the error. the flop era. πŸ’€

πŸ’€ ERRORS πŸ’€

  • EINVAL β€” cap does not specify a valid capability. like girl, that's not a real capability, what are you doing πŸ™ˆ
  • EPERM β€” either the capability specified in cap is not present in the process's permitted and inheritable capability sets, or the PR_CAP_AMBIENT_LOWER securebit has been set. either way: permission DENIED, bestie, go home. 😭

🧚 VERSIONS 🧚

See PR_CAP_AMBIENT(2const). 🫢 (yes, this one's part of a set, it's giving family reunion)

🌈 STANDARDS 🌈

Linux. that's it. that's the standard. πŸ’…

⭐ HISTORY ⭐

Linux 4.3. so like, ancient in internet years but still iconic. πŸ‘‘

πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, bestie!! πŸŽ€ This absolute banger of a manpage comes to you from Linux man-pages 6.20, dated 2026-02-08 β€” go raise those ambient caps responsibly, drink some water, and remember: permitted AND inheritable. both. always both. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms