~ubuntu-branches/ubuntu/saucy/manpages/saucy

« back to all changes in this revision

Viewing changes to man2/add_key.2

  • Committer: Bazaar Package Importer
  • Author(s): Loïc Minier
  • Date: 2010-11-11 16:51:09 UTC
  • mfrom: (1.1.44 upstream) (2.2.7 sid)
  • Revision ID: james.westby@ubuntu.com-20101111165109-3yiyen1axa1ju3s0
Tags: 3.26-1ubuntu1
* Merge from Debian unstable; remaining changes:
  - ptrace.2, prctl.2: document Ubuntu-specific PTRACE_ATTACH,
    PR_SET_PTRACER behavior.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
.\" 2 of the License, or (at your option) any later version.
9
9
.\"
10
10
.TH ADD_KEY 2 2010-02-25 Linux "Linux Key Management Calls"
11
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
12
11
.SH NAME
13
12
add_key \- Add a key to the kernel's key management facility
14
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
15
13
.SH SYNOPSIS
16
14
.nf
17
15
.B #include <keyutils.h>
18
16
.sp
19
17
.BI "key_serial_t add_key(const char *" type ", const char *" description ,
20
18
.BI "const void *" payload ", size_t " plen ", key_serial_t " keyring ");"
21
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
22
19
.SH DESCRIPTION
23
20
.BR add_key ()
24
21
asks the kernel to create or update a key of the given
63
60
.TP
64
61
.B KEY_SPEC_USER_SESSION_KEYRING
65
62
This specifies the caller's UID-session keyring.
66
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
67
63
.SH KEY TYPES
68
64
There are a number of key types available in the core key management code, and
69
65
these can be specified to this function:
89
85
should be specified, and
90
86
.I plen
91
87
should be zero.
92
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
93
88
.SH RETURN VALUE
94
89
On success
95
90
.BR add_key ()
97
92
On error, the value
98
93
.B -1
99
94
will be returned and errno will have been set to an appropriate error.
100
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
101
95
.SH ERRORS
102
96
.TP
103
97
.B ENOKEY
121
115
.TP
122
116
.B EACCES
123
117
The keyring wasn't available for modification by the user.
124
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
125
118
.SH LINKING
126
119
Although this is a Linux system call, it is not present in
127
120
.I libc
130
123
When linking,
131
124
.B -lkeyutils
132
125
should be specified to the linker.
133
 
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
134
126
.SH SEE ALSO
135
127
.BR keyctl (1),
136
128
.BR keyctl (2),
137
129
.BR request_key (2)
138
130
.SH COLOPHON
139
 
This page is part of release 3.25 of the Linux
 
131
This page is part of release 3.26 of the Linux
140
132
.I man-pages
141
133
project.
142
134
A description of the project,