summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-08-29 21:04:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:03:25 -0500
commit9fc539088eda7f9b5d212b7df50594bec51e16f5 (patch)
tree87f6a989b024e4ca4fe7cb7e35bb6b28ec27f69a /source
parent050364ef34b1e69260bd9df9e2140c45263e92f5 (diff)
downloadsamba-9fc539088eda7f9b5d212b7df50594bec51e16f5.tar.gz
samba-9fc539088eda7f9b5d212b7df50594bec51e16f5.tar.xz
samba-9fc539088eda7f9b5d212b7df50594bec51e16f5.zip
r9758: make sure to lower case usernames in winbindd's getpwnam()
Diffstat (limited to 'source')
-rw-r--r--source/nsswitch/winbindd_user.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_user.c b/source/nsswitch/winbindd_user.c
index ab5da3edd06..0b88d5eee5f 100644
--- a/source/nsswitch/winbindd_user.c
+++ b/source/nsswitch/winbindd_user.c
@@ -230,6 +230,7 @@ static void getpwsid_queryuser_recv(void *private_data, BOOL success,
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 @@ static void getpwsid_queryuser_recv(void *private_data, BOOL success,
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);