From 0dfd1d0ed81547791d8b90f9be2d04b362401422 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Fri, 9 Feb 2007 00:25:42 +0000 Subject: [PATCH] keyring-pag-avoid-shadowing-20070208 FIXES 38959 avoid shadowing the pag variable --- src/afs/afs_osi_pag.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/afs/afs_osi_pag.c b/src/afs/afs_osi_pag.c index 801c7411eb..9ebbdd1afb 100644 --- a/src/afs/afs_osi_pag.c +++ b/src/afs/afs_osi_pag.c @@ -601,15 +601,16 @@ out: #if defined(AFS_LINUX26_ENV) && defined(LINUX_KEYRING_SUPPORT) if (pag == NOPAG) { struct key *key; - afs_uint32 pag, newpag; + afs_uint32 upag, newpag; key = request_key(&key_type_afs_pag, "_pag", NULL); if (!IS_ERR(key)) { if (key_validate(key) == 0 && key->uid == 0) { /* also verify in the session keyring? */ - - pag = (afs_uint32) key->payload.value; - if (((pag >> 24) & 0xff) == 'A') - __setpag(&cred, pag, &newpag, 0); + upag = (afs_uint32) key->payload.value; + if (((upag >> 24) & 0xff) == 'A') { + __setpag(&cred, upag, &newpag, 0); + pag = (afs_int32) upag; + } } key_put(key); }