summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-10-06 21:24:07 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:58 +0200
commitc9bc1e492404077c6b40b5cefe33e859503a4227 (patch)
tree8a38bfafafe0af9f8ee912ac87d53e62c4e2134d /source3/passdb
parent658f72128ff6950c6a03994198b4464a273fb300 (diff)
downloadsamba-c9bc1e492404077c6b40b5cefe33e859503a4227.tar.gz
samba-c9bc1e492404077c6b40b5cefe33e859503a4227.tar.bz2
samba-c9bc1e492404077c6b40b5cefe33e859503a4227.zip
s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pdb_tdb.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 80a4b49f9d..f16d99d0f4 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -389,15 +389,19 @@ static bool tdbsam_convert(struct db_context **pp_db, const char *name, int32 fr
goto cancel;
}
- if (dbwrap_store_int32(db, TDBSAM_VERSION_STRING,
- TDBSAM_VERSION) != 0) {
- DEBUG(0, ("tdbsam_convert: Could not store tdbsam version\n"));
+ status = dbwrap_store_int32(db, TDBSAM_VERSION_STRING,
+ TDBSAM_VERSION);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("tdbsam_convert: Could not store tdbsam version: "
+ "%s\n", nt_errstr(status)));
goto cancel;
}
- if (dbwrap_store_int32(db, TDBSAM_MINOR_VERSION_STRING,
- TDBSAM_MINOR_VERSION) != 0) {
- DEBUG(0, ("tdbsam_convert: Could not store tdbsam minor version\n"));
+ status = dbwrap_store_int32(db, TDBSAM_MINOR_VERSION_STRING,
+ TDBSAM_MINOR_VERSION);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("tdbsam_convert: Could not store tdbsam minor "
+ "version: %s\n", nt_errstr(status)));
goto cancel;
}