STABLE14-keyring-pag-avoid-shadowing-20070208

FIXES 38959

avoid shadowing the pag variable


(cherry picked from commit 0dfd1d0ed8)
This commit is contained in:
Marc Dionne 2007-02-09 00:32:04 +00:00 committed by Derrick Brashear
parent 693f1c6a23
commit 3e098bafd6

View File

@ -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);
}