From 815fdf23c782e8ace0d71d1fed6f7fe3be200731 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 16 Mar 2007 17:54:10 +0000 Subject: r21860: Fixes for "winbind normalize names" functionality: * Fix getgroups() call called using a normalized name * Fix some more name mappings that could cause for example a user to be unable to unlock the screen as the username would not match in the PAM authenticate call. (This used to be commit 505fc669a1b2c36e1639924b9639c97988056d8d) --- source3/nsswitch/winbindd_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/nsswitch/winbindd_user.c') diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c index acb81ee871..ce677198ff 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/nsswitch/winbindd_user.c @@ -243,7 +243,7 @@ static void getpwsid_queryuser_recv(void *private_data, BOOL success, strlower_m( username ); s->username = talloc_strdup(s->state->mem_ctx, username); - ws_name_replace( s->username, '_' ); + ws_name_replace( s->username, WB_REPLACE_CHAR ); s->fullname = talloc_strdup(s->state->mem_ctx, full_name); s->homedir = talloc_strdup(s->state->mem_ctx, homedir); @@ -345,6 +345,8 @@ void winbindd_getpwnam(struct winbindd_cli_state *state) DEBUG(3, ("[%5lu]: getpwnam %s\n", (unsigned long)state->pid, state->request.data.username)); + ws_name_return( state->request.data.username, WB_REPLACE_CHAR ); + if (!parse_domain_user(state->request.data.username, domname, username)) { DEBUG(5, ("Could not parse domain user: %s\n", -- cgit