Revert "KCM wrong size memcmp"
commit2f0c985b47b7c8acbc225c985cc8f4496e2af987
authorRomain Fihue <romain.fihue@cea.fr>
Mon, 29 Nov 2021 14:53:17 +0000 (29 15:53 +0100)
committerJeffrey Altman <jaltman@auristor.com>
Mon, 29 Nov 2021 15:26:19 +0000 (29 10:26 -0500)
tree7167ae4667de8039efa62ba45cbcfe2301ac6f30
parent7686028718d6753adc86b9e63b361990bd010867
Revert "KCM wrong size memcmp"

'uuid' is seen as an 'unsigned char*', thus '*uuid' is an 'unsigned char' where size is 1.

This solves a problem where two KCM ccaches's uuid have the same first byte hides each other.

What we observe:
  * A user cannot discover tickets with (klist -l) but can access it with it's name
  * The 'rpc.gssd' daemon is doing the same kind of pattern but using GSS calls (gss_acquire_cred)

Whet GDB told us:
  * The 'kcm_ccache_get_uuids' is okay, all ccache are really present
  * The 'kcm_ccache_resolve_by_uuid' is buggy, it only compare the first byte of each uuid.
    Which may be the same as the one we're seeking. Selected ccache that will be, most probably, filtered-out afterward with a call to 'kcm_access'.
    This leads to 'KRB5_FCC_NOFILE' errors while the uuid is correct.

Similar calls may be present.

This reverts commit 936017e4d62628851463cdd953b934875b995625,
kcm/cache.c