summaryrefslogtreecommitdiff
path: root/source3/sam/idmap_tdb.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-06-25 00:28:46 +0000
committerJeremy Allison <jra@samba.org>2003-06-25 00:28:46 +0000
commit911fbd5cdbb9653d2ddc34c02e8229f4dcff7628 (patch)
treea75822afb745d3ffeea16033982706eff771d73e /source3/sam/idmap_tdb.c
parentdba0005a9d1ff2cf2528533a5557c36936fc8edf (diff)
downloadsamba-911fbd5cdbb9653d2ddc34c02e8229f4dcff7628.tar.gz
samba-911fbd5cdbb9653d2ddc34c02e8229f4dcff7628.tar.bz2
samba-911fbd5cdbb9653d2ddc34c02e8229f4dcff7628.zip
More debugs for this... (these should have been here already !).
Jeremy. (This used to be commit a118648d9505d54850ffad1e9ce7a2c3d279df9f)
Diffstat (limited to 'source3/sam/idmap_tdb.c')
-rw-r--r--source3/sam/idmap_tdb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/sam/idmap_tdb.c b/source3/sam/idmap_tdb.c
index 8fb9cfd36c..d494759a2b 100644
--- a/source3/sam/idmap_tdb.c
+++ b/source3/sam/idmap_tdb.c
@@ -311,11 +311,18 @@ static NTSTATUS db_get_id_from_sid(unid_t *id, int *id_type, const DOM_SID *sid)
ret = NT_STATUS_OK;
break;
}
+ if (tdb_error(idmap_tdb) != TDB_ERR_EXISTS)
+ DEBUG(10,("db_get_id_from_sid: error %s\n", tdb_errorstr(idmap_tdb) ));
ret = NT_STATUS_UNSUCCESSFUL;
- } while (idmap_tdb->ecode == TDB_ERR_EXISTS);
+ } while (tdb_error(idmap_tdb) == TDB_ERR_EXISTS);
if (NT_STATUS_IS_OK(ret)) {
+
+ DEBUG(10,("db_get_id_from_sid: storing %s -> %s\n",
+ sid_data.dptr, ugid_data.dptr ));
+
if (tdb_store(idmap_tdb, sid_data, ugid_data, TDB_REPLACE) == -1) {
+ DEBUG(10,("db_get_id_from_sid: error %s\n", tdb_errorstr(idmap_tdb) ));
/* TODO: print tdb error !! */
return NT_STATUS_UNSUCCESSFUL;
}