[OpenAFS-devel] libkasadmin errors

Jeremy Stribling jstribl@us.ibm.com
Fri, 6 Jul 2001 17:11:04 -0700


I've been working with the kasadmin library, and have come across a few
problems.  The code responsible for these errors is in
src/libadmin/kas/afs_kasAdmin.c:

   - In the GetPrincipalLockStatus function, an attempt is made to set the
lockedUntil variable to the minimum locked value for that principal among
all servers.  However, lockedUntil is set to 0 immediately before this, and
so all attempts to find a locked value less than it fails, and so
lockedUntil always comes out of that function as 0.

   - Also in the GetPrincipalLockStatus function, if the principal is
locked out according to all servers, then the main loop will exit when
ubik_CallIter returns the UNOSERVERS error code.  But, since the return
code for GetPrincipalLockStatus is set to 1 if and only if ubik_CallIter
returns an error code of 0, this results in an return code of 0 being
returned for GetPrincipalLockStatus when in reality no error occured.

   - A similar problem occurs in the kas_PrincipalUnlock function.  If the
principal is not currently locked out of any server, ubik_CallIter will
iterate through all servers and return a UNOSERVERS error code.  Again, in
this case the return code of kas_PrincipalUnlock will not be set to 1 and
an error will be indicated even though no error occured.

   - In kas_PrincipalKeySet, the return code is never set to 1, even when
it completes successfully, so it seems that an error always occurs when
calling this function.

Thanks,

Jeremy