From f3af6a6a4daf7a09ac43ef6ae785a46cdaeb9c11 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 25 Feb 1991 15:15:43 +0000 Subject: [PATCH] parameterize on USE_INET replace KRB5KRB_AP_ERR_BADADDR with KRB5_PROG_ATYPE_NOSUPP git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1775 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/port2ip.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lib/krb5/os/port2ip.c b/src/lib/krb5/os/port2ip.c index 9fedb5c41..fd9baddcf 100644 --- a/src/lib/krb5/os/port2ip.c +++ b/src/lib/krb5/os/port2ip.c @@ -17,8 +17,13 @@ static char rcsid_port2ip_c[] = #endif /* !lint & !SABER */ #include +#include + +#ifdef KRB5_USE_INET + #include #include +#include "os-proto.h" #include krb5_error_code @@ -34,23 +39,23 @@ krb5_int16 *port; krb5_int32 templength; if (inaddr->addrtype != ADDRTYPE_ADDRPORT) - return KRB5KRB_AP_ERR_BADADDR; /* XXX */ + return KRB5_PROG_ATYPE_NOSUPP; if (inaddr->length != sizeof(smushaddr)+ sizeof(smushport) + 2*sizeof(temptype) + 2*sizeof(templength)) - return KRB5KRB_AP_ERR_BADADDR; /* XXX */ + return KRB5_PROG_ATYPE_NOSUPP; marshal = inaddr->contents; (void) memcpy((char *)&temptype, (char *)marshal, sizeof(temptype)); marshal += sizeof(temptype); if (temptype != htons(ADDRTYPE_INET)) - return KRB5KRB_AP_ERR_BADADDR; /* XXX */ + return KRB5_PROG_ATYPE_NOSUPP; (void) memcpy((char *)&templength, (char *)marshal, sizeof(templength)); marshal += sizeof(templength); if (templength != htonl(sizeof(smushaddr))) - return KRB5KRB_AP_ERR_BADADDR; /* XXX */ + return KRB5_PROG_ATYPE_NOSUPP; (void) memcpy((char *)&smushaddr, (char *)marshal, sizeof(smushaddr)); /* leave in net order */ @@ -59,12 +64,12 @@ krb5_int16 *port; (void) memcpy((char *)&temptype, (char *)marshal, sizeof(temptype)); marshal += sizeof(temptype); if (temptype != htons(ADDRTYPE_IPPORT)) - return KRB5KRB_AP_ERR_BADADDR; /* XXX */ + return KRB5_PROG_ATYPE_NOSUPP; (void) memcpy((char *)&templength, (char *)marshal, sizeof(templength)); marshal += sizeof(templength); if (templength != htonl(sizeof(smushport))) - return KRB5KRB_AP_ERR_BADADDR; /* XXX */ + return KRB5_PROG_ATYPE_NOSUPP; (void) memcpy((char *)&smushport, (char *)marshal, sizeof(smushport)); /* leave in net order */ @@ -73,3 +78,4 @@ krb5_int16 *port; *port = (krb5_int16) smushport; return 0; } +#endif -- 2.26.2