Reset out variables.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19960 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -46,6 +46,14 @@ gss_inquire_cred_by_mech(OM_uint32 *minor_status,
 | 
				
			|||||||
	struct _gss_name *name;
 | 
						struct _gss_name *name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*minor_status = 0;
 | 
						*minor_status = 0;
 | 
				
			||||||
 | 
						if (cred_name)
 | 
				
			||||||
 | 
						    *cred_name = GSS_C_NO_NAME;
 | 
				
			||||||
 | 
						if (initiator_lifetime)
 | 
				
			||||||
 | 
						    *initiator_lifetime = 0;
 | 
				
			||||||
 | 
						if (acceptor_lifetime)
 | 
				
			||||||
 | 
						    *acceptor_lifetime = 0;
 | 
				
			||||||
 | 
						if (cred_usage)
 | 
				
			||||||
 | 
						    *cred_usage = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	m = __gss_get_mechanism(mech_type);
 | 
						m = __gss_get_mechanism(mech_type);
 | 
				
			||||||
	if (!m)
 | 
						if (!m)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,6 +46,7 @@ gss_inquire_cred_by_oid (OM_uint32 *minor_status,
 | 
				
			|||||||
	gss_buffer_set_t set = GSS_C_NO_BUFFER_SET;
 | 
						gss_buffer_set_t set = GSS_C_NO_BUFFER_SET;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*minor_status = 0;
 | 
						*minor_status = 0;
 | 
				
			||||||
 | 
						*data_set = GSS_C_NO_BUFFER_SET;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cred == NULL)
 | 
						if (cred == NULL)
 | 
				
			||||||
		return GSS_S_NO_CRED;
 | 
							return GSS_S_NO_CRED;
 | 
				
			||||||
@@ -55,8 +56,11 @@ gss_inquire_cred_by_oid (OM_uint32 *minor_status,
 | 
				
			|||||||
		int i;
 | 
							int i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		m = mc->gmc_mech;
 | 
							m = mc->gmc_mech;
 | 
				
			||||||
		if (m == NULL)
 | 
							if (m == NULL) {
 | 
				
			||||||
 | 
						       		gss_release_buffer_set(minor_status, &set);
 | 
				
			||||||
 | 
								*minor_status = 0;
 | 
				
			||||||
			return GSS_S_BAD_MECH;
 | 
								return GSS_S_BAD_MECH;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (m->gm_inquire_cred_by_oid == NULL)
 | 
							if (m->gm_inquire_cred_by_oid == NULL)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
@@ -77,6 +81,7 @@ gss_inquire_cred_by_oid (OM_uint32 *minor_status,
 | 
				
			|||||||
	if (set == GSS_C_NO_BUFFER_SET)
 | 
						if (set == GSS_C_NO_BUFFER_SET)
 | 
				
			||||||
		status = GSS_S_FAILURE;
 | 
							status = GSS_S_FAILURE;
 | 
				
			||||||
	*data_set = set;
 | 
						*data_set = set;
 | 
				
			||||||
 | 
						*minor_status = 0;
 | 
				
			||||||
	return status;
 | 
						return status;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,6 +38,7 @@ gss_inquire_names_for_mech(OM_uint32 *minor_status,
 | 
				
			|||||||
	gssapi_mech_interface m = __gss_get_mechanism(mechanism);
 | 
						gssapi_mech_interface m = __gss_get_mechanism(mechanism);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*minor_status = 0;
 | 
						*minor_status = 0;
 | 
				
			||||||
 | 
						*name_types = GSS_C_NO_OID_SET;
 | 
				
			||||||
	if (!m)
 | 
						if (!m)
 | 
				
			||||||
		return (GSS_S_BAD_MECH);
 | 
							return (GSS_S_BAD_MECH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,15 +57,15 @@ gss_inquire_names_for_mech(OM_uint32 *minor_status,
 | 
				
			|||||||
		major_status = gss_add_oid_set_member(minor_status,
 | 
							major_status = gss_add_oid_set_member(minor_status,
 | 
				
			||||||
		    GSS_C_NT_HOSTBASED_SERVICE, name_types);
 | 
							    GSS_C_NT_HOSTBASED_SERVICE, name_types);
 | 
				
			||||||
		if (major_status) {
 | 
							if (major_status) {
 | 
				
			||||||
			OM_uint32 ms;
 | 
								OM_uint32 junk;
 | 
				
			||||||
			gss_release_oid_set(&ms, name_types);
 | 
								gss_release_oid_set(&junk, name_types);
 | 
				
			||||||
			return (major_status);
 | 
								return (major_status);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		major_status = gss_add_oid_set_member(minor_status,
 | 
							major_status = gss_add_oid_set_member(minor_status,
 | 
				
			||||||
		    GSS_C_NT_USER_NAME, name_types);
 | 
							    GSS_C_NT_USER_NAME, name_types);
 | 
				
			||||||
		if (major_status) {
 | 
							if (major_status) {
 | 
				
			||||||
			OM_uint32 ms;
 | 
								OM_uint32 junk;
 | 
				
			||||||
			gss_release_oid_set(&ms, name_types);
 | 
								gss_release_oid_set(&junk, name_types);
 | 
				
			||||||
			return (major_status);
 | 
								return (major_status);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ gss_inquire_sec_context_by_oid (OM_uint32 *minor_status,
 | 
				
			|||||||
	gssapi_mech_interface	m;
 | 
						gssapi_mech_interface	m;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	*minor_status = 0;
 | 
						*minor_status = 0;
 | 
				
			||||||
 | 
						*data_set = GSS_C_NO_OID_SET;
 | 
				
			||||||
	if (ctx == NULL)
 | 
						if (ctx == NULL)
 | 
				
			||||||
		return GSS_S_NO_CONTEXT;
 | 
							return GSS_S_NO_CONTEXT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user