From 0a2048d909b0c234a62c26a1463d1998969b2f33 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 27 Aug 2004 16:15:23 +0000 Subject: r2091: only use sAMAccountName and not userPrincipalName since the breaks winbindd (lookup_name() only works with the sAMAccountName) -- *please* test this change. My tests all pass but there is probably something I missed --- source/libads/ldap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/libads/ldap.c b/source/libads/ldap.c index 78ea9f1497d..d1539b83da7 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -2184,13 +2184,19 @@ BOOL ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, */ char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, void *msg) { +#if 0 /* JERRY */ char *ret, *p; + /* lookup_name() only works on the sAMAccountName to + returning the username portion of userPrincipalName + breaks winbindd_getpwnam() */ + ret = ads_pull_string(ads, mem_ctx, msg, "userPrincipalName"); if (ret && (p = strchr(ret, '@'))) { *p = 0; return ret; } +#endif return ads_pull_string(ads, mem_ctx, msg, "sAMAccountName"); } -- cgit