diff options
Diffstat (limited to 'cap/names.go')
-rw-r--r-- | cap/names.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cap/names.go b/cap/names.go index 066fd70..d466719 100644 --- a/cap/names.go +++ b/cap/names.go @@ -2,13 +2,23 @@ package cap /* ** DO NOT EDIT THIS FILE. IT WAS AUTO-GENERATED BY LIBCAP'S GO BUILDER (mknames.go) ** */ -// NamedCount holds the number of capabilities with official names. +// NamedCount holds the number of capability values with official +// names at the time this libcap version, this package is part of, was +// released. The "../libcap/cap" package is fully able to manipulate +// higher numbered capability values by numerical value. However, if +// you find cap.NamedCount < cap.MaxBits(), it is probably time to +// upgrade this package on your system. +// +// FWIW the userspace tool '/sbin/capsh' also contains a runtime check +// for the condition that libcap is behind the kernel like this. const NamedCount = 40 // CHOWN etc., are the named capability values of the Linux kernel. The // canonical source for each name is the "uapi/linux/capabilities.h" // file, a snapshot (from kernel.org) is hard-coded into this package. // Some values may not be available (yet) where the kernel is older. +// The actual number of capabities supported by the running kernel can +// be obtained using the cap.MaxBits() function. const ( // CHOWN allows a process to arbitrarily change the user and // group ownership of a file. |