Browse code

Improve simple-to-full layout conversion.

Avoid adding null "spn" properties.

Xavier G authored on 26/04/2020 20:38:58
Showing 1 changed files

  • yamltab index c199220..657921c 100755
... ...
@@ -446,7 +446,9 @@ def simple_principal_to_full(inentry, index, entry):
446 446
 				message = 'Invalid or unknown name_type specified in entry #%d'
447 447
 				message += '; use name_type_raw to enforce an arbitrary value'
448 448
 				raise KeytabParsingError(message % index)
449
-		entry['spn'] = principal_to_spn(principal)
449
+		spn = principal_to_spn(principal)
450
+		if spn:
451
+			entry['spn'] = spn
450 452
 	elif 'spn' in inentry:
451 453
 		entry['spn'] = inentry['spn']
452 454
 		entry['principal'] = spn_to_principal(inentry['spn'])