From 21093c2b870dff5d06a961636e4a77174a84861e Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Fri, 26 Jan 2007 16:35:45 +0000 Subject: [PATCH] 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. --- src/rx/rx.c | 7 +++++++ src/rxkad/rxkad_server.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/rx/rx.c b/src/rx/rx.c index 6ca7ee543f..88c135a57c 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -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); } diff --git a/src/rxkad/rxkad_server.c b/src/rxkad/rxkad_server.c index db83c69bec..6685888a34 100644 --- a/src/rxkad/rxkad_server.c +++ b/src/rxkad/rxkad_server.c @@ -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;