From 205aa2b70d647460ca5a273caad7717312f53aab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Sep 2006 09:58:20 +0000 Subject: [PATCH] r18509: We must always canonicalise the usernames to be UPPERCASE DOMAIN, lowercase username. We cache names as keys in this form, and we weren't always returning this.... Jeremy. --- source/nsswitch/winbindd_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index cb1a8105413..a99115690d6 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -886,7 +886,8 @@ BOOL parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser, Also, if omit DOMAIN if 'winbind trusted domains only = true', as the username is then unqualified in unix - + + We always canonicalize as UPPERCASE DOMAIN, lowercase username. */ void fill_domain_username(fstring name, const char *domain, const char *user, BOOL can_assume) { @@ -896,7 +897,7 @@ void fill_domain_username(fstring name, const char *domain, const char *user, BO strlower_m(tmp_user); if (can_assume && assume_domain(domain)) { - strlcpy(name, user, sizeof(fstring)); + strlcpy(name, tmp_user, sizeof(fstring)); } else { slprintf(name, sizeof(fstring) - 1, "%s%c%s", domain, *lp_winbind_separator(), -- 2.11.4.GIT