summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/winbindd/idmap_ldap.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index be1169d757..13295a620f 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -1256,14 +1256,23 @@ again:
goto again;
}
- ret = NT_STATUS_OK;
-
- /* mark all unknwon/expired ones as unmapped */
+ /*
+ * try to create new mappings for unmapped sids
+ */
for (i = 0; ids[i]; i++) {
- if (ids[i]->status != ID_MAPPED)
+ if (ids[i]->status != ID_MAPPED) {
ids[i]->status = ID_UNMAPPED;
+ if (ids[i]->sid != NULL) {
+ ret = idmap_ldap_new_mapping(dom, ids[i]);
+ if (!NT_STATUS_IS_OK(ret)) {
+ goto done;
+ }
+ }
+ }
}
+ ret = NT_STATUS_OK;
+
done:
talloc_free(memctx);
return ret;