svn rev #21550: branches/mskrb-integ/src/lib/gssapi/mechglue/

lhoward@MIT.EDU lhoward at MIT.EDU
Thu Dec 18 20:49:22 EST 2008


http://src.mit.edu/fisheye/changelog/krb5/?cs=21550
Commit By: lhoward
Log Message:
fix some warnings



Changed Files:
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_acquire_cred.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_compare_name.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_glue.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_imp_name_object.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_inq_cred_oid.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_seal.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/g_wrap_iov.c
U   branches/mskrb-integ/src/lib/gssapi/mechglue/mglueP.h
Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_acquire_cred.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_acquire_cred.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_acquire_cred.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -397,6 +397,8 @@
     else if (cred_usage == GSS_C_BOTH)
 	time_req = (acceptor_time_req > initiator_time_req) ?
 	    acceptor_time_req : initiator_time_req;
+    else
+	time_req = 0;
 
     status = mech->gss_acquire_cred(minor_status,
 				    internal_name, time_req,

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_compare_name.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_compare_name.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_compare_name.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -72,7 +72,7 @@
 {
     OM_uint32		major_status, temp_minor;
     gss_union_name_t	union_name1, union_name2;
-    gss_mechanism	mech;
+    gss_mechanism	mech = NULL;
     gss_name_t		internal_name;
     
     major_status = val_comp_name_args(minor_status,
@@ -114,6 +114,10 @@
 	if ((union_name1->mech_name == 0) || (union_name2->mech_name == 0))
 	    /* should never happen */
 	    return (GSS_S_BAD_NAME);
+	if (!mech)
+	    return (GSS_S_BAD_MECH);
+	if (!mech->gss_compare_name)
+	    return (GSS_S_UNAVAILABLE);
 	major_status = mech->gss_compare_name(minor_status,
 					      union_name1->mech_name,
 					      union_name2->mech_name,
@@ -190,6 +194,10 @@
     if (major_status != GSS_S_COMPLETE)
 	return (GSS_S_COMPLETE); /* return complete, but not equal */
 
+    if (!mech)
+	return (GSS_S_BAD_MECH);
+    if (!mech->gss_compare_name)
+	return (GSS_S_UNAVAILABLE);
     major_status = mech->gss_compare_name(minor_status,
 					  union_name1->mech_name,
 					  internal_name, name_equal);

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_glue.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_glue.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_glue.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -51,7 +51,7 @@
     /* p points to the beginning of the buffer */
     unsigned char *p = *buf;
     int length, new_length;
-    int octets;
+    unsigned int octets;
 
     if (buf_len < 1)
 	return (-1);

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_imp_name_object.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_imp_name_object.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_imp_name_object.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -74,7 +74,7 @@
     gss_name_t		    internal_name = GSS_C_NO_NAME;
     OM_uint32		    tmp, major_status = GSS_S_FAILURE;
     gss_OID_set		    mechlist = GSS_C_NO_OID_SET;
-    int			    i;
+    size_t		    i;
 
     major_status = val_imp_name_object_args(minor_status,
 					    input_name,

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_initialize.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -313,7 +313,7 @@
 build_mechSet(void)
 {
 	gss_mech_info mList;
-	int i;
+	size_t i;
 	size_t count;
 	gss_OID curItem;
 

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_inq_cred_oid.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_inq_cred_oid.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_inq_cred_oid.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -39,7 +39,7 @@
 				      gss_buffer_set_t *dst,
 				      const gss_buffer_set_t src)
 {
-    int i;
+    size_t i;
     OM_uint32 status;
 
     if (src == GSS_C_NO_BUFFER_SET)

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_seal.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_seal.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_seal.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -98,7 +98,7 @@
     assert(mech->gss_wrap_iov_length);
 
     status = mech->gss_wrap_iov_length(minor_status, context_handle,
-				       conf_req_flag, qop_req,
+				       conf_req_flag, (gss_qop_t)qop_req,
 				       NULL, iov,
 				       sizeof(iov)/sizeof(iov[0]));
     if (status != GSS_S_COMPLETE) {
@@ -132,7 +132,7 @@
     iov[3].buffer.value = (unsigned char *)output_message_buffer->value + offset;
 
     status = mech->gss_wrap_iov(minor_status, context_handle,
-				conf_req_flag, qop_req, conf_state,
+				conf_req_flag, (gss_qop_t)qop_req, conf_state,
 				iov, sizeof(iov)/sizeof(iov[0]));
     if (status != GSS_S_COMPLETE) {
 	OM_uint32 minor;

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/g_wrap_iov.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/g_wrap_iov.c	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/g_wrap_iov.c	2008-12-19 01:49:20 UTC (rev 21550)
@@ -184,7 +184,7 @@
 int			iov_count;
 {
     OM_uint32		status = GSS_S_COMPLETE;
-    size_t		i;
+    int			i;
 
     if (minor_status)
 	*minor_status = 0;

Modified: branches/mskrb-integ/src/lib/gssapi/mechglue/mglueP.h
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/mechglue/mglueP.h	2008-12-19 01:39:42 UTC (rev 21549)
+++ branches/mskrb-integ/src/lib/gssapi/mechglue/mglueP.h	2008-12-19 01:49:20 UTC (rev 21550)
@@ -104,6 +104,8 @@
 /* it to initialize the GSSAPI library		  */
 int gssint_mechglue_initialize_library(void);
 
+OM_uint32 gssint_get_mech_type_oid(gss_OID OID, gss_buffer_t token);
+
 /*
  * This is the definition of the mechs_array struct, which is used to
  * define the mechs array table. This table is used to indirectly




More information about the cvs-krb5 mailing list