From: Matthias Dieter Wallnöfer Date: Fri, 20 Apr 2012 16:15:23 +0000 (+0200) Subject: s4:dsdb/common/util.c - samdb_is_pdc() - fail if the "fSMORoleOwner" attribute has... X-Git-Tag: samba-4.0.0alpha20~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd5d282a466981ce87f180e4828fdef678409194;p=thirdparty%2Fsamba.git s4:dsdb/common/util.c - samdb_is_pdc() - fail if the "fSMORoleOwner" attribute has not been set --- diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 67589abed0b..6614507c50f 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1792,7 +1792,11 @@ bool samdb_is_pdc(struct ldb_context *ldb) goto failed; } - pdc = ldb_msg_find_attr_as_dn(ldb, tmp_ctx, dom_res->msgs[0], "fSMORoleOwner"); + pdc = ldb_msg_find_attr_as_dn(ldb, tmp_ctx, dom_res->msgs[0], + "fSMORoleOwner"); + if (pdc == NULL) { + goto failed; + } if (ldb_dn_compare(samdb_ntds_settings_dn(ldb), pdc) == 0) { is_pdc = true;