summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-09-07 16:25:48 +1000
committerAndrew Tridgell <tridge@samba.org>2011-09-08 03:35:27 +0200
commitde318e58b01696e7aea39d14da099dbb4173c055 (patch)
tree87f1660a53c90c356eda3baab7691868172b5d5a
parentad4ce31e86fecf27297c40c80404f85a150ab799 (diff)
downloadsamba-de318e58b01696e7aea39d14da099dbb4173c055.tar.gz
samba-de318e58b01696e7aea39d14da099dbb4173c055.tar.bz2
samba-de318e58b01696e7aea39d14da099dbb4173c055.zip
s4-dsdb: prevent crash on bad DN in construct_parent_guid()
this was found by a flakey test in autobuild
-rw-r--r--source4/dsdb/samdb/ldb_modules/operational.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c
index dcc047f13e..1a13895a93 100644
--- a/source4/dsdb/samdb/ldb_modules/operational.c
+++ b/source4/dsdb/samdb/ldb_modules/operational.c
@@ -283,6 +283,9 @@ static int construct_parent_guid(struct ldb_module *module,
ret = dsdb_module_search_dn(module, msg, &res, msg->dn, attrs,
DSDB_FLAG_NEXT_MODULE |
DSDB_SEARCH_SHOW_RECYCLED, parent);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
instanceType = ldb_msg_find_attr_as_uint(res->msgs[0],
"instanceType", 0);