annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/man/man3/keyctl_link.3 @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 .\"
jpayne@68 2 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
jpayne@68 3 .\" Written by David Howells (dhowells@redhat.com)
jpayne@68 4 .\"
jpayne@68 5 .\" This program is free software; you can redistribute it and/or
jpayne@68 6 .\" modify it under the terms of the GNU General Public License
jpayne@68 7 .\" as published by the Free Software Foundation; either version
jpayne@68 8 .\" 2 of the License, or (at your option) any later version.
jpayne@68 9 .\"
jpayne@68 10 .TH KEYCTL_LINK 3 "4 May 2006" Linux "Linux Key Management Calls"
jpayne@68 11 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
jpayne@68 12 .SH NAME
jpayne@68 13 keyctl_link, keyctl_unlink \- link/unlink a key to/from a keyring
jpayne@68 14 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
jpayne@68 15 .SH SYNOPSIS
jpayne@68 16 .nf
jpayne@68 17 .B #include <keyutils.h>
jpayne@68 18 .sp
jpayne@68 19 .BI "long keyctl_link(key_serial_t " key ", key_serial_t " keyring ");"
jpayne@68 20 .sp
jpayne@68 21 .BI "long keyctl_unlink(key_serial_t " key ", key_serial_t " keyring ");"
jpayne@68 22 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
jpayne@68 23 .SH DESCRIPTION
jpayne@68 24 .BR keyctl_link ()
jpayne@68 25 creates a link from
jpayne@68 26 .I keyring
jpayne@68 27 to
jpayne@68 28 .IR key ,
jpayne@68 29 displacing any link to another key of the same type and description in that
jpayne@68 30 keyring if one exists.
jpayne@68 31 .P
jpayne@68 32 .BR keyctl_unlink ()
jpayne@68 33 removes the link from
jpayne@68 34 .I keyring
jpayne@68 35 to
jpayne@68 36 .I key
jpayne@68 37 if it exists.
jpayne@68 38 .P
jpayne@68 39 The caller must have
jpayne@68 40 .B write
jpayne@68 41 permission on a keyring to be able create or remove links in it.
jpayne@68 42 .P
jpayne@68 43 The caller must have
jpayne@68 44 .B link
jpayne@68 45 permission on a key to be able to create a link to it.
jpayne@68 46 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
jpayne@68 47 .SH RETURN VALUE
jpayne@68 48 On success
jpayne@68 49 .BR keyctl_link ()
jpayne@68 50 and
jpayne@68 51 .BR keyctl_unlink ()
jpayne@68 52 return
jpayne@68 53 .BR 0 .
jpayne@68 54 On error, the value
jpayne@68 55 .B -1
jpayne@68 56 will be returned and
jpayne@68 57 .I errno
jpayne@68 58 will have been set to an appropriate error.
jpayne@68 59 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
jpayne@68 60 .SH ERRORS
jpayne@68 61 .TP
jpayne@68 62 .B ENOKEY
jpayne@68 63 The key or the keyring specified are invalid.
jpayne@68 64 .TP
jpayne@68 65 .B EKEYEXPIRED
jpayne@68 66 The key or the keyring specified have expired.
jpayne@68 67 .TP
jpayne@68 68 .B EKEYREVOKED
jpayne@68 69 The key or the keyring specified have been revoked.
jpayne@68 70 .TP
jpayne@68 71 .B EACCES
jpayne@68 72 The keyring exists, but is not
jpayne@68 73 .B writable
jpayne@68 74 by the calling process.
jpayne@68 75 .P
jpayne@68 76 For
jpayne@68 77 .BR keyctl_link ()
jpayne@68 78 only:
jpayne@68 79 .TP
jpayne@68 80 .B ENOMEM
jpayne@68 81 Insufficient memory to expand the keyring
jpayne@68 82 .TP
jpayne@68 83 .B EDQUOT
jpayne@68 84 Expanding the keyring would exceed the keyring owner's quota.
jpayne@68 85 .TP
jpayne@68 86 .B EACCES
jpayne@68 87 The key exists, but is not
jpayne@68 88 .B linkable
jpayne@68 89 by the calling process.
jpayne@68 90 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
jpayne@68 91 .SH LINKING
jpayne@68 92 This is a library function that can be found in
jpayne@68 93 .IR libkeyutils .
jpayne@68 94 When linking,
jpayne@68 95 .B \-lkeyutils
jpayne@68 96 should be specified to the linker.
jpayne@68 97 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
jpayne@68 98 .SH SEE ALSO
jpayne@68 99 .ad l
jpayne@68 100 .nh
jpayne@68 101 .BR keyctl (1),
jpayne@68 102 .BR add_key (2),
jpayne@68 103 .BR keyctl (2),
jpayne@68 104 .BR request_key (2),
jpayne@68 105 .BR keyctl (3),
jpayne@68 106 .BR keyrings (7),
jpayne@68 107 .BR keyutils (7)
jpayne@68 108