svn commit: samba r18509 - in branches/SAMBA_3_0/source/nsswitch: .

jra at samba.org jra at samba.org
Thu Sep 14 09:58:20 GMT 2006


Author: jra
Date: 2006-09-14 09:58:20 +0000 (Thu, 14 Sep 2006)
New Revision: 18509

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18509

Log:
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.

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_util.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_util.c	2006-09-14 09:44:48 UTC (rev 18508)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_util.c	2006-09-14 09:58:20 UTC (rev 18509)
@@ -886,7 +886,8 @@
 
     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 @@
 	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(),



More information about the samba-cvs mailing list