From 911fbd5cdbb9653d2ddc34c02e8229f4dcff7628 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 25 Jun 2003 00:28:46 +0000 Subject: More debugs for this... (these should have been here already !). Jeremy. (This used to be commit a118648d9505d54850ffad1e9ce7a2c3d279df9f) --- source3/sam/idmap_tdb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/sam') 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; } -- cgit