summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-14 09:58:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:45 -0500
commit415c75f320ff44fd6e297e969737a38dee17877d (patch)
treee4c3f695d425f61bd16bdbd2f228ce28fd4cdf55 /source3
parentdda94fdf96e9a2ec77e98ed6304ffb94252e4c7c (diff)
downloadsamba-415c75f320ff44fd6e297e969737a38dee17877d.tar.gz
samba-415c75f320ff44fd6e297e969737a38dee17877d.tar.xz
samba-415c75f320ff44fd6e297e969737a38dee17877d.zip
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. (This used to be commit 205aa2b70d647460ca5a273caad7717312f53aab)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index cb1a8105413..a99115690d6 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/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(),