summaryrefslogtreecommitdiff
path: root/lib/ZCkAuth.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-07-20 09:21:30 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-07-20 09:21:30 +0000
commit02e3cbb3ddcc7bd34aa4b5f04312effc13dbf471 (patch)
tree6b3e888e8129ad217ae42924a9b33b895ec68497 /lib/ZCkAuth.c
parenta62520c4dc7c10524859597d3c42849dfb207fa2 (diff)
there are no authenticators in downlink messages from servers to clients.
return auth_failed when things have failed
Diffstat (limited to 'lib/ZCkAuth.c')
-rw-r--r--lib/ZCkAuth.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/ZCkAuth.c b/lib/ZCkAuth.c
index 2c53325..13d3077 100644
--- a/lib/ZCkAuth.c
+++ b/lib/ZCkAuth.c
@@ -42,15 +42,14 @@ int ZCheckAuthentication(notice, from)
if (!notice->z_auth)
return (ZAUTH_NO);
- if (notice->z_authent_len <= 0) /* bogus length */
- return(ZAUTH_FAILED);
-
if (__Zephyr_server) {
+ if (notice->z_authent_len <= 0) /* bogus length */
+ return(ZAUTH_FAILED);
if (ZReadAscii(notice->z_ascii_authent,
strlen(notice->z_ascii_authent)+1,
(unsigned char *)authent.dat,
notice->z_authent_len) == ZERR_BADFIELD) {
- return (ZAUTH_NO);
+ return (ZAUTH_FAILED);
}
authent.length = notice->z_authent_len;
result = krb_rd_req(&authent, SERVER_SERVICE,
@@ -62,7 +61,7 @@ int ZCheckAuthentication(notice, from)
(void) sprintf(srcprincipal, "%s%s%s@%s", dat.pname,
dat.pinst[0]?".":"", dat.pinst, dat.prealm);
if (strcmp(srcprincipal, notice->z_sender))
- return (ZAUTH_NO);
+ return (ZAUTH_FAILED);
return(ZAUTH_YES);
} else
return (ZAUTH_FAILED); /* didn't decode correctly */