PR_CAP_AMBIENT(2const)

πŸ’– PR_CAP_AMBIENT πŸ’–

okay bestie, so this one lives in section 2const of the manual pages β€” it's a PR_CAP_AMBIENT thing, and it's all about the ambient capability set of the calling thread. Yep. Reading it, changing it, the whole vibe. ✨


πŸ“– NAME

PR_CAP_AMBIENT β€” read or change the ambient capability set of the calling thread 🫢

πŸ“š LIBRARY

Standard C library (libc, -lc) πŸ’…

✨ SYNOPSIS

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

int prctl(PR_CAP_AMBIENT, long op, ...);

like yes it's a prctl() call, she's fancy, she takes an op and then a lil ... because she's mysterious 🌸


πŸ¦‹ DESCRIPTION

So this reads or changes the ambient capability set of the calling thread, and which one it does depends entirely on the value of op. And op has to be one of these, no exceptions, no substitutions:

  • PR_CAP_AMBIENT_RAISE πŸŽ€
  • PR_CAP_AMBIENT_LOWER πŸŽ€
  • PR_CAP_AMBIENT_IS_SET πŸŽ€
  • PR_CAP_AMBIENT_CLEAR_ALL πŸŽ€

that's the whole list, bestie, that's the menu 🌈


πŸ‘‘ RETURN VALUE

On success, a nonnegative value comes back. Iconic. On error, you get -1, and errno gets set to tell you what went wrong 😭


πŸ’€ ERRORS

  • EINVAL β€” op is not a valid value. like girl, that's not one of the four, try again πŸ™ˆ

🌟 VERSIONS

If you want the glow-up version of all this, there's higher-level interfaces layered on top of the operations above, and they live in the libcap(3) library, shaped like:

obsessed, honestly πŸ’œ


⭐ STANDARDS

Linux. that's it, that's the standard 🐧


πŸ•°οΈ HISTORY

Linux 4.3. she's been around a minute πŸ’–


πŸ”₯ SEE ALSO


and that's the whole page bestie, go read those capabilities, slay πŸ’…βœ¨

okay mwah, this was Linux man-pages 6.20, dated 2026-02-08 β€” love her, no cap πŸ«ΆπŸ’–

πŸ“¦ 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