From 67600117610eda2bd7ad2802bcc7a9147720e659 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 6 Oct 2011 21:29:04 +0200 Subject: s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type for consistency and better error propagation Autobuild-User: Michael Adam Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104 --- source3/passdb/account_pol.c | 6 ++++-- source3/passdb/pdb_tdb.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/account_pol.c b/source3/passdb/account_pol.c index bd8cdf725f..a32d07517d 100644 --- a/source3/passdb/account_pol.c +++ b/source3/passdb/account_pol.c @@ -265,8 +265,10 @@ bool init_account_policy(void) } if (version != DATABASE_VERSION) { - if (dbwrap_store_uint32(db, vstring, DATABASE_VERSION) != 0) { - DEBUG(0, ("dbwrap_store_uint32 failed\n")); + status = dbwrap_store_uint32(db, vstring, DATABASE_VERSION); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("dbwrap_store_uint32 failed: %s\n", + nt_errstr(status))); goto cancel; } diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index f16d99d0f4..01c0def57f 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -345,7 +345,8 @@ static bool tdbsam_upgrade_next_rid(struct db_context *db) rid = BASE_RID; } - if (dbwrap_store_uint32(db, NEXT_RID_STRING, rid) != 0) { + status = dbwrap_store_uint32(db, NEXT_RID_STRING, rid); + if (!NT_STATUS_IS_OK(status)) { return false; } -- cgit