diff options
author | Gerald Carter <jerry@samba.org> | 2004-03-16 16:41:54 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-03-16 16:41:54 +0000 |
commit | d24b8a2032a2e92d954781e610ab535361fefd88 (patch) | |
tree | 0f509e01c295b3001153a341225dc4cdedd49b4a /source3/auth/auth_server.c | |
parent | 96c5a010bb42b268b441f776ac44cad84d5f2261 (diff) | |
download | samba-d24b8a2032a2e92d954781e610ab535361fefd88.tar.gz samba-d24b8a2032a2e92d954781e610ab535361fefd88.tar.bz2 samba-d24b8a2032a2e92d954781e610ab535361fefd88.zip |
BUG 1165, 1126: Fix bug with secondary groups (security = ads) and winbind use default domain = yes
(This used to be commit f2eaa14b1eb7e89c945b2b06a48e17998c75d620)
Diffstat (limited to 'source3/auth/auth_server.c')
-rw-r--r-- | source3/auth/auth_server.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 41adc21784..bc611ec229 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -377,18 +377,17 @@ use this machine as the password server.\n")); cli_ulogoff(cli); if (NT_STATUS_IS_OK(nt_status)) { - struct passwd *pass = Get_Pwnam(user_info->internal_username.str); - if (pass) { - nt_status = make_server_info_pw(server_info, pass); - } else { - auth_add_user_script(user_info->domain.str, user_info->internal_username.str); - pass = Get_Pwnam(user_info->internal_username.str); + fstring real_username; + struct passwd *pass; - if (pass) { - nt_status = make_server_info_pw(server_info, pass); - } else { - nt_status = NT_STATUS_NO_SUCH_USER; - } + if ( (pass = smb_getpwnam( user_info->internal_username.str, + real_username, True )) != NULL ) + { + nt_status = make_server_info_pw(server_info, pass->pw_name, pass); + } + else + { + nt_status = NT_STATUS_NO_SUCH_USER; } } |