summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_ldap.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-05-26 09:26:47 +1000
committerAndrew Tridgell <tridge@samba.org>2009-05-26 09:26:47 +1000
commitecdad56b6eedad4a4d8031477827c522cdf6d76e (patch)
treeee924581609a5ddfca9992630502a53f7540db87 /source3/winbindd/idmap_ldap.c
parente15027155d3d880abde83124e252b3dd10a9aae4 (diff)
parent714acfac013a46c3677c3eb72ad57db6d97c7d61 (diff)
downloadsamba-ecdad56b6eedad4a4d8031477827c522cdf6d76e.tar.gz
samba-ecdad56b6eedad4a4d8031477827c522cdf6d76e.tar.bz2
samba-ecdad56b6eedad4a4d8031477827c522cdf6d76e.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/winbindd/idmap_ldap.c')
-rw-r--r--source3/winbindd/idmap_ldap.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 854fd21df8..88ece8c7de 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 */
@@ -1249,8 +1257,6 @@ again:
continue;
}
- TALLOC_FREE(sidstr);
-
/* now try to see if it is a uid, if not try with a gid
* (gid is more common, but in case both uidNumber and
* gidNumber are returned the SID is mapped to the uid
@@ -1268,6 +1274,7 @@ again:
if ( ! tmp) { /* no ids ?? */
DEBUG(5, ("no uidNumber, "
"nor gidNumber attributes found\n"));
+ TALLOC_FREE(sidstr);
continue;
}
@@ -1278,11 +1285,21 @@ again:
DEBUG(5, ("Requested id (%u) out of range (%u - %u). "
"Filtered!\n", id,
ctx->filter_low_id, ctx->filter_high_id));
+ TALLOC_FREE(sidstr);
TALLOC_FREE(tmp);
continue;
}
TALLOC_FREE(tmp);
+ if (map->status == ID_MAPPED) {
+ DEBUG(1, ("WARNING: duplicate %s mapping in LDAP. "
+ "overwriting mapping %s -> %u with %s -> %u\n",
+ (type == ID_TYPE_UID) ? "UID" : "GID",
+ sidstr, map->xid.id, sidstr, id));
+ }
+
+ TALLOC_FREE(sidstr);
+
/* mapped */
map->xid.type = type;
map->xid.id = id;