diff options
Diffstat (limited to 'source3/winbindd/idmap_tdb.c')
-rw-r--r-- | source3/winbindd/idmap_tdb.c | 18 |
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; } |