From: Chris Provenzano Date: Tue, 2 May 1995 23:31:45 +0000 (+0000) Subject: * mk_cred.c (mk_cred()), mk_priv.c (mk_priv()), mk_safe.c (mk_safe()), X-Git-Tag: krb5-1.0-beta5~69 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6f2f64705dede4a4d0ed546e95721df18391ff98;p=krb5.git * mk_cred.c (mk_cred()), mk_priv.c (mk_priv()), mk_safe.c (mk_safe()), * rd_cred.c (rd_cred()), rd_priv.c (rd_priv()), rd_safe.c (rd_safe()): Don't call krb5_make_fulladdrs() if a port isn't specified. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5684 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index b800ef32c..f0ec2d218 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,10 @@ + +Tue May 02 19:29:18 1995 Chris Provenzano (proven@mit.edu) + + * mk_cred.c (mk_cred()), mk_priv.c (mk_priv()), mk_safe.c (mk_safe()), + * rd_cred.c (rd_cred()), rd_priv.c (rd_priv()), rd_safe.c (rd_safe()): + Don't call krb5_make_fulladdrs() if a port isn't specified. + Mon May 01 15:56:32 1995 Chris Provenzano (proven@mit.edu) * auth_con.c (krb5_auth_con_free()) : diff --git a/src/lib/krb5/krb/mk_cred.c b/src/lib/krb5/krb/mk_cred.c index 3970ddb5e..44b6879a3 100644 --- a/src/lib/krb5/krb/mk_cred.c +++ b/src/lib/krb5/krb/mk_cred.c @@ -8,6 +8,11 @@ * * MODIFIED * $Log$ + * Revision 5.11 1995/05/02 23:31:39 proven + * * mk_cred.c (mk_cred()), mk_priv.c (mk_priv()), mk_safe.c (mk_safe()), + * * rd_cred.c (rd_cred()), rd_priv.c (rd_priv()), rd_safe.c (rd_safe()): + * Don't call krb5_make_fulladdrs() if a port isn't specified. + * * Revision 5.10 1995/05/01 20:49:45 proven * * auth_con.c (krb5_auth_con_free()) : * Free all the data associated with the auth_context. @@ -309,23 +314,33 @@ krb5_mk_ncred(context, auth_context, ppcreds, ppdata, outdata) CLEANUP_INIT(2); if (auth_context->local_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, - auth_context->local_port, &local_fulladdr))) { - CLEANUP_PUSH(&local_fulladdr.contents, free); - plocal_fulladdr = &local_fulladdr; - } else { - goto error; + if (auth_context->local_port) { + if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, + auth_context->local_port, + &local_fulladdr))) { + CLEANUP_PUSH(&local_fulladdr.contents, free); + plocal_fulladdr = &local_fulladdr; + } else { + goto error; + } + } else { + plocal_fulladdr = auth_context->local_addr; } } if (auth_context->remote_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->remote_addr, - auth_context->remote_port, &remote_fulladdr))){ - CLEANUP_PUSH(&remote_fulladdr.contents, free); - premote_fulladdr = &remote_fulladdr; - } else { - CLEANUP_DONE(); - goto error; + if (auth_context->remote_port) { + if (!(retval = krb5_make_fulladdr(context,auth_context->remote_addr, + auth_context->remote_port, + &remote_fulladdr))){ + CLEANUP_PUSH(&remote_fulladdr.contents, free); + premote_fulladdr = &remote_fulladdr; + } else { + CLEANUP_DONE(); + goto error; + } + } else { + premote_fulladdr = auth_context->remote_addr; } } diff --git a/src/lib/krb5/krb/mk_priv.c b/src/lib/krb5/krb/mk_priv.c index 003644768..fe309399b 100644 --- a/src/lib/krb5/krb/mk_priv.c +++ b/src/lib/krb5/krb/mk_priv.c @@ -193,23 +193,33 @@ krb5_mk_priv(context, auth_context, userdata, outbuf, outdata) CLEANUP_INIT(2); if (auth_context->local_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, - auth_context->local_port, &local_fulladdr))){ - CLEANUP_PUSH(&local_fulladdr.contents, free); - plocal_fulladdr = &local_fulladdr; - } else { - goto error; - } + if (auth_context->local_port) { + if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, + auth_context->local_port, + &local_fulladdr))) { + CLEANUP_PUSH(&local_fulladdr.contents, free); + plocal_fulladdr = &local_fulladdr; + } else { + goto error; + } + } else { + plocal_fulladdr = auth_context->local_addr; + } } if (auth_context->remote_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->remote_addr, - auth_context->remote_port, &remote_fulladdr))){ - CLEANUP_PUSH(&remote_fulladdr.contents, free); - premote_fulladdr = &remote_fulladdr; - } else { - CLEANUP_DONE(); - goto error; + if (auth_context->remote_addr) { + if (!(retval = krb5_make_fulladdr(context,auth_context->remote_addr, + auth_context->remote_port, + &remote_fulladdr))){ + CLEANUP_PUSH(&remote_fulladdr.contents, free); + premote_fulladdr = &remote_fulladdr; + } else { + CLEANUP_DONE(); + goto error; + } + } else { + premote_fulladdr = auth_context->remote_addr; } } diff --git a/src/lib/krb5/krb/mk_safe.c b/src/lib/krb5/krb/mk_safe.c index 06c002209..53817fa7c 100644 --- a/src/lib/krb5/krb/mk_safe.c +++ b/src/lib/krb5/krb/mk_safe.c @@ -176,23 +176,34 @@ krb5_mk_safe(context, auth_context, userdata, outbuf, outdata) CLEANUP_INIT(2); if (auth_context->local_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, - auth_context->local_port, &local_fulladdr))){ - CLEANUP_PUSH(&local_fulladdr.contents, free); - plocal_fulladdr = &local_fulladdr; - } else { - goto error; + if (auth_context->local_port) { + if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, + auth_context->local_port, + &local_fulladdr))){ + CLEANUP_PUSH(&local_fulladdr.contents, free); + plocal_fulladdr = &local_fulladdr; + } else { + goto error; + } + } else { + plocal_fulladdr = auth_context->local_addr; } + } if (auth_context->remote_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->remote_addr, - auth_context->remote_port, &remote_fulladdr))){ - CLEANUP_PUSH(&remote_fulladdr.contents, free); - premote_fulladdr = &remote_fulladdr; - } else { - CLEANUP_DONE(); - goto error; + if (auth_context->remote_port) { + if (!(retval = krb5_make_fulladdr(context,auth_context->remote_addr, + auth_context->remote_port, + &remote_fulladdr))){ + CLEANUP_PUSH(&remote_fulladdr.contents, free); + premote_fulladdr = &remote_fulladdr; + } else { + CLEANUP_DONE(); + goto error; + } + } else { + premote_fulladdr = auth_context->remote_addr; } } diff --git a/src/lib/krb5/krb/rd_cred.c b/src/lib/krb5/krb/rd_cred.c index 8e18a30a2..7987ba460 100644 --- a/src/lib/krb5/krb/rd_cred.c +++ b/src/lib/krb5/krb/rd_cred.c @@ -241,23 +241,32 @@ krb5_rd_cred(context, auth_context, pcreddata, pppcreds, outdata) CLEANUP_INIT(2); if (auth_context->local_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, - auth_context->local_port, &local_fulladdr))){ - CLEANUP_PUSH(&local_fulladdr.contents, free); - plocal_fulladdr = &local_fulladdr; - } else { - return retval; + if (auth_context->local_addr) { + if (!(retval = krb5_make_fulladdr(context,auth_context->local_addr, + auth_context->local_port, + &local_fulladdr))){ + CLEANUP_PUSH(&local_fulladdr.contents, free); + plocal_fulladdr = &local_fulladdr; + } else { + return retval; + } + } else { + plocal_fulladdr = auth_context->local_addr; } } if (auth_context->remote_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->remote_addr, - auth_context->remote_port, &remote_fulladdr))){ - CLEANUP_PUSH(&remote_fulladdr.contents, free); - premote_fulladdr = &remote_fulladdr; - } else { - CLEANUP_DONE(); - return retval; + if (auth_context->remote_addr) { + if (!(retval = krb5_make_fulladdr(context,auth_context->remote_addr, + auth_context->remote_port, + &remote_fulladdr))){ + CLEANUP_PUSH(&remote_fulladdr.contents, free); + premote_fulladdr = &remote_fulladdr; + } else { + return retval; + } + } else { + premote_fulladdr = auth_context->remote_addr; } } diff --git a/src/lib/krb5/krb/rd_priv.c b/src/lib/krb5/krb/rd_priv.c index 4c73bf827..a7964513b 100644 --- a/src/lib/krb5/krb/rd_priv.c +++ b/src/lib/krb5/krb/rd_priv.c @@ -206,23 +206,33 @@ krb5_rd_priv(context, auth_context, inbuf, outbuf, outdata) CLEANUP_INIT(2); if (auth_context->local_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, - auth_context->local_port, &local_fulladdr))){ - CLEANUP_PUSH(&local_fulladdr.contents, free); - plocal_fulladdr = &local_fulladdr; - } else { - return retval; + if (auth_context->local_addr) { + if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, + auth_context->local_port, + &local_fulladdr))){ + CLEANUP_PUSH(&local_fulladdr.contents, free); + plocal_fulladdr = &local_fulladdr; + } else { + return retval; + } + } else { + plocal_fulladdr = auth_context->local_addr; } } if (auth_context->remote_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->remote_addr, - auth_context->remote_port, &remote_fulladdr))){ - CLEANUP_PUSH(&remote_fulladdr.contents, free); - premote_fulladdr = &remote_fulladdr; - } else { - CLEANUP_DONE(); - return retval; + if (auth_context->remote_addr) { + if (!(retval = krb5_make_fulladdr(context,auth_context->remote_addr, + auth_context->remote_port, + &remote_fulladdr))){ + CLEANUP_PUSH(&remote_fulladdr.contents, free); + premote_fulladdr = &remote_fulladdr; + } else { + CLEANUP_DONE(); + return retval; + } + } else { + premote_fulladdr = auth_context->remote_addr; } } diff --git a/src/lib/krb5/krb/rd_safe.c b/src/lib/krb5/krb/rd_safe.c index 196f05be2..b4eb1980e 100644 --- a/src/lib/krb5/krb/rd_safe.c +++ b/src/lib/krb5/krb/rd_safe.c @@ -197,23 +197,32 @@ krb5_rd_safe(context, auth_context, inbuf, outbuf, outdata) CLEANUP_INIT(2); if (auth_context->local_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, - auth_context->local_port, &local_fulladdr))){ - CLEANUP_PUSH(&local_fulladdr.contents, free); - plocal_fulladdr = &local_fulladdr; - } else { - return retval; + if (auth_context->local_addr) { + if (!(retval = krb5_make_fulladdr(context, auth_context->local_addr, + auth_context->local_port, + &local_fulladdr))){ + CLEANUP_PUSH(&local_fulladdr.contents, free); + plocal_fulladdr = &local_fulladdr; + } else { + return retval; + } + } else { + plocal_fulladdr = auth_context->local_addr; } } if (auth_context->remote_addr) { - if (!(retval = krb5_make_fulladdr(context, auth_context->remote_addr, - auth_context->remote_port, &remote_fulladdr))){ - CLEANUP_PUSH(&remote_fulladdr.contents, free); - premote_fulladdr = &remote_fulladdr; - } else { - CLEANUP_DONE(); - return retval; + if (auth_context->remote_addr) { + if (!(retval = krb5_make_fulladdr(context,auth_context->remote_addr, + auth_context->remote_port, + &remote_fulladdr))){ + CLEANUP_PUSH(&remote_fulladdr.contents, free); + premote_fulladdr = &remote_fulladdr; + } else { + return retval; + } + } else { + premote_fulladdr = auth_context->remote_addr; } }