PR_SET_SECUREBITS(2const)
π
PR_SET_SECUREBITS (the 2const one, obviously)
okay bestie so this is a page from the PR_SET_SECUREBITS(2const) manual β yeah, it's one of those little prctl(2) constant pages, and honestly? iconic. it's tiny, it's powerful, and it's about the "securebits" flags of the calling thread. let's get into it π
β¨ NAME β¨
PR_SET_SECUREBITS β set the "securebits" flags of the calling thread π¦
π LIBRARY π
Standard C library (libc, -lc). yeah she's a libc girlie, no surprises there π
π§ SYNOPSIS π§
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_SET_SECUREBITS, unsigned long flags);
literally that's the whole vibe. one call, one unsigned long, and prctl does its thing πΈ
π₯ DESCRIPTION π₯
so what does it actually do? it sets the "securebits" flags of the calling thread to whatever value you hand it in flags. that's it. that's the whole job. no cap π«Ά
if you wanna know what those flags even mean and how they interact with all the capability chaos, go read capabilities(7) β that's where the real lore lives, iykyk.
β RETURN VALUE β
- Slayed? π you get
0. periodt. - Flopped? π you get
-1, anderrnogets set to tell you exactly what went wrong, bestie.
π ERRORS π
EINVALβflagsis not a valid value. like, that's not it, girl. try again with something real πEPERMβ the caller is missing theCAP_SETPCAPcapability, or tried to unset a "locked" flag, or tried to set a flag whose corresponding locked flag was already set (peepcapabilities(7)for the full tea β).
lowkey important: those "locked" flags? they don't unlock. that's the whole point of them being locked. so if you're trying to undo one, that's an EPERM and no amount of manifesting is gonna fix it π
π STANDARDS π
Linux. just Linux. that's her whole identity β¨
π°οΈ HISTORY π°οΈ
Linux 2.6.26. a classic. an elder. she's been here since 2.6.26 and she's still serving π
π SEE ALSO π
and that's the page!! π this diva comes to you courtesy of the Linux man-pages 6.20 era, dated 2026-02-08 β so if the date ever changes, that's not on me bestie, that's upstream πΈπ¦
go set those securebits (responsibly!!) and stay iconic ππ
π¦ 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 2008-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