PR_CAP_AMBIENT_CLEAR_ALL(2const)

✨ PR_CAP_AMBIENT_CLEAR_ALL ✨

okay bestie, so this is a page from section 2const of the Linux manual β€” like, the super specific corner of the man pages where the constants live. We're talking about PR_CAP_AMBIENT_CLEAR_ALL πŸ’… and it does exactly one thing, but it does it flawlessly.


🫢 NAME

PR_CAP_AMBIENT_CLEAR_ALL β€” clear the ambient capability set of the calling thread 🧹✨

like. all of it. gone. poof.


πŸ“š LIBRARY

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


🌸 SYNOPSIS

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

int prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0L, 0L, 0L);

the way that it's literally just prctl with the right constants and a whole lotta zeros… no cap. πŸ”₯


πŸ’– DESCRIPTION

All capabilities will be removed from the ambient capability set. 🫧

that's it. that's the whole vibe. every single capability in the ambient set of the calling thread β€” removed. not one left. the ambient capability set is giving empty. it's giving nothing, and that's the point. πŸ’€


⭐ RETURN VALUE

  • On success, 0 is returned. πŸŽ‰ iconic.
  • On error, -1 is returned, and errno is set to indicate the error. 😭 and bestie, always check your errno, fr fr.

🌈 VERSIONS

See PR_CAP_AMBIENT(2const). like, go read the main character page, this one's just her supporting cast. πŸ‘‘


πŸ‘‘ STANDARDS

Linux. 🐧 that's the whole list. she's a Linux girlie.


πŸ¦‹ HISTORY

Linux 4.3. πŸ•°οΈ so she's been around a minute β€” vintage, but in a cute way.


πŸ‘€ SEE ALSO


πŸ’Œ heads up bestie: this is destructive in the sense that everything in the ambient capability set gets wiped β€” nothing is preserved, nothing is spared. if you wanted to keep anything, you absolutely did not want this call. πŸ™ˆ

and that's the whole page, babe β€” courtesy of Linux man-pages 6.20, dated 2026-02-08. mwah πŸ’‹ slay, stay cap-free πŸŽ€βœ¨

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