summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-17 21:55:02 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:54 +0200
commit58cb5163f269f11ecf2846bb00022d0b382af1d7 (patch)
tree65e8ef0ddfbd19971b67d16c8dc7b10190b88c40
parent26c82596d95d31dc3d141656266123ca1fff8644 (diff)
downloadsamba-58cb5163f269f11ecf2846bb00022d0b382af1d7.tar.gz
samba-58cb5163f269f11ecf2846bb00022d0b382af1d7.tar.bz2
samba-58cb5163f269f11ecf2846bb00022d0b382af1d7.zip
s3:idmap_ldap: create mappings for unmapped sids in idmap_ldap_sids_to_unixids()
-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;