s4/libnet: fix exporting to keytab by SPN
authorRalph Boehme <slow@samba.org>
Sun, 17 Apr 2016 14:28:00 +0000 (16:28 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 25 Apr 2016 08:35:14 +0000 (10:35 +0200)
commitdeab6c6df76180f875c411c3f6b1a9cf6696b88c
tree141f1ef28386c3102987c1cfbf6fac382d372415
parent35b2fb4ff3252a8fc340c8d7278314c7a0f6f894
s4/libnet: fix exporting to keytab by SPN

Fix a regression introduced by 5c5d586d3ebd40 that broke exporting
service principals by their spn with

  samba-tool exportkeytab --principal=<SPN>.

Iterating with samba_kdc_nextkey() only returns UPNs, so this can't work
with SPNs. If we want to search for a specific SPN, we have to use
samba_kdc_fetch().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/libnet/libnet_export_keytab.c