From 3e098bafd6016b504b39ee25223c8d18d1fb716d Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Fri, 9 Feb 2007 00:32:04 +0000 Subject: [PATCH] STABLE14-keyring-pag-avoid-shadowing-20070208 FIXES 38959 avoid shadowing the pag variable (cherry picked from commit 0dfd1d0ed81547791d8b90f9be2d04b362401422) --- 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 f7da6aa219..78a2246dde 100644 --- a/src/afs/afs_osi_pag.c +++ b/src/afs/afs_osi_pag.c @@ -590,15 +590,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); }