comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/man/man3/keyctl_capabilities.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) 2019 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_CAPABILITIES 3 "30 May 2019" Linux "Linux Key Management Calls"
11 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
12 .SH NAME
13 keyctl_capabilities \- Query subsystem capabilities
14 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
15 .SH SYNOPSIS
16 .nf
17 .B #include <keyutils.h>
18 .sp
19 .BI "long keyctl_capabilities(unsigned char *" buffer ", size_t " buflen ");"
20 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
21 .SH DESCRIPTION
22 .BR keyctl_capabilities ()
23 queries the keyrings subsystem in the kernel to ask about its capabilities and
24 fills in the array in the buffer with bits that indicate the presence or
25 absence of specific features in the keyrings subsystem.
26 .P
27 The function returns the amount of data the kernel has available, irrespective
28 of the amount of buffer space available. If the buffer is shorter than the
29 data, a short copy will be made; if the buffer is larger than the data, the
30 excess space will be cleared.
31 .P
32 If this operation is not available in the kernel, the keyutils library will be
33 emulate it as best it can and the capability bit that indicates if the kernel
34 operation is available will be cleared.
35 .P
36 In
37 .IR buffer[0] ,
38 the following capabilities exist:
39 .TP
40 .B KEYCTL_CAPS0_CAPABILITIES
41 This is set if the kernel supports this operation and cleared otherwise. If
42 it is cleared, the rest of the flags are emulated.
43 .TP
44 .B KEYCTL_CAPS0_PERSISTENT_KEYRINGS
45 This is set if the kernel supports persistent keyrings and cleared otherwise.
46 See
47 .BR keyctl_get_persistent ( 3 ).
48 .TP
49 .B KEYCTL_CAPS0_DIFFIE_HELLMAN
50 This is set if the kernel supports Diffie-Hellman calculation and cleared
51 otherwise. See
52 .BR keyctl_dh_compute ( 3 ).
53 .TP
54 .B KEYCTL_CAPS0_PUBLIC_KEY
55 This is set if the kernel supports public-key operations and cleared
56 otherwise. See
57 .BR keyctl_pkey_query ( 3 ).
58 .TP
59 .B KEYCTL_CAPS0_BIG_KEY
60 This is set if the kernel supports the big_key key type and cleared otherwise.
61 .TP
62 .B KEYCTL_CAPS0_INVALIDATE
63 This is set if the kernel supports key invalidation and cleared otherwise.
64 See
65 .BR keyctl_invalidate ( 3 ).
66 .TP
67 .B KEYCTL_CAPS0_RESTRICT_KEYRING
68 This is set if the kernel supports restrictions on keyrings and cleared
69 otherwise. See
70 .BR keyctl_restrict_keyring ( 3 ).
71 .TP
72 .B KEYCTL_CAPS0_MOVE
73 This is set if the kernel supports the move key operation and cleared
74 otherwise. See
75 .BR keyctl_move ( 3 ).
76 .P
77 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
78 .SH RETURN VALUE
79 On success
80 .BR keyctl_capabilities ()
81 returns the size of the data it has available, irrespective of the size of the
82 buffer. On error, the value
83 .B -1
84 will be returned and
85 .I errno
86 will have been set to an appropriate error.
87 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
88 .SH ERRORS
89 .TP
90 .B EFAULT
91 The buffer cannot be written to.
92 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
93 .SH LINKING
94 This is a library function that can be found in
95 .IR libkeyutils .
96 When linking,
97 .B \-lkeyutils
98 should be specified to the linker.
99 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
100 .SH SEE ALSO
101 .ad l
102 .nh
103 .BR keyctl (1),
104 .BR add_key (2),
105 .BR keyctl (2),
106 .BR request_key (2),
107 .BR keyctl (3),
108 .BR keyrings (7),
109 .BR keyutils (7)