diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2012-04-20 18:15:23 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2012-04-29 19:06:52 +0200 |
commit | cd5d282a466981ce87f180e4828fdef678409194 (patch) | |
tree | 0918c5be67e350f8cadc5e0301d6ec7ca2dd2e96 | |
parent | b019248fe85025f9df0cc20484f7b5f65838dc09 (diff) | |
download | samba-cd5d282a466981ce87f180e4828fdef678409194.tar.gz samba-cd5d282a466981ce87f180e4828fdef678409194.tar.bz2 samba-cd5d282a466981ce87f180e4828fdef678409194.zip |
s4:dsdb/common/util.c - samdb_is_pdc() - fail if the "fSMORoleOwner" attribute has not been set
-rw-r--r-- | source4/dsdb/common/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 67589abed0..6614507c50 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; |