From 771b10a421c287bb191192da632e73e5d1458cce Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 31 Oct 2010 11:03:59 +0100 Subject: s4:samldb LDB module - check for the number of results after a search operation Should always be done. --- source4/dsdb/samdb/ldb_modules/samldb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/dsdb/samdb/ldb_modules') diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 9b6d6e03cc..f4b7043e32 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -1067,6 +1067,9 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) if (ret != LDB_SUCCESS) { return ret; } + if (res->count != 1) { + return ldb_operr(ldb); + } /* Finds out the DN of the old primary group */ -- cgit