mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
kauth: Catch ka_KeyCheckSum failures
If ka_KeyCheckSum fails, typically because the key being used is bad, catch the failure rather than just silently ignoring it. Caught by clang-analyzer Change-Id: Id51174fdf94356db10961690808670da372bc60e Reviewed-on: http://gerrit.openafs.org/9179 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
e7035b876f
commit
4213ef986f
@ -1638,7 +1638,11 @@ kamGetEntry(struct rx_call *call,
|
|||||||
memcpy(&aentry->key, &tentry.key, sizeof(struct ktc_encryptionKey));
|
memcpy(&aentry->key, &tentry.key, sizeof(struct ktc_encryptionKey));
|
||||||
else
|
else
|
||||||
memset(&aentry->key, 0, sizeof(aentry->key));
|
memset(&aentry->key, 0, sizeof(aentry->key));
|
||||||
|
|
||||||
code = ka_KeyCheckSum((char *)&tentry.key, &aentry->keyCheckSum);
|
code = ka_KeyCheckSum((char *)&tentry.key, &aentry->keyCheckSum);
|
||||||
|
if (code)
|
||||||
|
goto abort;
|
||||||
|
|
||||||
if (!tentry.pwsums[0] && npwSums > 1 && !tentry.pwsums[1]) {
|
if (!tentry.pwsums[0] && npwSums > 1 && !tentry.pwsums[1]) {
|
||||||
aentry->reserved3 = 0x12340000;
|
aentry->reserved3 = 0x12340000;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user