aboutsummaryrefslogtreecommitdiffstats
path: root/go
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2020-07-26 11:52:58 -0700
committerAndrew G. Morgan <morgan@kernel.org>2020-07-26 11:52:58 -0700
commit445061acd3e733232240e2b064e7815f241ff90a (patch)
treefd50036c3bfa29f199f0e60e53cc7296f22a183c /go
parent80f7b5383b168912e67aa7d6480bb2bb6a66e880 (diff)
downloadplatform_external_libcap-445061acd3e733232240e2b064e7815f241ff90a.tar.gz
platform_external_libcap-445061acd3e733232240e2b064e7815f241ff90a.tar.bz2
platform_external_libcap-445061acd3e733232240e2b064e7815f241ff90a.zip
Mode cap package documentation updates.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'go')
-rw-r--r--go/mknames.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/go/mknames.go b/go/mknames.go
index b048e10..754d2f8 100644
--- a/go/mknames.go
+++ b/go/mknames.go
@@ -52,13 +52,23 @@ func main() {
/* ** 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 = `, len(list), `
// 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 (
`)
bits := make(map[string]string)