Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/man/man3/keyctl_describe.3 @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 .\" | |
2 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. | |
3 .\" Written by David Howells (dhowells@redhat.com) | |
4 .\" | |
5 .\" This program is free software; you can redistribute it and/or | |
6 .\" modify it under the terms of the GNU General Public License | |
7 .\" as published by the Free Software Foundation; either version | |
8 .\" 2 of the License, or (at your option) any later version. | |
9 .\" | |
10 .TH KEYCTL_DESCRIBE 3 "4 May 2006" Linux "Linux Key Management Calls" | |
11 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
12 .SH NAME | |
13 keyctl_describe \- describe a key | |
14 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
15 .SH SYNOPSIS | |
16 .nf | |
17 .B #include <keyutils.h> | |
18 .sp | |
19 .BI "long keyctl_describe(key_serial_t " key ", char *" buffer , | |
20 .BI "size_t" buflen ");" | |
21 .sp | |
22 .BI "long keyctl_describe_alloc(key_serial_t " key ", char **" _buffer ");" | |
23 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
24 .SH DESCRIPTION | |
25 .BR keyctl_describe () | |
26 describes the attributes of a key as a NUL-terminated string. | |
27 .P | |
28 The caller must have | |
29 .B view | |
30 permission on a key to be able to get a description of it. | |
31 .P | |
32 .I buffer | |
33 and | |
34 .I buflen | |
35 specify the buffer into which the key description will be placed. If the | |
36 buffer is too small, the full size of the description will be returned, and no | |
37 copy will take place. | |
38 .P | |
39 .BR keyctl_describe_alloc () | |
40 is similar to | |
41 .BR keyctl_describe () | |
42 except that it allocates a buffer big enough to hold the description and | |
43 places the description in it. If successful, A pointer to the buffer is | |
44 placed in | |
45 .IR *_buffer . | |
46 The caller must free the buffer. | |
47 .P | |
48 The description will be a string of format: | |
49 .IP | |
50 .B "\*(lq%s;%d;%d;%08x;%s\*(rq" | |
51 .P | |
52 where the arguments are: key type name, key UID, key GID, key permissions mask | |
53 and key description. | |
54 .P | |
55 .B NOTE! | |
56 The key description will not contain any semicolons, so that should be | |
57 separated out by working backwards from the end of the string. This permits | |
58 extra information to be inserted before it by later versions of the kernel | |
59 simply by inserting more semicolon-terminated substrings. | |
60 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
61 .SH RETURN VALUE | |
62 On success | |
63 .BR keyctl_describe () | |
64 returns the amount of data placed into the buffer. If the buffer was too | |
65 small, then the size of buffer required will be returned, but no data will be | |
66 transferred. On error, the value | |
67 .B -1 | |
68 will be returned and | |
69 .I errno | |
70 will have been set to an appropriate error. | |
71 .P | |
72 On success | |
73 .BR keyctl_describe_alloc () | |
74 returns the amount of data in the buffer, less the NUL terminator. On error, the value | |
75 .B -1 | |
76 will be returned and | |
77 .I errno | |
78 will have been set to an appropriate error. | |
79 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
80 .SH ERRORS | |
81 .TP | |
82 .B ENOKEY | |
83 The key specified is invalid. | |
84 .TP | |
85 .B EKEYEXPIRED | |
86 The key specified has expired. | |
87 .TP | |
88 .B EKEYREVOKED | |
89 The key specified had been revoked. | |
90 .TP | |
91 .B EACCES | |
92 The key exists, but is not | |
93 .B viewable | |
94 by the calling process. | |
95 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
96 .SH LINKING | |
97 This is a library function that can be found in | |
98 .IR libkeyutils . | |
99 When linking, | |
100 .B \-lkeyutils | |
101 should be specified to the linker. | |
102 .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
103 .SH SEE ALSO | |
104 .ad l | |
105 .nh | |
106 .BR keyctl (1), | |
107 .BR add_key (2), | |
108 .BR keyctl (2), | |
109 .BR request_key (2), | |
110 .BR keyctl (3), | |
111 .BR keyrings (7), | |
112 .BR keyutils (7) |