unix: add bindings for keyutils syscalls
This CL adds support for the ADD_KEY, REQUESET_KEY, and KEYCTL syscalls.
These syscalls allow access to the kernel keyring facilities. In C code,
these syscalls are wrapped by the libkeyutils package. See:
http://man7.org/linux/man-pages/man7/keyutils.7.html
The ADD_KEY and REQUEST_KEY calls are fairly straightforward, but the
KEYCTL syscall is a multiplexor for a number of key management
functions. See:
http://man7.org/linux/man-pages/man3/keyctl.3.html
The Go bindings for the KEYCTL functions attempt to replicate what
libkeyutils does. This is done via generated helper functions.
Change-Id: If8c97d4ef5bce14c43dee3e6772ded42dc3c595a
Reviewed-on: https://go-review.googlesource.com/41415
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/unix/ztypes_linux_ppc64le.go b/unix/ztypes_linux_ppc64le.go
index 10947c3..1309399 100644
--- a/unix/ztypes_linux_ppc64le.go
+++ b/unix/ztypes_linux_ppc64le.go
@@ -170,6 +170,12 @@
Size uint32
}
+type KeyctlDHParams struct {
+ Private int32
+ Prime int32
+ Base int32
+}
+
const (
FADV_NORMAL = 0x0
FADV_RANDOM = 0x1