summaryrefslogtreecommitdiff
path: root/source3/auth/auth_server.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-03-16 16:44:54 +0000
committerGerald Carter <jerry@samba.org>2004-03-16 16:44:54 +0000
commit1df61db0720b0d5372ffb43cf2fd60d72e438728 (patch)
tree10caaaceb0a5c79e7e2d2f464af9c1413bc28726 /source3/auth/auth_server.c
parent76e86e88c3d578ad47d4bc9ef7e8e6c035715dea (diff)
downloadsamba-1df61db0720b0d5372ffb43cf2fd60d72e438728.tar.gz
samba-1df61db0720b0d5372ffb43cf2fd60d72e438728.tar.bz2
samba-1df61db0720b0d5372ffb43cf2fd60d72e438728.zip
BUG 1165, 1126: Fix bug with secondary groups (security = ads) and winbind use default domain = yes
(This used to be commit ca971cf76e5fbb33d51b1fdfa92e4d13b2e150b6)
Diffstat (limited to 'source3/auth/auth_server.c')
-rw-r--r--source3/auth/auth_server.c21
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;
}
}