.TH "CAPNG_SET_ROOTID" "3" "March 2026" "Red Hat" "Libcap-ng API" .SH NAME capng_set_rootid \- set namespace root id .SH "SYNOPSIS" .B #include .sp int capng_set_rootid(uid_t rootid); .SH "DESCRIPTION" capng_set_rootid sets the root user ID for file capabilities operations. The value is host-endian and relative to the caller's user namespace. Pass CAPNG_UNSET_ROOTID to clear a previously selected namespace root ID and go back to writing regular V2 file capabilities. Other values select V3 file capabilities; the kernel validates and maps the user ID when the capabilities are written. .SH "RETURN VALUE" On success, it returns 0. It returns -1 if there is an internal error or the kernel headers used to build the library do not support V3 file capabilities. .SH "SEE ALSO" .BR capng_apply_caps_fd (3), .BR capabilities (7) .SH AUTHOR Steve Grubb