diff options
author | Simo Sorce <idra@samba.org> | 2007-01-14 17:58:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:08 -0500 |
commit | c50c8d0dc31b95a98e09b1cfdd2e54e4bac336f2 (patch) | |
tree | 566e23e3e4956d2c01d48b779007fbbb4c7be21e /source3/nsswitch/idmap_tdb.c | |
parent | fb9a229643015fc6fea67bac9317f5d6a6283fc4 (diff) | |
download | samba-c50c8d0dc31b95a98e09b1cfdd2e54e4bac336f2.tar.gz samba-c50c8d0dc31b95a98e09b1cfdd2e54e4bac336f2.tar.bz2 samba-c50c8d0dc31b95a98e09b1cfdd2e54e4bac336f2.zip |
r20774: I thought I committed this before Xmas holidays ...
This change is needed to make it possible to not expire
caches in disconnected mode.
Jerry, please can you look at this and confirm it is ok?
Simo.
(This used to be commit 9e8715e4e15d9cede8f4aa9652642995392617e6)
Diffstat (limited to 'source3/nsswitch/idmap_tdb.c')
-rw-r--r-- | source3/nsswitch/idmap_tdb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/nsswitch/idmap_tdb.c b/source3/nsswitch/idmap_tdb.c index 4a382d4d89..ef004daa3e 100644 --- a/source3/nsswitch/idmap_tdb.c +++ b/source3/nsswitch/idmap_tdb.c @@ -809,7 +809,7 @@ static NTSTATUS idmap_tdb_unixids_to_sids(struct idmap_domain *dom, struct id_ma if (NT_STATUS_EQUAL(ret, NT_STATUS_NONE_MAPPED)) { /* make sure it is marked as unmapped */ - ids[i]->mapped = False; + ids[i]->status = ID_UNMAPPED; continue; } @@ -818,7 +818,7 @@ static NTSTATUS idmap_tdb_unixids_to_sids(struct idmap_domain *dom, struct id_ma } /* all ok, id is mapped */ - ids[i]->mapped = True; + ids[i]->status = ID_MAPPED; } ret = NT_STATUS_OK; @@ -847,7 +847,7 @@ static NTSTATUS idmap_tdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma if (NT_STATUS_EQUAL(ret, NT_STATUS_NONE_MAPPED)) { /* make sure it is marked as unmapped */ - ids[i]->mapped = False; + ids[i]->status = ID_UNMAPPED; continue; } @@ -856,7 +856,7 @@ static NTSTATUS idmap_tdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma } /* all ok, id is mapped */ - ids[i]->mapped = True; + ids[i]->status = ID_MAPPED; } ret = NT_STATUS_OK; @@ -1132,18 +1132,19 @@ static int idmap_tdb_dump_one_entry(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA val /* Try a UID record. */ if (sscanf(value.dptr, "UID %u", &(maps[num_maps].xid.id)) == 1) { maps[num_maps].xid.type = ID_TYPE_UID; - maps[num_maps].mapped = True; + maps[num_maps].status = ID_MAPPED; *data->num_maps = num_maps + 1; /* Try a GID record. */ } else if (sscanf(value.dptr, "GID %u", &(maps[num_maps].xid.id)) == 1) { maps[num_maps].xid.type = ID_TYPE_GID; - maps[num_maps].mapped = True; + maps[num_maps].status = ID_MAPPED; *data->num_maps = num_maps + 1; /* Unknown record type ! */ } else { + maps[num_maps].status = ID_UNKNOWN; DEBUG(2, ("Found INVALID record %s -> %s\n", key.dptr, value.dptr)); /* do not increment num_maps */ } |