capng_set_rootid - Man Page
set namespace root id
Synopsis
#include <cap-ng.h>
int capng_set_rootid(int rootid);
Description
capng_set_rootid sets the rootid for file capabilities operations. Pass CAPNG_UNSET_ROOTID to clear a previously selected namespace root id and go back to writing regular V2 file capabilities.
Return Value
On success, it returns 0. It returns -1 if there is an internal error, the kernel does not support V3 filesystem capabilities, or an invalid rootid is supplied.
See Also
Author
Steve Grubb
Info
March 2026 Red Hat Libcap-ng API