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,
0is returned. π iconic. - On error,
-1is returned, anderrnois set to indicate the error. π and bestie, always check yourerrno, 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
- 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