summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_autorid.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-10-06 19:17:25 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:58 +0200
commitb4e528ab54bbca8968cf8f601dd65e3b80cad9a2 (patch)
tree2a80703c1945fb3bbecd16bcdc7a097436b2a589 /source3/winbindd/idmap_autorid.c
parent8750e3f22c9b62840fd7e90eb99b95204542a592 (diff)
downloadsamba-b4e528ab54bbca8968cf8f601dd65e3b80cad9a2.tar.gz
samba-b4e528ab54bbca8968cf8f601dd65e3b80cad9a2.tar.bz2
samba-b4e528ab54bbca8968cf8f601dd65e3b80cad9a2.zip
s3:idmap_autorid: untangle function from check and log status in idmap_autorid_db_init()
Diffstat (limited to 'source3/winbindd/idmap_autorid.c')
-rw-r--r--source3/winbindd/idmap_autorid.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index 780f533c56..d3e676b42f 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -336,6 +336,7 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
static NTSTATUS idmap_autorid_db_init(void)
{
int32_t hwm;
+ NTSTATUS status;
if (autorid_db) {
/* its already open */
@@ -355,11 +356,11 @@ static NTSTATUS idmap_autorid_db_init(void)
/* Initialize high water mark for the currently used range to 0 */
hwm = dbwrap_fetch_int32(autorid_db, HWM);
if ((hwm < 0)) {
- if (!NT_STATUS_IS_OK
- (dbwrap_trans_store_int32(autorid_db, HWM, 0))) {
+ status = dbwrap_trans_store_int32(autorid_db, HWM, 0);
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,
("Unable to initialise HWM in autorid "
- "database\n"));
+ "database: %s\n", nt_errstr(status)));
return NT_STATUS_INTERNAL_DB_ERROR;
}
}
@@ -367,11 +368,11 @@ static NTSTATUS idmap_autorid_db_init(void)
/* Initialize high water mark for alloc pool to 0 */
hwm = dbwrap_fetch_int32(autorid_db, ALLOC_HWM);
if ((hwm < 0)) {
- if (!NT_STATUS_IS_OK
- (dbwrap_trans_store_int32(autorid_db, ALLOC_HWM, 0))) {
+ status = dbwrap_trans_store_int32(autorid_db, ALLOC_HWM, 0);
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,
("Unable to initialise HWM in autorid "
- "database\n"));
+ "database: %s\n", nt_errstr(status)));
return NT_STATUS_INTERNAL_DB_ERROR;
}
}