mirror of https://github.com/mkerrisk/man-pages
keyctl.2: Wording fixes for KEY_DESCRIBE
Avoid ambiguity w.r.t. "description". Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
303ec07a21
commit
1f6c40f005
|
@ -494,17 +494,16 @@ via the function
|
|||
.BR keyctl_setperm (3).
|
||||
.TP
|
||||
.BR KEYCTL_DESCRIBE " (since Linux 2.6.11)"
|
||||
Obtain the description of a key.
|
||||
Obtain a string describing the attributes of a specified key.
|
||||
|
||||
The ID of the key to be described is specified in
|
||||
.I arg2
|
||||
(cast to
|
||||
.IR key_serial_t ).
|
||||
The description is returned in the buffer pointed to by
|
||||
The descriptive string is returned in the buffer pointed to by
|
||||
.I arg3
|
||||
(cast to
|
||||
.IR "char\ *" ),
|
||||
and
|
||||
.IR "char\ *" );
|
||||
.I arg4
|
||||
(cast to
|
||||
.IR size_t )
|
||||
|
@ -514,10 +513,11 @@ The key must grant the caller
|
|||
.I view
|
||||
permission.
|
||||
|
||||
The returned description contains the following information about the key:
|
||||
The returned string is null-terminated and
|
||||
contains the following information about the key:
|
||||
|
||||
.in +4n
|
||||
.IR type ; uid ; gid ; perm ; description "<NUL>"
|
||||
.IR type ; uid ; gid ; perm ; description
|
||||
.in
|
||||
|
||||
In the above,
|
||||
|
@ -531,11 +531,11 @@ and
|
|||
are decimal strings, and
|
||||
.I perm
|
||||
is a hexadecimal permissions mask.
|
||||
The description is written with the following format string:
|
||||
The descriptive string is written with the following format:
|
||||
|
||||
%s;%d;%d;%08x;%s
|
||||
|
||||
.BR "Note: the intention is that the key description string should"
|
||||
.BR "Note: the intention is that the descriptive string should"
|
||||
.BR "be extensible in future kernel versions".
|
||||
In particular, the
|
||||
.IR description
|
||||
|
@ -543,12 +543,12 @@ field will not contain semicolons;
|
|||
it should be parsed by working backwards from the end of the string
|
||||
to find the last semicolon.
|
||||
This allows future semicolon-delimited fields to be inserted
|
||||
in the key description in the future.
|
||||
in the descriptive string in the future.
|
||||
|
||||
Writing to the buffer is attempted only when
|
||||
.IR arg3
|
||||
is non-NULL and the specified buffer size
|
||||
is large enough to accept the description
|
||||
is large enough to accept the descriptive string
|
||||
(including the terminating null byte).
|
||||
'\" Function commentary says it copies up to buflen bytes, but see the
|
||||
'\" (buffer && buflen >= ret) condition in keyctl_describe_key() in
|
||||
|
|
Loading…
Reference in New Issue