From c7f5a212025172307e85e09ada03333e5e288cc3 Mon Sep 17 00:00:00 2001 From: Christof Hanke Date: Wed, 28 Aug 2013 14:51:13 +0200 Subject: [PATCH 1/1] 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 --- src/afs/LINUX/osi_groups.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c index e351344..cc48f6c 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 { -- 1.9.4