summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/ldap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 87631641ff1..2e38df180e5 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -2076,6 +2076,13 @@ ADS_STATUS ads_get_service_principal_names(TALLOC_CTX *mem_ctx,
res,
"servicePrincipalName",
num_spns);
+ if (*spn_array == NULL) {
+ DEBUG(1, ("Host account for %s does not have service principal "
+ "names.\n",
+ machine_name));
+ status = ADS_ERROR(LDAP_NO_SUCH_OBJECT);
+ goto done;
+ }
done:
ads_msgfree(ads, res);