comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/man/man3/keyctl_unlink.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_LINK 3 "4 May 2006" Linux "Linux Key Management Calls"
11 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
12 .SH NAME
13 keyctl_link, keyctl_unlink \- link/unlink a key to/from a keyring
14 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
15 .SH SYNOPSIS
16 .nf
17 .B #include <keyutils.h>
18 .sp
19 .BI "long keyctl_link(key_serial_t " key ", key_serial_t " keyring ");"
20 .sp
21 .BI "long keyctl_unlink(key_serial_t " key ", key_serial_t " keyring ");"
22 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
23 .SH DESCRIPTION
24 .BR keyctl_link ()
25 creates a link from
26 .I keyring
27 to
28 .IR key ,
29 displacing any link to another key of the same type and description in that
30 keyring if one exists.
31 .P
32 .BR keyctl_unlink ()
33 removes the link from
34 .I keyring
35 to
36 .I key
37 if it exists.
38 .P
39 The caller must have
40 .B write
41 permission on a keyring to be able create or remove links in it.
42 .P
43 The caller must have
44 .B link
45 permission on a key to be able to create a link to it.
46 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
47 .SH RETURN VALUE
48 On success
49 .BR keyctl_link ()
50 and
51 .BR keyctl_unlink ()
52 return
53 .BR 0 .
54 On error, the value
55 .B -1
56 will be returned and
57 .I errno
58 will have been set to an appropriate error.
59 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
60 .SH ERRORS
61 .TP
62 .B ENOKEY
63 The key or the keyring specified are invalid.
64 .TP
65 .B EKEYEXPIRED
66 The key or the keyring specified have expired.
67 .TP
68 .B EKEYREVOKED
69 The key or the keyring specified have been revoked.
70 .TP
71 .B EACCES
72 The keyring exists, but is not
73 .B writable
74 by the calling process.
75 .P
76 For
77 .BR keyctl_link ()
78 only:
79 .TP
80 .B ENOMEM
81 Insufficient memory to expand the keyring
82 .TP
83 .B EDQUOT
84 Expanding the keyring would exceed the keyring owner's quota.
85 .TP
86 .B EACCES
87 The key exists, but is not
88 .B linkable
89 by the calling process.
90 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
91 .SH LINKING
92 This is a library function that can be found in
93 .IR libkeyutils .
94 When linking,
95 .B \-lkeyutils
96 should be specified to the linker.
97 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
98 .SH SEE ALSO
99 .ad l
100 .nh
101 .BR keyctl (1),
102 .BR add_key (2),
103 .BR keyctl (2),
104 .BR request_key (2),
105 .BR keyctl (3),
106 .BR keyrings (7),
107 .BR keyutils (7)
108