From 58cb5163f269f11ecf2846bb00022d0b382af1d7 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 17 Jun 2010 21:55:02 +0200 Subject: s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids() --- source3/winbindd/idmap_ldap.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'source3') 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; -- cgit