summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-09-22 05:31:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:42 -0500
commit37cefc8b41a008939c34dfc9f06996ea2d40a77c (patch)
treec45824e2293684df9b375631f7f136c6ed13366f
parentf08cdba2c5cfb5035e2ea6ae9f79591b8b0ad090 (diff)
downloadsamba-37cefc8b41a008939c34dfc9f06996ea2d40a77c.tar.gz
samba-37cefc8b41a008939c34dfc9f06996ea2d40a77c.tar.bz2
samba-37cefc8b41a008939c34dfc9f06996ea2d40a77c.zip
r10411: we don't need the 10 times retry on rid allocation now, as
transactions ensure two account creations can't interfere with each other (This used to be commit 91c27bc97662c8d8b764c76bd2d98a1b04f47337)
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index f7f7aca02e..18c7b27be3 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -179,7 +179,7 @@ static struct dom_sid *samldb_get_new_sid(struct ldb_module *module,
struct ldb_message **res = NULL;
const struct ldb_dn *dom_dn;
uint32_t rid;
- int ret, tries = 10;
+ int ret;
struct dom_sid *dom_sid, *obj_sid;
/* get the domain component part of the provided dn */
@@ -213,15 +213,7 @@ static struct dom_sid *samldb_get_new_sid(struct ldb_module *module,
}
/* allocate a new Rid for the domain */
-
- /* we need to try multiple times to cope with two account
- creations at the same time */
- while (tries--) {
- ret = samldb_allocate_next_rid(module->ldb, mem_ctx, dom_dn, &rid);
- if (ret != 1) {
- break;
- }
- }
+ ret = samldb_allocate_next_rid(module->ldb, mem_ctx, dom_dn, &rid);
if (ret != 0) {
ldb_debug(module->ldb, LDB_DEBUG_FATAL, "Failed to increment nextRid of %s\n", ldb_dn_linearize(mem_ctx, dom_dn));
talloc_free(res);