kdc: generic support for 3part servicePrincipalNames
This is not DRSUAPI specific, it works for all 3 part principals. Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
		 Stefan Metzmacher
					Stefan Metzmacher
				
			
				
					committed by
					
						 Andrew Bartlett
						Andrew Bartlett
					
				
			
			
				
	
			
			
			 Andrew Bartlett
						Andrew Bartlett
					
				
			
						parent
						
							a873e21d7c
						
					
				
				
					commit
					81f9ed4a6c
				
			| @@ -1121,15 +1121,14 @@ need_referral(krb5_context context, krb5_kdc_configuration *config, | |||||||
|  |  | ||||||
|     if (server->name.name_string.len == 1) |     if (server->name.name_string.len == 1) | ||||||
| 	name = server->name.name_string.val[0]; | 	name = server->name.name_string.val[0]; | ||||||
|     else if (server->name.name_string.len == 3 && |     else if (server->name.name_string.len == 3) { | ||||||
| 	     strcasecmp("E3514235-4B06-11D1-AB04-00C04FC2DCD2", server->name.name_string.val[0]) == 0) { |  | ||||||
| 	/* | 	/* | ||||||
| 	  This is used to give referrals for the | 	  This is used to give referrals for the | ||||||
| 	  E3514235-4B06-11D1-AB04-00C04FC2DCD2/NTDSGUID/DNSDOMAIN | 	  E3514235-4B06-11D1-AB04-00C04FC2DCD2/NTDSGUID/DNSDOMAIN | ||||||
| 	  SPN form, which is used for inter-domain communication in AD | 	  SPN form, which is used for inter-domain communication in AD | ||||||
| 	 */ | 	 */ | ||||||
| 	name = server->name.name_string.val[2]; | 	name = server->name.name_string.val[2]; | ||||||
| 	kdc_log(context, config, 0, "Giving 3 part DRSUAPI referral for %s", name); | 	kdc_log(context, config, 0, "Giving 3 part referral for %s", name); | ||||||
| 	*realms = malloc(sizeof(char *)*2); | 	*realms = malloc(sizeof(char *)*2); | ||||||
| 	if (*realms == NULL) { | 	if (*realms == NULL) { | ||||||
| 	    krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); | 	    krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user