mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
STABLE14-cellconfig-make-nkeys-littleendian-20051107
cellconfig-check-for-corrupt-keyfile-20051007 should convert at least nkeys to host byte order before checking anything - fails on little endians otherwise. (cherry picked from commit ce80f99d7f905ae0928983b6a560f9b8b82c34b7)
This commit is contained in:
parent
2668bc9740
commit
49b231e31c
@ -1125,14 +1125,15 @@ afsconf_IntGetKeys(struct afsconf_dir *adir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* convert key structure to host order */
|
||||
tstr->nkeys = ntohl(tstr->nkeys);
|
||||
|
||||
if (code < sizeof(afs_int32) + (tstr->nkeys*sizeof(struct afsconf_key))) {
|
||||
tstr->nkeys = 0;
|
||||
UNLOCK_GLOBAL_MUTEX;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* convert key structure to host order */
|
||||
tstr->nkeys = ntohl(tstr->nkeys);
|
||||
for (fd = 0; fd < tstr->nkeys; fd++)
|
||||
tstr->key[fd].kvno = ntohl(tstr->key[fd].kvno);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user