@@ -292,7 +292,7 @@ static struct key *nfs_idmap_request_key(const char *name, size_t namelen,
if (IS_ERR(rkey)) {
mutex_lock(&idmap->idmap_mutex);
rkey = request_key_with_auxdata(&key_type_id_resolver_legacy,
- desc, NULL, "", 0, idmap);
+ desc, NULL, "", 0, idmap, NULL);
mutex_unlock(&idmap->idmap_mutex);
}
if (!IS_ERR(rkey))
@@ -333,7 +333,8 @@ extern struct key *request_key_with_auxdata(struct key_type *type,
struct key_tag *domain_tag,
const void *callout_info,
size_t callout_len,
- void *aux);
+ void *aux,
+ struct key *dest_keyring);
/**
* request_key - Request a key and wait for construction
@@ -735,14 +735,15 @@ struct key *request_key_with_auxdata(struct key_type *type,
struct key_tag *domain_tag,
const void *callout_info,
size_t callout_len,
- void *aux)
+ void *aux,
+ struct key *dest_keyring)
{
struct key *key;
int ret;
key = request_key_and_link(type, description, domain_tag,
callout_info, callout_len,
- aux, NULL, KEY_ALLOC_IN_QUOTA);
+ aux, dest_keyring, KEY_ALLOC_IN_QUOTA);
if (!IS_ERR(key)) {
ret = wait_for_key_construction(key, false);
if (ret < 0) {
We want to store GSS creds in user keyrings. Add a dest_keyring parameter to request_key_with_auxdata() so we can do that. Signed-off-by: Scott Mayhew <smayhew@redhat.com> --- fs/nfs/nfs4idmap.c | 2 +- include/linux/key.h | 3 ++- security/keys/request_key.c | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-)