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:
Simon Wilkinson 2013-02-22 09:47:57 +00:00 committed by Jeffrey Altman
parent e7035b876f
commit 4213ef986f

View File

@ -1638,7 +1638,11 @@ kamGetEntry(struct rx_call *call,
memcpy(&aentry->key, &tentry.key, sizeof(struct ktc_encryptionKey));
else
memset(&aentry->key, 0, sizeof(aentry->key));
code = ka_KeyCheckSum((char *)&tentry.key, &aentry->keyCheckSum);
if (code)
goto abort;
if (!tentry.pwsums[0] && npwSums > 1 && !tentry.pwsums[1]) {
aentry->reserved3 = 0x12340000;
} else {