aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-07-11 08:15:48 -0400
committerJiri Kosina <jkosina@suse.cz>2011-07-11 08:15:55 -0400
commitb7e9c223be8ce335e30f2cf6ba588e6a4092275c (patch)
tree2d1e3b75606abc18df7ad65e51ac3f90cd68b38d /security/keys
parentc172d82500a6cf3c32d1e650722a1055d72ce858 (diff)
parente3bbfa78bab125f58b831b5f7f45b5a305091d72 (diff)
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
Diffstat (limited to 'security/keys')
-rw-r--r--security/keys/request_key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/keys/request_key.c b/security/keys/request_key.c
index d31862e0aa1..82465328c39 100644
--- a/security/keys/request_key.c
+++ b/security/keys/request_key.c
@@ -71,9 +71,8 @@ EXPORT_SYMBOL(complete_request_key);
71 * This is called in context of freshly forked kthread before kernel_execve(), 71 * This is called in context of freshly forked kthread before kernel_execve(),
72 * so we can simply install the desired session_keyring at this point. 72 * so we can simply install the desired session_keyring at this point.
73 */ 73 */
74static int umh_keys_init(struct subprocess_info *info) 74static int umh_keys_init(struct subprocess_info *info, struct cred *cred)
75{ 75{
76 struct cred *cred = (struct cred*)current_cred();
77 struct key *keyring = info->data; 76 struct key *keyring = info->data;
78 77
79 return install_session_keyring_to_cred(cred, keyring); 78 return install_session_keyring_to_cred(cred, keyring);
@@ -470,7 +469,7 @@ static struct key *construct_key_and_link(struct key_type *type,
470 } else if (ret == -EINPROGRESS) { 469 } else if (ret == -EINPROGRESS) {
471 ret = 0; 470 ret = 0;
472 } else { 471 } else {
473 key = ERR_PTR(ret); 472 goto couldnt_alloc_key;
474 } 473 }
475 474
476 key_put(dest_keyring); 475 key_put(dest_keyring);
@@ -480,6 +479,7 @@ static struct key *construct_key_and_link(struct key_type *type,
480construction_failed: 479construction_failed:
481 key_negate_and_link(key, key_negative_timeout, NULL, NULL); 480 key_negate_and_link(key, key_negative_timeout, NULL, NULL);
482 key_put(key); 481 key_put(key);
482couldnt_alloc_key:
483 key_put(dest_keyring); 483 key_put(dest_keyring);
484 kleave(" = %d", ret); 484 kleave(" = %d", ret);
485 return ERR_PTR(ret); 485 return ERR_PTR(ret);