From 35c3f4162d15f9846a645444e623178b78c52994 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 25 May 2009 11:29:14 +0200 Subject: [PATCH] s3:winbind:idmap_ldap: warn about duplicate XID->SID mappings (bug #6387) With the current infrastructure, we should not return error on duplicate mappings but just warn instead (because an error would trigger the attempt to create yet another mapping). Michael --- source3/winbindd/idmap_ldap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c index 854fd21df8e..63108040fd0 100644 --- a/source3/winbindd/idmap_ldap.c +++ b/source3/winbindd/idmap_ldap.c @@ -1055,6 +1055,14 @@ again: TALLOC_FREE(sidstr); continue; } + + if (map->status == ID_MAPPED) { + DEBUG(1, ("WARNING: duplicate %s mapping in LDAP. " + "overwriting mapping %u -> %s with %u -> %s\n", + (type == ID_TYPE_UID) ? "UID" : "GID", + id, sid_string_dbg(map->sid), id, sidstr)); + } + TALLOC_FREE(sidstr); /* mapped */ -- 2.11.4.GIT