--- heimdal-1.3.2/lib/hdb/hdb-ldap.c.searchsambabyuid 2010-03-22 05:11:24.000000000 +0100 +++ heimdal-1.3.2/lib/hdb/hdb-ldap.c 2010-05-11 21:25:12.000000000 +0100 @@ -886,7 +886,7 @@ ldap_msgfree(*msg); *msg = NULL; - ret = escape_value(context, princname, "e); + ret = escape_value(context, userid, "e); if (ret) goto out;