diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/os/port2ip.c | 18 |
1 files 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 <krb5/krb5.h> +#include <krb5/osconf.h> + +#ifdef KRB5_USE_INET + #include <krb5/ext-proto.h> #include <krb5/libos-proto.h> +#include "os-proto.h" #include <netinet/in.h> 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 |
