diff options
Diffstat (limited to 'contrib/bind9/lib/dns/gssapictx.c')
-rw-r--r-- | contrib/bind9/lib/dns/gssapictx.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/bind9/lib/dns/gssapictx.c b/contrib/bind9/lib/dns/gssapictx.c index 707745c..24f4b9c 100644 --- a/contrib/bind9/lib/dns/gssapictx.c +++ b/contrib/bind9/lib/dns/gssapictx.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: gssapictx.c,v 1.26 2011-01-10 03:49:49 marka Exp $ */ +/* $Id: gssapictx.c,v 1.26.12.2 2011-04-07 23:05:01 marka Exp $ */ #include <config.h> @@ -179,7 +179,7 @@ log_cred(const gss_cred_id_t cred) { } if (gret == GSS_S_COMPLETE) { - if (gbuffer.length != 0) { + if (gbuffer.length != 0U) { gret = gss_release_buffer(&minor, &gbuffer); if (gret != GSS_S_COMPLETE) gss_log(3, "failed gss_release_buffer: %s", @@ -604,7 +604,7 @@ dst_gssapi_initctx(dns_name_t *name, isc_buffer_t *intoken, /* * RFC 2744 states the a valid output token has a non-zero length. */ - if (gouttoken.length != 0) { + if (gouttoken.length != 0U) { GBUFFER_TO_REGION(gouttoken, r); RETERR(isc_buffer_copyregion(outtoken, &r)); (void)gss_release_buffer(&minor, &gouttoken); @@ -650,8 +650,6 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, REQUIRE(outtoken != NULL && *outtoken == NULL); - log_cred(cred); - REGION_TO_GBUFFER(*intoken, gintoken); if (*ctxout == NULL) @@ -687,6 +685,8 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, #endif } + log_cred(cred); + gret = gss_accept_sec_context(&minor, &context, cred, &gintoken, GSS_C_NO_CHANNEL_BINDINGS, &gname, NULL, &gouttoken, NULL, NULL, NULL); @@ -719,7 +719,7 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, return (result); } - if (gouttoken.length > 0) { + if (gouttoken.length > 0U) { RETERR(isc_buffer_allocate(mctx, outtoken, gouttoken.length)); GBUFFER_TO_REGION(gouttoken, r); RETERR(isc_buffer_copyregion(*outtoken, &r)); @@ -741,7 +741,7 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, * case, since principal names really should not * contain null characters. */ - if (gnamebuf.length > 0 && + if (gnamebuf.length > 0U && ((char *)gnamebuf.value)[gnamebuf.length - 1] == '\0') gnamebuf.length--; @@ -755,7 +755,7 @@ dst_gssapi_acceptctx(gss_cred_id_t cred, RETERR(dns_name_fromtext(principal, &namebuf, dns_rootname, 0, NULL)); - if (gnamebuf.length != 0) { + if (gnamebuf.length != 0U) { gret = gss_release_buffer(&minor, &gnamebuf); if (gret != GSS_S_COMPLETE) gss_log(3, "failed gss_release_buffer: %s", @@ -836,9 +836,9 @@ gss_error_tostring(isc_uint32_t major, isc_uint32_t minor, snprintf(buf, buflen, "GSSAPI error: Major = %s, Minor = %s.", (char *)msg_major.value, (char *)msg_minor.value); - if (msg_major.length != 0) + if (msg_major.length != 0U) (void)gss_release_buffer(&minor_stat, &msg_major); - if (msg_minor.length != 0) + if (msg_minor.length != 0U) (void)gss_release_buffer(&minor_stat, &msg_minor); return(buf); #else |