summaryrefslogtreecommitdiff
path: root/source3/winbindd
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/winbindd
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/winbindd')
-rw-r--r--source3/winbindd/idmap_tdb.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index c19c9c8163..339655f044 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -197,8 +197,10 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db)
wm = dom->low_id;
}
- if (dbwrap_store_int32(db, HWM_USER, wm) == -1) {
- DEBUG(0, ("Unable to byteswap user hwm in idmap database\n"));
+ status = dbwrap_store_int32(db, HWM_USER, wm);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("Unable to byteswap user hwm in idmap "
+ "database: %s\n", nt_errstr(status)));
return False;
}
@@ -213,8 +215,10 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db)
wm = dom->low_id;
}
- if (dbwrap_store_int32(db, HWM_GROUP, wm) == -1) {
- DEBUG(0, ("Unable to byteswap group hwm in idmap database\n"));
+ status = dbwrap_store_int32(db, HWM_GROUP, wm);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("Unable to byteswap group hwm in idmap "
+ "database: %s\n", nt_errstr(status)));
return False;
}
}
@@ -235,8 +239,10 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db)
return False;
}
- if (dbwrap_store_int32(db, "IDMAP_VERSION", IDMAP_VERSION) == -1) {
- DEBUG(0, ("Unable to store idmap version in database\n"));
+ status = dbwrap_store_int32(db, "IDMAP_VERSION", IDMAP_VERSION);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("Unable to store idmap version in database: %s\n",
+ nt_errstr(status)));
return False;
}