summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew <awalker@ixsystems.com>2020-06-30 06:54:06 -0400
committerKarolin Seeger <kseeger@samba.org>2020-07-09 09:56:19 +0000
commit05a6a60a745293569a327a673d10ceb542a7c746 (patch)
tree2de011999c58f81eeabddae86e0cd8c8c5856456
parent03eb7b7c0de6a6191a54583f388cd84e32c982dc (diff)
downloadsamba-05a6a60a745293569a327a673d10ceb542a7c746.tar.gz
s3:winbind:idmap_ad - make failure to get attrnames for schema mode fatal
Add check for failure to resolve the OID array for the schema mode into names. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14425 Signed-off-by: Andrew <awalker@ixsystems.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit b5b801026edd3a8fd8d0ba1752e891453cf675c9)
-rw-r--r--source3/winbindd/idmap_ad.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c
index a93c61f54d1..6d879cdf4d7 100644
--- a/source3/winbindd/idmap_ad.c
+++ b/source3/winbindd/idmap_ad.c
@@ -162,6 +162,14 @@ static TLDAPRC get_attrnames_by_oids(struct tldap_context *ld,
}
TALLOC_FREE(msgs);
+ for (i=0; i<num_oids; i++) {
+ if (names[i] == NULL) {
+ DBG_ERR("Failed to retrieve schema name for "
+ "oid [%s]. Schema mode is incorrect "
+ "for this domain.\n", oids[i]);
+ return TLDAP_FILTER_ERROR;
+ }
+ }
return TLDAP_SUCCESS;
}