2 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
3 .\" Written by David Howells (dhowells@redhat.com)
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.
10 .TH KEYCTL 2 2010-02-25 Linux "Linux Key Management Calls"
12 keyctl \- Manipulate the kernel's key management facility
15 .B #include <keyutils.h>
17 .BI "long keyctl(int " cmd ", ...);"
20 has a number of functions available:
22 .B KEYCTL_GET_KEYRING_ID
23 Ask for a keyring's ID.
25 .B KEYCTL_JOIN_SESSION_KEYRING
26 Join or start named session keyring.
35 Set ownership of a key.
44 Clear contents of a keyring.
47 Link a key into a keyring.
50 Unlink a key from a keyring.
53 Search for a key in a keyring.
56 Read a key or keyring's contents.
59 Instantiate a partially constructed key.
62 Negate a partially constructed key.
64 .B KEYCTL_SET_REQKEY_KEYRING
65 Set default request-key keyring.
70 .B KEYCTL_ASSUME_AUTHORITY
71 Assume authority to instantiate key.
75 into individual functions to permit compiler the compiler to check types.
78 section at the bottom.
82 returns the serial number of the key it found.
85 will be returned and errno will have been set to an appropriate error.
89 A key operation wasn't permitted.
92 The key quota for the caller's user would be exceeded by creating a key or
93 linking it to the keyring.
96 An expired key was found or specified.
99 A rejected key was found or specified.
102 A revoked key was found or specified.
105 No matching key was found or an invalid key was specified.
107 Although this is a Linux system call, it is not present in
109 but can be found rather in
113 should be specified to the linker.
121 .BR keyctl_get_keyring_ID (3),
123 .BR keyctl_join_session_keyring (3),
125 .BR keyctl_update (3),
127 .BR keyctl_revoke (3),
129 .BR keyctl_chown (3),
131 .BR keyctl_setperm (3),
133 .BR keyctl_describe (3),
135 .BR keyctl_clear (3),
139 .BR keyctl_unlink (3),
141 .BR keyctl_search (3),
145 .BR keyctl_instantiate (3),
147 .BR keyctl_negate (3),
149 .BR keyctl_set_reqkey_keyring (3),
151 .BR keyctl_set_timeout (3),
153 .BR keyctl_assume_authority (3),
155 .BR keyctl_describe_alloc (3),
157 .BR keyctl_read_alloc (3),