svn commit: samba r9758 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

jerry at samba.org jerry at samba.org
Mon Aug 29 21:04:22 GMT 2005


Author: jerry
Date: 2005-08-29 21:04:22 +0000 (Mon, 29 Aug 2005)
New Revision: 9758

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

Log:
make sure to lower case usernames in winbindd's getpwnam()


Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_user.c
   trunk/source/nsswitch/winbindd_user.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_user.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_user.c	2005-08-29 20:51:21 UTC (rev 9757)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_user.c	2005-08-29 21:04:22 UTC (rev 9758)
@@ -230,6 +230,7 @@
 				    const char *shell,
 				    uint32 group_rid)
 {
+	fstring username;
 	struct getpwsid_state *s =
 		talloc_get_type_abort(private_data, struct getpwsid_state);
 
@@ -240,7 +241,9 @@
 		return;
 	}
 
-	s->username = talloc_strdup(s->state->mem_ctx, acct_name);
+	fstrcpy( username, acct_name );
+	strlower_m( username );
+	s->username = talloc_strdup(s->state->mem_ctx, username);
 	s->fullname = talloc_strdup(s->state->mem_ctx, full_name);
 	s->homedir = talloc_strdup(s->state->mem_ctx, homedir);
 	s->shell = talloc_strdup(s->state->mem_ctx, shell);

Modified: trunk/source/nsswitch/winbindd_user.c
===================================================================
--- trunk/source/nsswitch/winbindd_user.c	2005-08-29 20:51:21 UTC (rev 9757)
+++ trunk/source/nsswitch/winbindd_user.c	2005-08-29 21:04:22 UTC (rev 9758)
@@ -230,6 +230,7 @@
 				    const char *shell,
 				    uint32 group_rid)
 {
+	fstring username;
 	struct getpwsid_state *s =
 		talloc_get_type_abort(private_data, struct getpwsid_state);
 
@@ -240,7 +241,9 @@
 		return;
 	}
 
-	s->username = talloc_strdup(s->state->mem_ctx, acct_name);
+	fstrcpy( username, acct_name );
+	strlower_m( username );
+	s->username = talloc_strdup(s->state->mem_ctx, username);
 	s->fullname = talloc_strdup(s->state->mem_ctx, full_name);
 	s->homedir = talloc_strdup(s->state->mem_ctx, homedir);
 	s->shell = talloc_strdup(s->state->mem_ctx, shell);



More information about the samba-cvs mailing list