CAPNG_GET_ROOTID(3)
π CAPNG_GET_ROOTID(3) π
okay bestie, welcome to the libcap-ng API corner of the man pages, where we're talking about capng_get_rootid(3) and honestly? it's giving "short but important". pull up a chair π«Ά
β¨ NAME β¨
capng_get_rootid β get namespace root id π±
πΈ SYNOPSIS πΈ
#include <cap-ng.h>
uid_t capng_get_rootid(void);
no arguments, no drama, it just hands you a uid_t. we love a low-maintenance function π
π¦ DESCRIPTION π¦
so like, capng_get_rootid gets you the rootid that's used for file capabilities operations. that's the whole vibe.
the value it gives back is a host-endian user ID, and it lives in the caller's user namespace. host-endian!! user namespace!! iykyk, don't get it twisted π₯
π RETURN VALUE π
here's the tea, and it's a two-branch situation:
- if V3 file capabilities have not been selected, or the kernel just doesn't support them, you get
CAPNG_UNSET_ROOTIDback. not a slay, but it's honest π - otherwise? you get the namespace root user ID. periodt β¨
π SEE ALSO π
go read those too, bestie, they're the supporting cast π
π AUTHOR π
Steve Grubb β the icon who wrote this, no cap π
and that's the whole page, my love!! this beauty ships as part of the libcap-ng API, brought to you by Red Hat, dated Sept 2020, and it goes by CAPNG_GET_ROOTID(3) when it's out in the wild. mwah, go forth and get those namespace root ids πβ¨π¦
π¦ where this page comes from
- arch rolling: libcap-ng 0.9.6-1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 43: libcap-ng-devel 0.9.6-1.fc43 Β· LGPL-2.0-or-later
- fedora 43: libcap-ng-devel 0.9.6-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: libcap-ng-devel 0.9.6-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: libcap-ng-devel 0.9.6-1.fc44 Β· LGPL-2.0-or-later
- nixpkgs unstable: libcap-ng 0.9.6
- ubuntu stonking: libcap-ng-dev 0.9.6-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms