Add PIE compilation flags
[platform/upstream/keyutils.git] / keyctl_clear.3
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_CLEAR 3 "4 May 2006" Linux "Linux Key Management Calls"
11 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
12 .SH NAME
13 keyctl_clear \- Clear a keyring
14 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
15 .SH SYNOPSIS
16 .nf
17 .B #include <keyutils.h>
18 .sp
19 .BI "long keyctl_clear(key_serial_t " keyring ");"
20 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
21 .SH DESCRIPTION
22 .BR keyctl_clear ()
23 clears the contents of a
24 .IR keyring .
25 .P
26 The caller must have
27 .B write
28 permission on a keyring to be able clear it.
29 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
30 .SH RETURN VALUE
31 On success
32 .BR keyctl_clear ()
33 returns
34 .BR 0 .
35 On error, the value
36 .B -1
37 will be returned and errno will have been set to an appropriate error.
38 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
39 .SH ERRORS
40 .TP
41 .B ENOKEY
42 The keyring specified is invalid.
43 .TP
44 .B EKEYEXPIRED
45 The keyring specified has expired.
46 .TP
47 .B EKEYREVOKED
48 The keyring specified had been revoked.
49 .TP
50 .B EACCES
51 The keyring exists, but is not
52 .B writable
53 by the calling process.
54 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
55 .SH LINKING
56 This is a library function that can be found in
57 .IR libkeyutils .
58 When linking,
59 .B -lkeyutils
60 should be specified to the linker.
61 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
62 .SH SEE ALSO
63 .BR keyctl (1),
64 .br
65 .BR add_key (2),
66 .br
67 .BR keyctl (2),
68 .br
69 .BR request_key (2),
70 .br
71 .BR keyctl (3),
72 .br
73 .BR request-key (8)