summaryrefslogtreecommitdiff
path: root/security/keys
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-17 14:42:35 +0100
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-06 18:07:33 -0500
commitd7159a6d256020f249e3038577a38280ea4576cf (patch)
tree0cc8e1d0a9e3d5137a1bdc701bfeaa396e5b42cd /security/keys
parent47c966822cc5bd388358e5fe06bee8920a02bfff (diff)
downloadlinux-stable-d7159a6d256020f249e3038577a38280ea4576cf.tar.gz
linux-stable-d7159a6d256020f249e3038577a38280ea4576cf.tar.bz2
linux-stable-d7159a6d256020f249e3038577a38280ea4576cf.zip
KEYS: Return more accurate error codes
commit 4d09ec0f705cf88a12add029c058b53f288cfaa2 upstream. We were using the wrong variable here so the error codes weren't being returned properly. The original code returns -ENOKEY. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'security/keys')
-rw-r--r--security/keys/process_keys.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index 06c2ccf26ed3..20a38fed61b1 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -508,7 +508,7 @@ try_again:
ret = install_thread_keyring();
if (ret < 0) {
- key = ERR_PTR(ret);
+ key_ref = ERR_PTR(ret);
goto error;
}
goto reget_creds;
@@ -526,7 +526,7 @@ try_again:
ret = install_process_keyring();
if (ret < 0) {
- key = ERR_PTR(ret);
+ key_ref = ERR_PTR(ret);
goto error;
}
goto reget_creds;
@@ -585,7 +585,7 @@ try_again:
case KEY_SPEC_GROUP_KEYRING:
/* group keyrings are not yet supported */
- key = ERR_PTR(-EINVAL);
+ key_ref = ERR_PTR(-EINVAL);
goto error;
case KEY_SPEC_REQKEY_AUTH_KEY: