Wrap name in a spnego_name instead of just a copy of the underlaying object.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21243 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -540,7 +540,7 @@ acceptor_start | |||||||
| 	    gss_cred_id_t *delegated_cred_handle | 	    gss_cred_id_t *delegated_cred_handle | ||||||
| 	   ) | 	   ) | ||||||
| { | { | ||||||
|     OM_uint32 ret, ret2, minor; |     OM_uint32 ret, junk, minor; | ||||||
|     NegotiationToken nt; |     NegotiationToken nt; | ||||||
|     size_t nt_len; |     size_t nt_len; | ||||||
|     NegTokenInit *ni; |     NegTokenInit *ni; | ||||||
| @@ -667,7 +667,7 @@ acceptor_start | |||||||
| 					     mech_delegated_cred, | 					     mech_delegated_cred, | ||||||
| 					     delegated_cred_handle); | 					     delegated_cred_handle); | ||||||
| 	    else | 	    else | ||||||
| 		gss_release_cred(&ret2, &mech_delegated_cred); | 		gss_release_cred(&junk, &mech_delegated_cred); | ||||||
|  |  | ||||||
| 	    ret = acceptor_complete(minor_status, | 	    ret = acceptor_complete(minor_status, | ||||||
| 				    ctx, | 				    ctx, | ||||||
| @@ -951,11 +951,14 @@ acceptor_continue | |||||||
|  |  | ||||||
|     if (ret == GSS_S_COMPLETE) { |     if (ret == GSS_S_COMPLETE) { | ||||||
| 	if (src_name != NULL && ctx->mech_src_name != NULL) { | 	if (src_name != NULL && ctx->mech_src_name != NULL) { | ||||||
| 	    ret2 = gss_duplicate_name(minor_status, | 	    spnego_name name; | ||||||
| 				      ctx->mech_src_name, |  | ||||||
| 				      src_name); | 	    name = calloc(1, sizeof(*name)); | ||||||
| 	    if (ret2 != GSS_S_COMPLETE) | 	    if (name) { | ||||||
| 		ret = ret2; | 		name->mech = ctx->mech_src_name; | ||||||
|  | 		ctx->mech_src_name = NULL; | ||||||
|  | 		*src_name = (gss_name_t)name; | ||||||
|  | 	    } | ||||||
| 	} | 	} | ||||||
|         if (delegated_cred_handle != NULL) { |         if (delegated_cred_handle != NULL) { | ||||||
| 	    *delegated_cred_handle = ctx->delegated_cred_id; | 	    *delegated_cred_handle = ctx->delegated_cred_id; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand