Make rxs_GetAuthName provide defaults for cases where the security class

does not provide a GetAuthName method.  Also, make the rxkad method use
the int64 macros to fill in the expiration time.
This commit is contained in:
Jeffrey Hutzelman 2007-01-26 16:35:45 +00:00 committed by Jeffrey Hutzleman
parent 09c73e0bcc
commit 21093c2b87
2 changed files with 8 additions and 1 deletions

View File

@ -5982,6 +5982,13 @@ int rxs_GetAuthData (struct rx_connection * aconn,
afs_int64 *expires, afs_int32 *level,
int *nnames, struct rx_securityName *names)
{
/* Default answers, in case the op is unimplemented */
if (expires)
ZeroInt64(*expires);
if (level)
*level = RX_LEVEL_NULL;
if (names && nnames)
*nnames = 0;
return RXS_GetAuthData(rx_SecurityObjectOf(aconn), aconn,
expires, level, nnames, names);
}

View File

@ -473,7 +473,7 @@ rxkad_GetAuthData(struct rx_securityClass *aobj,
if (sconn && sconn->authenticated && sconn->rock
&& (time(0) < sconn->expirationTime)) {
if (expires)
*expires = sconn->expirationTime;
FillInt64(*expires, 0, sconn->expirationTime);
if (level) {
switch (sconn->level) {
case rxkad_clear: *level = RX_LEVEL_CLEAR; break;