aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/request_key_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/request_key_auth.c')
-rw-r--r--security/keys/request_key_auth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c
index f22264632229..a8e4069d48cb 100644
--- a/security/keys/request_key_auth.c
+++ b/security/keys/request_key_auth.c
@@ -7,6 +7,8 @@
7 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 *
11 * See Documentation/keys-request-key.txt
10 */ 12 */
11 13
12#include <linux/module.h> 14#include <linux/module.h>
@@ -96,6 +98,7 @@ static void request_key_auth_destroy(struct key *key)
96 kenter("{%d}", key->serial); 98 kenter("{%d}", key->serial);
97 99
98 key_put(rka->target_key); 100 key_put(rka->target_key);
101 kfree(rka);
99 102
100} /* end request_key_auth_destroy() */ 103} /* end request_key_auth_destroy() */
101 104
@@ -126,7 +129,7 @@ struct key *request_key_auth_new(struct key *target, struct key **_rkakey)
126 129
127 rkakey = key_alloc(&key_type_request_key_auth, desc, 130 rkakey = key_alloc(&key_type_request_key_auth, desc,
128 current->fsuid, current->fsgid, 131 current->fsuid, current->fsgid,
129 KEY_USR_VIEW, 1); 132 KEY_POS_VIEW | KEY_USR_VIEW, 1);
130 if (IS_ERR(rkakey)) { 133 if (IS_ERR(rkakey)) {
131 key_put(keyring); 134 key_put(keyring);
132 kleave("= %ld", PTR_ERR(rkakey)); 135 kleave("= %ld", PTR_ERR(rkakey));