diff options
author | Gerald Carter <jerry@samba.org> | 2004-10-22 20:15:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:02 -0500 |
commit | 841868d290400272e50bcfb5fadd7b9dba4638b6 (patch) | |
tree | 425623d79a6a142c798bcb586e573b6239578dd9 /source3/nsswitch/winbindd_util.c | |
parent | 2d7cd5375e4e5ddd7ca9cb32f18358bf8ffd44a1 (diff) | |
download | samba-841868d290400272e50bcfb5fadd7b9dba4638b6.tar.gz samba-841868d290400272e50bcfb5fadd7b9dba4638b6.tar.bz2 samba-841868d290400272e50bcfb5fadd7b9dba4638b6.zip |
r3140: * try to ensure consistent usage of the username map.
Use the fully qualified DOMAIN\user format for 'security = domain|ads'
and apply after authentication has succeeded.
* also change fill_domain_username() to only lowercase the username
and not the domain+username. This was a cosmetic fix only.
makes the output more consistent with %D and %U.
(This used to be commit 30ee2d5b0906d5cd73a8faf5170e5aebcc6d69c8)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 6600690538..a96f652c61 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -641,14 +641,15 @@ BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) */ void fill_domain_username(fstring name, const char *domain, const char *user) { + strlower_m( name ); + if (assume_domain(domain)) { strlcpy(name, user, sizeof(fstring)); } else { - slprintf(name, sizeof(fstring) - 1, "%s%s%s", - domain, lp_winbind_separator(), + slprintf(name, sizeof(fstring) - 1, "%s%c%s", + domain, *lp_winbind_separator(), user); } - strlower_m(name); } /* |