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,
0is returned. slay. β¨ - On error,
-1is returned, anderrnois set to indicate the error. the flop era. π
π ERRORS π
EINVALβcapdoes not specify a valid capability. like girl, that's not a real capability, what are you doing πEPERMβ either the capability specified incapis not present in the process's permitted and inheritable capability sets, or thePR_CAP_AMBIENT_LOWERsecurebit 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
- Copyright 2015, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms