auth: Don't crash if UserList contains bogus line

If the first line of the UserList was bogus (caused ParseLine to
return an error), then we would attempt to free the contents of
an uninitialised identity structure, and crash. Initialise the
structure so this no longer happens.

Change-Id: I55074a5eb616ac48d8a278db2d8389d3b0e112a6
Reviewed-on: http://gerrit.openafs.org/3607
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Simon Wilkinson 2011-01-01 23:58:20 +00:00 committed by Jeffrey Altman
parent a7fb426259
commit 1879e1bce2

View File

@ -159,6 +159,8 @@ afsconf_DeleteIdentity(struct afsconf_dir *adir, struct rx_identity *user)
struct rx_identity identity;
afs_int32 code;
memset(&identity, 0, sizeof(struct rx_identity));
LOCK_GLOBAL_MUTEX;
UserListFileName(adir, tbuffer, sizeof tbuffer);
#ifndef AFS_NT40_ENV