diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-10-19 16:22:44 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-12-27 09:36:12 +0100 |
| commit | 9f79744c9af3a1d7bb5be3593c1032351c04acd7 (patch) | |
| tree | 075436121a27834223381066e14cccd1bcac9bc8 | |
| parent | 8baa481508878c488ad45eb00ae2b8b5d4f8d50e (diff) | |
| download | man-pages-9f79744c9af3a1d7bb5be3593c1032351c04acd7.tar.gz | |
keyctl.2: Improve KEYCTL_INSTANTIATE details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/keyctl.2 | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/man2/keyctl.2 b/man2/keyctl.2 index 5397b8cfd9..a6497a9ddc 100644 --- a/man2/keyctl.2 +++ b/man2/keyctl.2 @@ -741,23 +741,39 @@ via the function .BR keyctl_read (3). .TP .BR KEYCTL_INSTANTIATE " (since Linux 2.6.11)" -Instantiate a partially constructed key whose ID is provided in the +Instantiate a partially constructed key with a specified payload. + +The ID of the key to be instantiated is provided in .I arg2 -argument (cast to -.IR key_serial_t ) -with a payload pointed by the +(cast to +.IR key_serial_t ). + +The key payload is specified in the buffer pointed to by .I arg3 -argument (cast to -.IR "char\ *") -of size provided in the +(cast to +.IR "void\ *"); +the size of that buffer is specified in .I arg4 -argument (cast to +(cast to .IR size_t ). -The instantiated key will be linked to the keyring ID which is provided in the + +The payload may be a NULL pointer and the buffer size may be 0 +if this is supported by the key type. +The operation may be fail if the payload data is in the wrong format +or is otherwise invalid. + +If .I arg5 -argument (cast to -.IR key_serial_t ). -The caller must have the appropriate instantiation permit set (auth key). +(cast to +.IR key_serial_t ) +is nonzero, then, subject to the same constraints and rules as +.BR KEYCTL_LINK , +the instantiated key is linked into the keyring whose ID specified in +.IR arg5 . + +The caller must have the appropriate authorization key; +see +.BR request_key (2). This operation is exposed by .I libkeyutils |
