diff options
author | Michael Adam <obnox@samba.org> | 2011-10-06 21:29:04 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 15:51:00 +0200 |
commit | 67600117610eda2bd7ad2802bcc7a9147720e659 (patch) | |
tree | 1937d78a7dff356d404eb4bb9ba6109a408c4a41 /source3/winbindd | |
parent | c9bc1e492404077c6b40b5cefe33e859503a4227 (diff) | |
download | samba-67600117610eda2bd7ad2802bcc7a9147720e659.tar.gz samba-67600117610eda2bd7ad2802bcc7a9147720e659.tar.bz2 samba-67600117610eda2bd7ad2802bcc7a9147720e659.zip |
s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type
for consistency and better error propagation
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/idmap_tdb.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 339655f044..1d1ba64c21 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -251,7 +251,6 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db) static NTSTATUS idmap_tdb_init_hwm(struct idmap_domain *dom) { - int ret; uint32_t low_uid; uint32_t low_gid; bool update_uid = false; @@ -281,21 +280,21 @@ static NTSTATUS idmap_tdb_init_hwm(struct idmap_domain *dom) } if (update_uid) { - ret = dbwrap_store_uint32(ctx->db, HWM_USER, dom->low_id); - if (ret == -1) { + status = dbwrap_store_uint32(ctx->db, HWM_USER, dom->low_id); + if (!NT_STATUS_IS_OK(status)) { dbwrap_transaction_cancel(ctx->db); DEBUG(0, ("Unable to initialise user hwm in idmap " - "database\n")); + "database: %s\n", nt_errstr(status))); return NT_STATUS_INTERNAL_DB_ERROR; } } if (update_gid) { - ret = dbwrap_store_uint32(ctx->db, HWM_GROUP, dom->low_id); - if (ret == -1) { + status = dbwrap_store_uint32(ctx->db, HWM_GROUP, dom->low_id); + if (!NT_STATUS_IS_OK(status)) { dbwrap_transaction_cancel(ctx->db); DEBUG(0, ("Unable to initialise group hwm in idmap " - "database\n")); + "database: %s\n", nt_errstr(status))); return NT_STATUS_INTERNAL_DB_ERROR; } } |