From: Christof Hanke Date: Wed, 28 Aug 2013 12:51:13 +0000 (+0200) Subject: Linux Keyring error handling X-Git-Tag: upstream/1.8.0_pre1^2~1015 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c7f5a212025172307e85e09ada03333e5e288cc3;p=packages%2Fo%2Fopenafs.git Linux Keyring error handling honour the returncode of key_instantiate_and_link() to avoid having non-working pagsh without an error. Change-Id: Ia62c1c24b22e833cd5dc2689181397965901d34e Reviewed-on: http://gerrit.openafs.org/10179 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index e351344bd..cc48f6c72 100644 --- a/src/afs/LINUX/osi_groups.c +++ b/src/afs/LINUX/osi_groups.c @@ -253,7 +253,7 @@ setpag(cred_t **cr, afs_uint32 pagvalue, afs_uint32 *newpag, key = afs_linux_key_alloc(&key_type_afs_pag, "_pag", 0, 0, perm, KEY_ALLOC_NOT_IN_QUOTA); if (!IS_ERR(key)) { - key_instantiate_and_link(key, (void *) newpag, sizeof(afs_uint32), + code = key_instantiate_and_link(key, (void *) newpag, sizeof(afs_uint32), current_session_keyring(), NULL); key_put(key); } else {