mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
keyring-pag-avoid-shadowing-20070208
FIXES 38959 avoid shadowing the pag variable
This commit is contained in:
parent
8ecad072df
commit
0dfd1d0ed8
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user