summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-04-20 18:15:23 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2012-04-29 19:06:52 +0200
commitcd5d282a466981ce87f180e4828fdef678409194 (patch)
tree0918c5be67e350f8cadc5e0301d6ec7ca2dd2e96 /source4/dsdb
parentb019248fe85025f9df0cc20484f7b5f65838dc09 (diff)
downloadsamba-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
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c6
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;