blob: a3f94c60692d77b8462c1c6a948b39e5156bf998 [file] [log] [blame]
David Howells76181c12007-10-16 23:29:46 -07001/* Request a key from userspace
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 *
David Howells76181c12007-10-16 23:29:46 -07003 * Copyright (C) 2004-2007 Red Hat, Inc. All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
David Howellsf1a9bad2005-10-07 15:04:52 +010010 *
11 * See Documentation/keys-request-key.txt
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 */
13
14#include <linux/module.h>
15#include <linux/sched.h>
16#include <linux/kmod.h>
17#include <linux/err.h>
David Howells3e301482005-06-23 22:00:56 -070018#include <linux/keyctl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070019#include "internal.h"
20
David Howells76181c12007-10-16 23:29:46 -070021/*
22 * wait_on_bit() sleep function for uninterruptible waiting
23 */
24static int key_wait_bit(void *flags)
25{
26 schedule();
27 return 0;
28}
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
David Howells76181c12007-10-16 23:29:46 -070030/*
31 * wait_on_bit() sleep function for interruptible waiting
32 */
33static int key_wait_bit_intr(void *flags)
34{
35 schedule();
36 return signal_pending(current) ? -ERESTARTSYS : 0;
37}
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
David Howells76181c12007-10-16 23:29:46 -070039/*
40 * call to complete the construction of a key
41 */
42void complete_request_key(struct key_construction *cons, int error)
43{
44 kenter("{%d,%d},%d", cons->key->serial, cons->authkey->serial, error);
45
46 if (error < 0)
47 key_negate_and_link(cons->key, key_negative_timeout, NULL,
48 cons->authkey);
49 else
50 key_revoke(cons->authkey);
51
52 key_put(cons->key);
53 key_put(cons->authkey);
54 kfree(cons);
55}
56EXPORT_SYMBOL(complete_request_key);
57
Linus Torvalds1da177e2005-04-16 15:20:36 -070058/*
59 * request userspace finish the construction of a key
David Howellsb5f545c2006-01-08 01:02:47 -080060 * - execute "/sbin/request-key <op> <key> <uid> <gid> <keyring> <keyring> <keyring>"
Linus Torvalds1da177e2005-04-16 15:20:36 -070061 */
David Howells76181c12007-10-16 23:29:46 -070062static int call_sbin_request_key(struct key_construction *cons,
David Howells4e54f082006-06-29 02:24:28 -070063 const char *op,
64 void *aux)
Linus Torvalds1da177e2005-04-16 15:20:36 -070065{
66 struct task_struct *tsk = current;
Linus Torvalds1da177e2005-04-16 15:20:36 -070067 key_serial_t prkey, sskey;
David Howells76181c12007-10-16 23:29:46 -070068 struct key *key = cons->key, *authkey = cons->authkey, *keyring;
David Howellsb5f545c2006-01-08 01:02:47 -080069 char *argv[9], *envp[3], uid_str[12], gid_str[12];
Linus Torvalds1da177e2005-04-16 15:20:36 -070070 char key_str[12], keyring_str[3][12];
David Howellsb5f545c2006-01-08 01:02:47 -080071 char desc[20];
David Howells3e301482005-06-23 22:00:56 -070072 int ret, i;
73
David Howellsb5f545c2006-01-08 01:02:47 -080074 kenter("{%d},{%d},%s", key->serial, authkey->serial, op);
David Howells3e301482005-06-23 22:00:56 -070075
David Howellsb5f545c2006-01-08 01:02:47 -080076 /* allocate a new session keyring */
77 sprintf(desc, "_req.%u", key->serial);
78
David Howells7e047ef2006-06-26 00:24:50 -070079 keyring = keyring_alloc(desc, current->fsuid, current->fsgid, current,
80 KEY_ALLOC_QUOTA_OVERRUN, NULL);
David Howellsb5f545c2006-01-08 01:02:47 -080081 if (IS_ERR(keyring)) {
82 ret = PTR_ERR(keyring);
83 goto error_alloc;
David Howells3e301482005-06-23 22:00:56 -070084 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070085
David Howellsb5f545c2006-01-08 01:02:47 -080086 /* attach the auth key to the session keyring */
87 ret = __key_link(keyring, authkey);
88 if (ret < 0)
89 goto error_link;
90
Linus Torvalds1da177e2005-04-16 15:20:36 -070091 /* record the UID and GID */
92 sprintf(uid_str, "%d", current->fsuid);
93 sprintf(gid_str, "%d", current->fsgid);
94
95 /* we say which key is under construction */
96 sprintf(key_str, "%d", key->serial);
97
98 /* we specify the process's default keyrings */
99 sprintf(keyring_str[0], "%d",
100 tsk->thread_keyring ? tsk->thread_keyring->serial : 0);
101
102 prkey = 0;
103 if (tsk->signal->process_keyring)
104 prkey = tsk->signal->process_keyring->serial;
105
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 sprintf(keyring_str[1], "%d", prkey);
David Howells3e301482005-06-23 22:00:56 -0700107
108 if (tsk->signal->session_keyring) {
109 rcu_read_lock();
110 sskey = rcu_dereference(tsk->signal->session_keyring)->serial;
111 rcu_read_unlock();
David Howells76181c12007-10-16 23:29:46 -0700112 } else {
David Howells3e301482005-06-23 22:00:56 -0700113 sskey = tsk->user->session_keyring->serial;
114 }
115
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 sprintf(keyring_str[2], "%d", sskey);
117
118 /* set up a minimal environment */
119 i = 0;
120 envp[i++] = "HOME=/";
121 envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
122 envp[i] = NULL;
123
124 /* set up the argument list */
125 i = 0;
126 argv[i++] = "/sbin/request-key";
127 argv[i++] = (char *) op;
128 argv[i++] = key_str;
129 argv[i++] = uid_str;
130 argv[i++] = gid_str;
131 argv[i++] = keyring_str[0];
132 argv[i++] = keyring_str[1];
133 argv[i++] = keyring_str[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700134 argv[i] = NULL;
135
136 /* do it */
Jeremy Fitzhardinge86313c42007-07-17 18:37:03 -0700137 ret = call_usermodehelper_keys(argv[0], argv, envp, keyring,
138 UMH_WAIT_PROC);
David Howells76181c12007-10-16 23:29:46 -0700139 kdebug("usermode -> 0x%x", ret);
140 if (ret >= 0) {
141 /* ret is the exit/wait code */
142 if (test_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags) ||
143 key_validate(key) < 0)
144 ret = -ENOKEY;
145 else
146 /* ignore any errors from userspace if the key was
147 * instantiated */
148 ret = 0;
149 }
David Howells3e301482005-06-23 22:00:56 -0700150
David Howellsb5f545c2006-01-08 01:02:47 -0800151error_link:
152 key_put(keyring);
David Howells3e301482005-06-23 22:00:56 -0700153
David Howellsb5f545c2006-01-08 01:02:47 -0800154error_alloc:
David Howells3e301482005-06-23 22:00:56 -0700155 kleave(" = %d", ret);
David Howells76181c12007-10-16 23:29:46 -0700156 complete_request_key(cons, ret);
David Howells3e301482005-06-23 22:00:56 -0700157 return ret;
David Howells76181c12007-10-16 23:29:46 -0700158}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160/*
David Howells76181c12007-10-16 23:29:46 -0700161 * call out to userspace for key construction
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162 * - we ignore program failure and go on key status instead
163 */
David Howells4a38e122008-04-29 01:01:24 -0700164static int construct_key(struct key *key, const void *callout_info,
165 size_t callout_len, void *aux)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166{
David Howells76181c12007-10-16 23:29:46 -0700167 struct key_construction *cons;
David Howellsb5f545c2006-01-08 01:02:47 -0800168 request_key_actor_t actor;
David Howells76181c12007-10-16 23:29:46 -0700169 struct key *authkey;
170 int ret;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171
David Howells4a38e122008-04-29 01:01:24 -0700172 kenter("%d,%p,%zu,%p", key->serial, callout_info, callout_len, aux);
David Howells3e301482005-06-23 22:00:56 -0700173
David Howells76181c12007-10-16 23:29:46 -0700174 cons = kmalloc(sizeof(*cons), GFP_KERNEL);
175 if (!cons)
176 return -ENOMEM;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700177
David Howellsb5f545c2006-01-08 01:02:47 -0800178 /* allocate an authorisation key */
David Howells4a38e122008-04-29 01:01:24 -0700179 authkey = request_key_auth_new(key, callout_info, callout_len);
David Howellsb5f545c2006-01-08 01:02:47 -0800180 if (IS_ERR(authkey)) {
David Howells76181c12007-10-16 23:29:46 -0700181 kfree(cons);
David Howellsb5f545c2006-01-08 01:02:47 -0800182 ret = PTR_ERR(authkey);
183 authkey = NULL;
David Howells76181c12007-10-16 23:29:46 -0700184 } else {
185 cons->authkey = key_get(authkey);
186 cons->key = key_get(key);
187
188 /* make the call */
189 actor = call_sbin_request_key;
190 if (key->type->request_key)
191 actor = key->type->request_key;
192
193 ret = actor(cons, "create", aux);
194
195 /* check that the actor called complete_request_key() prior to
196 * returning an error */
197 WARN_ON(ret < 0 &&
198 !test_bit(KEY_FLAG_REVOKED, &authkey->flags));
199 key_put(authkey);
David Howellsb5f545c2006-01-08 01:02:47 -0800200 }
201
David Howells76181c12007-10-16 23:29:46 -0700202 kleave(" = %d", ret);
203 return ret;
204}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700205
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206/*
David Howells76181c12007-10-16 23:29:46 -0700207 * link a key to the appropriate destination keyring
208 * - the caller must hold a write lock on the destination keyring
Linus Torvalds1da177e2005-04-16 15:20:36 -0700209 */
David Howells76181c12007-10-16 23:29:46 -0700210static void construct_key_make_link(struct key *key, struct key *dest_keyring)
David Howells3e301482005-06-23 22:00:56 -0700211{
212 struct task_struct *tsk = current;
213 struct key *drop = NULL;
214
215 kenter("{%d},%p", key->serial, dest_keyring);
216
217 /* find the appropriate keyring */
218 if (!dest_keyring) {
219 switch (tsk->jit_keyring) {
220 case KEY_REQKEY_DEFL_DEFAULT:
221 case KEY_REQKEY_DEFL_THREAD_KEYRING:
222 dest_keyring = tsk->thread_keyring;
223 if (dest_keyring)
224 break;
225
226 case KEY_REQKEY_DEFL_PROCESS_KEYRING:
227 dest_keyring = tsk->signal->process_keyring;
228 if (dest_keyring)
229 break;
230
231 case KEY_REQKEY_DEFL_SESSION_KEYRING:
232 rcu_read_lock();
233 dest_keyring = key_get(
234 rcu_dereference(tsk->signal->session_keyring));
235 rcu_read_unlock();
236 drop = dest_keyring;
237
238 if (dest_keyring)
239 break;
240
241 case KEY_REQKEY_DEFL_USER_SESSION_KEYRING:
David Howells76181c12007-10-16 23:29:46 -0700242 dest_keyring = tsk->user->session_keyring;
David Howells3e301482005-06-23 22:00:56 -0700243 break;
244
245 case KEY_REQKEY_DEFL_USER_KEYRING:
David Howells76181c12007-10-16 23:29:46 -0700246 dest_keyring = tsk->user->uid_keyring;
David Howells3e301482005-06-23 22:00:56 -0700247 break;
248
249 case KEY_REQKEY_DEFL_GROUP_KEYRING:
250 default:
251 BUG();
252 }
253 }
254
255 /* and attach the key to it */
David Howells76181c12007-10-16 23:29:46 -0700256 __key_link(dest_keyring, key);
David Howells3e301482005-06-23 22:00:56 -0700257 key_put(drop);
David Howells3e301482005-06-23 22:00:56 -0700258 kleave("");
David Howells76181c12007-10-16 23:29:46 -0700259}
David Howells3e301482005-06-23 22:00:56 -0700260
David Howells76181c12007-10-16 23:29:46 -0700261/*
262 * allocate a new key in under-construction state and attempt to link it in to
263 * the requested place
264 * - may return a key that's already under construction instead
265 */
266static int construct_alloc_key(struct key_type *type,
267 const char *description,
268 struct key *dest_keyring,
269 unsigned long flags,
270 struct key_user *user,
271 struct key **_key)
272{
273 struct key *key;
274 key_ref_t key_ref;
David Howells3e301482005-06-23 22:00:56 -0700275
David Howells76181c12007-10-16 23:29:46 -0700276 kenter("%s,%s,,,", type->name, description);
277
278 mutex_lock(&user->cons_lock);
279
280 key = key_alloc(type, description,
281 current->fsuid, current->fsgid, current, KEY_POS_ALL,
282 flags);
283 if (IS_ERR(key))
284 goto alloc_failed;
285
286 set_bit(KEY_FLAG_USER_CONSTRUCT, &key->flags);
287
288 if (dest_keyring)
289 down_write(&dest_keyring->sem);
290
291 /* attach the key to the destination keyring under lock, but we do need
292 * to do another check just in case someone beat us to it whilst we
293 * waited for locks */
294 mutex_lock(&key_construction_mutex);
295
296 key_ref = search_process_keyrings(type, description, type->match,
297 current);
298 if (!IS_ERR(key_ref))
299 goto key_already_present;
300
301 if (dest_keyring)
302 construct_key_make_link(key, dest_keyring);
303
304 mutex_unlock(&key_construction_mutex);
305 if (dest_keyring)
306 up_write(&dest_keyring->sem);
307 mutex_unlock(&user->cons_lock);
308 *_key = key;
309 kleave(" = 0 [%d]", key_serial(key));
310 return 0;
311
312key_already_present:
313 mutex_unlock(&key_construction_mutex);
314 if (dest_keyring)
315 up_write(&dest_keyring->sem);
316 mutex_unlock(&user->cons_lock);
317 key_put(key);
318 *_key = key = key_ref_to_ptr(key_ref);
319 kleave(" = -EINPROGRESS [%d]", key_serial(key));
320 return -EINPROGRESS;
321
322alloc_failed:
323 mutex_unlock(&user->cons_lock);
324 *_key = NULL;
325 kleave(" = %ld", PTR_ERR(key));
326 return PTR_ERR(key);
327}
328
329/*
330 * commence key construction
331 */
332static struct key *construct_key_and_link(struct key_type *type,
333 const char *description,
334 const char *callout_info,
David Howells4a38e122008-04-29 01:01:24 -0700335 size_t callout_len,
David Howells76181c12007-10-16 23:29:46 -0700336 void *aux,
337 struct key *dest_keyring,
338 unsigned long flags)
339{
340 struct key_user *user;
341 struct key *key;
342 int ret;
343
344 user = key_user_lookup(current->fsuid);
345 if (!user)
346 return ERR_PTR(-ENOMEM);
347
348 ret = construct_alloc_key(type, description, dest_keyring, flags, user,
349 &key);
350 key_user_put(user);
351
352 if (ret == 0) {
David Howells4a38e122008-04-29 01:01:24 -0700353 ret = construct_key(key, callout_info, callout_len, aux);
David Howells76181c12007-10-16 23:29:46 -0700354 if (ret < 0)
355 goto construction_failed;
356 }
357
358 return key;
359
360construction_failed:
361 key_negate_and_link(key, key_negative_timeout, NULL, NULL);
362 key_put(key);
363 return ERR_PTR(ret);
364}
365
David Howells3e301482005-06-23 22:00:56 -0700366/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700367 * request a key
368 * - search the process's keyrings
369 * - check the list of keys being created or updated
David Howells3e301482005-06-23 22:00:56 -0700370 * - call out to userspace for a key if supplementary info was provided
371 * - cache the key in an appropriate keyring
Linus Torvalds1da177e2005-04-16 15:20:36 -0700372 */
David Howells3e301482005-06-23 22:00:56 -0700373struct key *request_key_and_link(struct key_type *type,
374 const char *description,
David Howells4a38e122008-04-29 01:01:24 -0700375 const void *callout_info,
376 size_t callout_len,
David Howells4e54f082006-06-29 02:24:28 -0700377 void *aux,
David Howells7e047ef2006-06-26 00:24:50 -0700378 struct key *dest_keyring,
379 unsigned long flags)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700380{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700381 struct key *key;
David Howells664cceb2005-09-28 17:03:15 +0100382 key_ref_t key_ref;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700383
David Howells4a38e122008-04-29 01:01:24 -0700384 kenter("%s,%s,%p,%zu,%p,%p,%lx",
385 type->name, description, callout_info, callout_len, aux,
David Howells4e54f082006-06-29 02:24:28 -0700386 dest_keyring, flags);
David Howells3e301482005-06-23 22:00:56 -0700387
Linus Torvalds1da177e2005-04-16 15:20:36 -0700388 /* search all the process keyrings for a key */
David Howells664cceb2005-09-28 17:03:15 +0100389 key_ref = search_process_keyrings(type, description, type->match,
390 current);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700391
David Howells664cceb2005-09-28 17:03:15 +0100392 if (!IS_ERR(key_ref)) {
393 key = key_ref_to_ptr(key_ref);
David Howells76181c12007-10-16 23:29:46 -0700394 } else if (PTR_ERR(key_ref) != -EAGAIN) {
David Howellse231c2e2008-02-07 00:15:26 -0800395 key = ERR_CAST(key_ref);
David Howells76181c12007-10-16 23:29:46 -0700396 } else {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700397 /* the search failed, but the keyrings were searchable, so we
398 * should consult userspace if we can */
399 key = ERR_PTR(-ENOKEY);
400 if (!callout_info)
401 goto error;
402
David Howells76181c12007-10-16 23:29:46 -0700403 key = construct_key_and_link(type, description, callout_info,
David Howells4a38e122008-04-29 01:01:24 -0700404 callout_len, aux, dest_keyring,
405 flags);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700406 }
407
David Howells3e301482005-06-23 22:00:56 -0700408error:
409 kleave(" = %p", key);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700410 return key;
David Howells76181c12007-10-16 23:29:46 -0700411}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700412
David Howells76181c12007-10-16 23:29:46 -0700413/*
414 * wait for construction of a key to complete
415 */
416int wait_for_key_construction(struct key *key, bool intr)
417{
418 int ret;
David Howells3e301482005-06-23 22:00:56 -0700419
David Howells76181c12007-10-16 23:29:46 -0700420 ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT,
421 intr ? key_wait_bit_intr : key_wait_bit,
422 intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
423 if (ret < 0)
424 return ret;
425 return key_validate(key);
426}
427EXPORT_SYMBOL(wait_for_key_construction);
David Howells3e301482005-06-23 22:00:56 -0700428
David Howells3e301482005-06-23 22:00:56 -0700429/*
430 * request a key
431 * - search the process's keyrings
432 * - check the list of keys being created or updated
433 * - call out to userspace for a key if supplementary info was provided
David Howells76181c12007-10-16 23:29:46 -0700434 * - waits uninterruptible for creation to complete
David Howells3e301482005-06-23 22:00:56 -0700435 */
436struct key *request_key(struct key_type *type,
437 const char *description,
438 const char *callout_info)
439{
David Howells76181c12007-10-16 23:29:46 -0700440 struct key *key;
David Howells4a38e122008-04-29 01:01:24 -0700441 size_t callout_len = 0;
David Howells76181c12007-10-16 23:29:46 -0700442 int ret;
David Howells3e301482005-06-23 22:00:56 -0700443
David Howells4a38e122008-04-29 01:01:24 -0700444 if (callout_info)
445 callout_len = strlen(callout_info);
446 key = request_key_and_link(type, description, callout_info, callout_len,
447 NULL, NULL, KEY_ALLOC_IN_QUOTA);
David Howells76181c12007-10-16 23:29:46 -0700448 if (!IS_ERR(key)) {
449 ret = wait_for_key_construction(key, false);
450 if (ret < 0) {
451 key_put(key);
452 return ERR_PTR(ret);
453 }
454 }
455 return key;
456}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700457EXPORT_SYMBOL(request_key);
David Howells4e54f082006-06-29 02:24:28 -0700458
David Howells4e54f082006-06-29 02:24:28 -0700459/*
460 * request a key with auxiliary data for the upcaller
461 * - search the process's keyrings
462 * - check the list of keys being created or updated
463 * - call out to userspace for a key if supplementary info was provided
David Howells76181c12007-10-16 23:29:46 -0700464 * - waits uninterruptible for creation to complete
David Howells4e54f082006-06-29 02:24:28 -0700465 */
466struct key *request_key_with_auxdata(struct key_type *type,
467 const char *description,
David Howells4a38e122008-04-29 01:01:24 -0700468 const void *callout_info,
469 size_t callout_len,
David Howells4e54f082006-06-29 02:24:28 -0700470 void *aux)
471{
David Howells76181c12007-10-16 23:29:46 -0700472 struct key *key;
473 int ret;
474
David Howells4a38e122008-04-29 01:01:24 -0700475 key = request_key_and_link(type, description, callout_info, callout_len,
476 aux, NULL, KEY_ALLOC_IN_QUOTA);
David Howells76181c12007-10-16 23:29:46 -0700477 if (!IS_ERR(key)) {
478 ret = wait_for_key_construction(key, false);
479 if (ret < 0) {
480 key_put(key);
481 return ERR_PTR(ret);
482 }
483 }
484 return key;
485}
486EXPORT_SYMBOL(request_key_with_auxdata);
487
488/*
489 * request a key (allow async construction)
490 * - search the process's keyrings
491 * - check the list of keys being created or updated
492 * - call out to userspace for a key if supplementary info was provided
493 */
494struct key *request_key_async(struct key_type *type,
495 const char *description,
David Howells4a38e122008-04-29 01:01:24 -0700496 const void *callout_info,
497 size_t callout_len)
David Howells76181c12007-10-16 23:29:46 -0700498{
David Howells4a38e122008-04-29 01:01:24 -0700499 return request_key_and_link(type, description, callout_info,
500 callout_len, NULL, NULL,
501 KEY_ALLOC_IN_QUOTA);
David Howells76181c12007-10-16 23:29:46 -0700502}
503EXPORT_SYMBOL(request_key_async);
504
505/*
506 * request a key with auxiliary data for the upcaller (allow async construction)
507 * - search the process's keyrings
508 * - check the list of keys being created or updated
509 * - call out to userspace for a key if supplementary info was provided
510 */
511struct key *request_key_async_with_auxdata(struct key_type *type,
512 const char *description,
David Howells4a38e122008-04-29 01:01:24 -0700513 const void *callout_info,
514 size_t callout_len,
David Howells76181c12007-10-16 23:29:46 -0700515 void *aux)
516{
David Howells4a38e122008-04-29 01:01:24 -0700517 return request_key_and_link(type, description, callout_info,
518 callout_len, aux, NULL, KEY_ALLOC_IN_QUOTA);
David Howells76181c12007-10-16 23:29:46 -0700519}
520EXPORT_SYMBOL(request_key_async_with_auxdata);