Rewrite gss_add_cred() (fix #413)
It turns out gss_add_cred() really needed a complete rewrite. It's much better to first have a gss_duplicate_cred() (which has been needed for other reasons anyways), and use that when the input_cred_handle is not GSS_C_NO_CREDENTIAL and output_cred_handle is not NULL, then mutate that duplicate credential handle (or the input_cred_handle if output_cred_handle is NULL).
This commit is contained in:
		 Nicolas Williams
					Nicolas Williams
				
			
				
					committed by
					
						 Nico Williams
						Nico Williams
					
				
			
			
				
	
			
			
			 Nico Williams
						Nico Williams
					
				
			
						parent
						
							134b53ead1
						
					
				
				
					commit
					e6d1c10808
				
			| @@ -1,5 +1,5 @@ | ||||
| /* | ||||
|  * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan | ||||
|  * Copyright (c) 1997 - 2018 Kungliga Tekniska Högskolan | ||||
|  * (Royal Institute of Technology, Stockholm, Sweden). | ||||
|  * All rights reserved. | ||||
|  * | ||||
| @@ -390,13 +390,14 @@ static gssapi_mech_interface_desc krb5_mech = { | ||||
|     sizeof(krb5_mo) / sizeof(krb5_mo[0]), | ||||
|     _gsskrb5_localname, | ||||
|     _gsskrb5_authorize_localname, | ||||
|     NULL, | ||||
|     NULL, | ||||
|     NULL, | ||||
|     NULL, | ||||
|     NULL, | ||||
|     NULL, | ||||
|     NULL | ||||
|     NULL, /* gm_display_name_ext */ | ||||
|     NULL, /* gm_inquire_name */ | ||||
|     NULL, /* gm_get_name_attribute */ | ||||
|     NULL, /* gm_set_name_attribute */ | ||||
|     NULL, /* gm_delete_name_attribute */ | ||||
|     NULL, /* gm_export_name_composite */ | ||||
|     _gsskrb5_duplicate_cred, | ||||
|     NULL  /* gm_compat */ | ||||
| }; | ||||
|  | ||||
| gssapi_mech_interface | ||||
|   | ||||
		Reference in New Issue
	
	Block a user