diff options
| author | John Kohl <jtkohl@mit.edu> | 1991-02-25 15:15:43 +0000 |
|---|---|---|
| committer | John Kohl <jtkohl@mit.edu> | 1991-02-25 15:15:43 +0000 |
| commit | f3af6a6a4daf7a09ac43ef6ae785a46cdaeb9c11 (patch) | |
| tree | c0f863fc30a7b2bad4f9971dbf35aeaad2d38699 /src | |
| parent | 9afe99afa637b6def5b794bfdda4103c6cb55fd7 (diff) | |
| download | krb5-f3af6a6a4daf7a09ac43ef6ae785a46cdaeb9c11.tar.gz krb5-f3af6a6a4daf7a09ac43ef6ae785a46cdaeb9c11.tar.xz krb5-f3af6a6a4daf7a09ac43ef6ae785a46cdaeb9c11.zip | |
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
Diffstat (limited to 'src')
| -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 |
