diff options
Diffstat (limited to 'source3/nsswitch/idmap_ldap.c')
-rw-r--r-- | source3/nsswitch/idmap_ldap.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/nsswitch/idmap_ldap.c b/source3/nsswitch/idmap_ldap.c index 672d0b7979..0ebff71297 100644 --- a/source3/nsswitch/idmap_ldap.c +++ b/source3/nsswitch/idmap_ldap.c @@ -974,7 +974,7 @@ again: TALLOC_FREE(sidstr); /* mapped */ - map->mapped = True; + map->status = ID_MAPPED; DEBUG(10, ("Mapped %s -> %lu (%d)\n", sid_string_static(map->sid), (unsigned long)map->xid.id, map->xid.type)); } @@ -991,6 +991,12 @@ again: ret = NT_STATUS_OK; + + /* mark all unknwon ones as unmapped */ + for (i = 0; ids[i]; i++) { + if (ids[i]->status == ID_UNKNOWN) ids[i]->status = ID_UNMAPPED; + } + done: talloc_free(memctx); return ret; @@ -1169,7 +1175,7 @@ again: /* mapped */ map->xid.type = type; map->xid.id = id; - map->mapped = True; + map->status = ID_MAPPED; DEBUG(10, ("Mapped %s -> %lu (%d)\n", sid_string_static(map->sid), (unsigned long)map->xid.id, map->xid.type)); } @@ -1186,6 +1192,11 @@ again: ret = NT_STATUS_OK; + /* mark all unknwon ones as unmapped */ + for (i = 0; ids[i]; i++) { + if (ids[i]->status == ID_UNKNOWN) ids[i]->status = ID_UNMAPPED; + } + done: talloc_free(memctx); return ret; |