summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-05-25 11:29:14 +0200
committerMichael Adam <obnox@samba.org>2009-05-25 14:57:06 +0200
commit35c3f4162d15f9846a645444e623178b78c52994 (patch)
tree5a98b4841c775790e97d8ba65b7c18722ee4e000
parentfca7dce1a908570e463ddcbd663955fcafd1d843 (diff)
downloadsamba-35c3f4162d15f9846a645444e623178b78c52994.tar.gz
samba-35c3f4162d15f9846a645444e623178b78c52994.tar.bz2
samba-35c3f4162d15f9846a645444e623178b78c52994.zip
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
-rw-r--r--source3/winbindd/idmap_ldap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 854fd21df8..63108040fd 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 */