summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/samldb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-01-31 09:49:15 +1100
committerAndrew Tridgell <tridge@samba.org>2008-01-31 09:49:15 +1100
commit8398982ac998d98cb1184f2b6d2631f1cfc9b3f8 (patch)
treed930f888211ce6f1353b4b41f2b1563957933e2b /source4/dsdb/samdb/ldb_modules/samldb.c
parent3a3ff8ebe7b7de24a7d3e2c9dd105d9fbeeb5d42 (diff)
parent1c22c925e5a7f45fbcbf9c2f8e206ee6b2b12192 (diff)
downloadsamba-8398982ac998d98cb1184f2b6d2631f1cfc9b3f8.tar.gz
samba-8398982ac998d98cb1184f2b6d2631f1cfc9b3f8.tar.bz2
samba-8398982ac998d98cb1184f2b6d2631f1cfc9b3f8.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit f6a5848e5e211d4d4d66b7eca46b4b0ad4c9daab)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/samldb.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 8a80260a69..baf419c750 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -72,7 +72,7 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
if (new_id == 0) {
/* out of IDs ! */
- ldb_debug(ldb, LDB_DEBUG_FATAL, "Are we out of valid IDs ?\n");
+ ldb_set_errstring(ldb, "Are we out of valid IDs ?\n");
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -81,6 +81,7 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
ZERO_STRUCT(msg);
msg.dn = ldb_dn_copy(mem_ctx, dn);
if (!msg.dn) {
+ ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
msg.num_elements = 2;
@@ -91,6 +92,7 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
els[0].flags = LDB_FLAG_MOD_DELETE;
els[0].name = talloc_strdup(mem_ctx, "nextRid");
if (!els[0].name) {
+ ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -101,12 +103,14 @@ static int samldb_set_next_rid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
vals[0].data = (uint8_t *)talloc_asprintf(mem_ctx, "%u", old_id);
if (!vals[0].data) {
+ ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
vals[0].length = strlen((char *)vals[0].data);
vals[1].data = (uint8_t *)talloc_asprintf(mem_ctx, "%u", new_id);
if (!vals[1].data) {
+ ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
vals[1].length = strlen((char *)vals[1].data);