keyring-pag-avoid-shadowing-20070208

FIXES 38959

avoid shadowing the pag variable
This commit is contained in:
Marc Dionne 2007-02-09 00:25:42 +00:00 committed by Derrick Brashear
parent 8ecad072df
commit 0dfd1d0ed8

View File

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