summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-07-29 14:16:11 +0200
committerMichael Adam <obnox@samba.org>2009-07-29 16:26:21 +0200
commitded0ce8345b99e9d5e0cfaea7cee58648baea4b7 (patch)
treedb3b9a8af509bef9f3e68ab433be9a7971beae50 /source3/passdb
parentd916e56c4c9dc729dc88418f75ebbbf943597476 (diff)
downloadsamba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.tar.gz
samba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.tar.bz2
samba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.zip
s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.
Michael
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_tdb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 4d2a1d830a..e32711ec45 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -1074,6 +1074,7 @@ static uint32_t tdbsam_capabilities(struct pdb_methods *methods)
static bool tdbsam_new_rid(struct pdb_methods *methods, uint32 *prid)
{
uint32 rid;
+ NTSTATUS status;
rid = BASE_RID; /* Default if not set */
@@ -1083,9 +1084,10 @@ static bool tdbsam_new_rid(struct pdb_methods *methods, uint32 *prid)
return false;
}
- if (dbwrap_change_uint32_atomic(db_sam, NEXT_RID_STRING, &rid, 1) != 0) {
- DEBUG(3, ("tdbsam_new_rid: Failed to increase %s\n",
- NEXT_RID_STRING));
+ status = dbwrap_change_uint32_atomic(db_sam, NEXT_RID_STRING, &rid, 1);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(3, ("tdbsam_new_rid: Failed to increase %s: %s\n",
+ NEXT_RID_STRING, nt_errstr(status)));
return false;
}