svn commit: lorikeet r641 - in trunk/heimdal/lib: gssapi gssapi/gssapi gssapi/krb5 gssapi/mech krb5

abartlet at samba.org abartlet at samba.org
Mon Oct 30 01:17:35 GMT 2006


Author: abartlet
Date: 2006-10-30 01:17:34 +0000 (Mon, 30 Oct 2006)
New Revision: 641

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=641

Log:
Make to clear that we are asking the kerberos library to find the full
name of a host, not declare it a saint.

Rename various routines and constants from canonize to canonicalize.  

Also fix the gss glue to call the lower layer with the correct oid.
(One of the challenges of this layer is that this is effectivly an
unchecked ioctl interface).

Andrew Bartlett

Modified:
   trunk/heimdal/lib/gssapi/gssapi/gssapi_krb5.h
   trunk/heimdal/lib/gssapi/krb5/external.c
   trunk/heimdal/lib/gssapi/krb5/set_sec_context_option.c
   trunk/heimdal/lib/gssapi/mech/gss_krb5.c
   trunk/heimdal/lib/gssapi/test_context.c
   trunk/heimdal/lib/krb5/context.c
   trunk/heimdal/lib/krb5/expand_hostname.c
   trunk/heimdal/lib/krb5/krb5_locl.h


Changeset:
Modified: trunk/heimdal/lib/gssapi/gssapi/gssapi_krb5.h
===================================================================
--- trunk/heimdal/lib/gssapi/gssapi/gssapi_krb5.h	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/gssapi/gssapi/gssapi_krb5.h	2006-10-30 01:17:34 UTC (rev 641)
@@ -62,7 +62,7 @@
 extern gss_OID GSS_KRB5_COPY_CCACHE_X;
 extern gss_OID GSS_KRB5_COMPAT_DES3_MIC_X;
 extern gss_OID GSS_KRB5_REGISTER_ACCEPTOR_IDENTITY_X;
-extern gss_OID GSS_KRB5_SET_DNS_CANONIZE_X;
+extern gss_OID GSS_KRB5_SET_DNS_CANONICALIZE_X;
 extern gss_OID GSS_KRB5_SEND_TO_KDC_X;
 /* Extensions inquire context */
 extern gss_OID GSS_KRB5_GET_TKT_FLAGS_X;
@@ -118,7 +118,7 @@
 	 gss_buffer_t /*ad_data*/);
 
 OM_uint32
-gsskrb5_set_dns_canonlize(int);
+gsskrb5_set_dns_canonicalize(int);
 
 struct gsskrb5_send_to_kdc {
     void *func;

Modified: trunk/heimdal/lib/gssapi/krb5/external.c
===================================================================
--- trunk/heimdal/lib/gssapi/krb5/external.c	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/gssapi/krb5/external.c	2006-10-30 01:17:34 UTC (rev 641)
@@ -305,10 +305,10 @@
 gss_OID GSS_KRB5_EXPORT_LUCID_CONTEXT_V1_X = &gss_krb5_export_lucid_context_v1_x_desc;
 
 /* 1.2.752.43.13.7 */
-static gss_OID_desc gss_krb5_set_dns_canonize_x_desc =
+static gss_OID_desc gss_krb5_set_dns_canonicalize_x_desc =
 {6, rk_UNCONST("\x2a\x85\x70\x2b\x0d\x07")};
 
-gss_OID GSS_KRB5_SET_DNS_CANONIZE_X = &gss_krb5_set_dns_canonize_x_desc;
+gss_OID GSS_KRB5_SET_DNS_CANONICALIZE_X = &gss_krb5_set_dns_canonicalize_x_desc;
 
 /* 1.2.752.43.13.8 */
 static gss_OID_desc gss_krb5_get_subkey_x_desc =

Modified: trunk/heimdal/lib/gssapi/krb5/set_sec_context_option.c
===================================================================
--- trunk/heimdal/lib/gssapi/krb5/set_sec_context_option.c	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/gssapi/krb5/set_sec_context_option.c	2006-10-30 01:17:34 UTC (rev 641)
@@ -89,14 +89,14 @@
 	ctx->more_flags |= COMPAT_OLD_DES3_SELECTED;
 	HEIMDAL_MUTEX_unlock(&ctx->ctx_id_mutex);
 	return GSS_S_COMPLETE;
-    } else if (gss_oid_equal(desired_object, GSS_KRB5_SET_DNS_CANONIZE_X)) {
+    } else if (gss_oid_equal(desired_object, GSS_KRB5_SET_DNS_CANONICALIZE_X)) {
 	int flag;
 
 	maj_stat = get_bool(minor_status, value, &flag);
 	if (maj_stat != GSS_S_COMPLETE)
 	    return maj_stat;
 
-	krb5_set_dns_canonize_hostname(_gsskrb5_context, flag);
+	krb5_set_dns_canonicalize_hostname(_gsskrb5_context, flag);
 	return GSS_S_COMPLETE;
 
     } else if (gss_oid_equal(desired_object, GSS_KRB5_REGISTER_ACCEPTOR_IDENTITY_X)) {

Modified: trunk/heimdal/lib/gssapi/mech/gss_krb5.c
===================================================================
--- trunk/heimdal/lib/gssapi/mech/gss_krb5.c	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/gssapi/mech/gss_krb5.c	2006-10-30 01:17:34 UTC (rev 641)
@@ -204,7 +204,7 @@
 }
 
 OM_uint32
-gsskrb5_set_dns_canonlize(int flag)
+gsskrb5_set_dns_canonicalize(int flag)
 {
         struct _gss_mech_switch	*m;
 	gss_buffer_desc buffer;
@@ -220,7 +220,7 @@
 		if (m->gm_mech.gm_set_sec_context_option == NULL)
 			continue;
 		m->gm_mech.gm_set_sec_context_option(&junk, NULL,
-		    GSS_KRB5_REGISTER_ACCEPTOR_IDENTITY_X, &buffer);
+		    GSS_KRB5_SET_DNS_CANONICALIZE_X, &buffer);
 	}
 
 	return (GSS_S_COMPLETE);

Modified: trunk/heimdal/lib/gssapi/test_context.c
===================================================================
--- trunk/heimdal/lib/gssapi/test_context.c	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/gssapi/test_context.c	2006-10-30 01:17:34 UTC (rev 641)
@@ -131,7 +131,7 @@
     {"name-type",0,	arg_string, &type_string,  "type of name", NULL },
     {"mech-type",0,	arg_string, &mech_string,  "type of mech", NULL },
     {"dns-canon",0,	arg_negative_flag, &dns_canon_flag, 
-     "use dns to canonlize", NULL },
+     "use dns to canonicalize", NULL },
     {"version",	0,	arg_flag,	&version_flag, "print version", NULL },
     {"verbose",	'v',	arg_flag,	&verbose_flag, "verbose", NULL },
     {"help",	0,	arg_flag,	&help_flag,  NULL, NULL }
@@ -176,7 +176,7 @@
 	usage(1);
 
     if (dns_canon_flag != -1)
-	gsskrb5_set_dns_canonlize(dns_canon_flag);
+	gsskrb5_set_dns_canonicalize(dns_canon_flag);
 
     if (type_string == NULL)
 	nameoid = GSS_C_NT_HOSTBASED_SERVICE;

Modified: trunk/heimdal/lib/krb5/context.c
===================================================================
--- trunk/heimdal/lib/krb5/context.c	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/krb5/context.c	2006-10-30 01:17:34 UTC (rev 641)
@@ -181,7 +181,7 @@
     INIT_FIELD(context, bool, srv_lookup, TRUE, "srv_lookup");
     INIT_FIELD(context, bool, srv_lookup, context->srv_lookup, "dns_lookup_kdc");
     INIT_FIELD(context, int, large_msg_size, 6000, "large_message_size");
-    INIT_FIELD(context, bool, dns_canonize_hostname, TRUE, "dns_canonize_hostname");
+    INIT_FIELD(context, bool, dns_canonicalize_hostname, TRUE, "dns_canonize_hostname");
     context->default_cc_name = NULL;
     return 0;
 }
@@ -685,15 +685,15 @@
 }
 
 void KRB5_LIB_FUNCTION
-krb5_set_dns_canonize_hostname (krb5_context context, krb5_boolean flag)
+krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)
 {
-    context->dns_canonize_hostname = flag;
+    context->dns_canonicalize_hostname = flag;
 }
 
 krb5_boolean KRB5_LIB_FUNCTION
 krb5_get_dns_canonize_hostname (krb5_context context)
 {
-    return context->dns_canonize_hostname;
+    return context->dns_canonicalize_hostname;
 }
 
 krb5_error_code KRB5_LIB_FUNCTION

Modified: trunk/heimdal/lib/krb5/expand_hostname.c
===================================================================
--- trunk/heimdal/lib/krb5/expand_hostname.c	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/krb5/expand_hostname.c	2006-10-30 01:17:34 UTC (rev 641)
@@ -62,7 +62,7 @@
     struct addrinfo *ai, *a, hints;
     int error;
 
-    if (!context->dns_canonize_hostname)
+    if (!context->dns_canonicalize_hostname)
 	return copy_hostname (context, orig_hostname, new_hostname);
 
     memset (&hints, 0, sizeof(hints));
@@ -127,7 +127,7 @@
     int error;
     krb5_error_code ret = 0;
 
-    if (!context->dns_canonize_hostname)
+    if (!context->dns_canonicalize_hostname)
 	return vanilla_hostname (context, orig_hostname, new_hostname,
 				 realms);
 

Modified: trunk/heimdal/lib/krb5/krb5_locl.h
===================================================================
--- trunk/heimdal/lib/krb5/krb5_locl.h	2006-10-24 06:29:50 UTC (rev 640)
+++ trunk/heimdal/lib/krb5/krb5_locl.h	2006-10-30 01:17:34 UTC (rev 641)
@@ -231,7 +231,7 @@
     int pkinit_flags;
     void *mutex;			/* protects error_string/error_buf */
     int large_msg_size;
-    int dns_canonize_hostname;
+    int dns_canonicalize_hostname;
     struct send_to_kdc *send_to_kdc;
     void *mem_ctx;                      /* Some parts of Samba4 need a valid 
                                            memory context (under the event 



More information about the samba-cvs mailing list