diff options
author | Jim McDonough <jmcd@samba.org> | 2005-07-13 20:04:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:05 -0500 |
commit | 0446319a3b8096df385978449ffaa231bc5cfd0c (patch) | |
tree | b115937d86756f83c12b8bdc88e1a141f0a7fdef | |
parent | cd2c467cc46db1958aba7660f0ef7fd8af14bd63 (diff) | |
download | samba-0446319a3b8096df385978449ffaa231bc5cfd0c.tar.gz samba-0446319a3b8096df385978449ffaa231bc5cfd0c.tar.xz samba-0446319a3b8096df385978449ffaa231bc5cfd0c.zip |
r8432: Fix #2077 - login to trusted domain doesn't allow home drive map and login
scripts to be executed.
We were filling in our name as the server which processed the login, even
when it was done by a trusted DC.
Thanks to John Janosik <jpjanosi@us.ibm.com> for the fix.
-rw-r--r-- | source/auth/auth_util.c | 3 | ||||
-rw-r--r-- | source/include/auth.h | 2 | ||||
-rw-r--r-- | source/rpc_server/srv_netlog_nt.c | 9 |
3 files changed, 12 insertions, 2 deletions
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c index 49df15533a7..6624631b53d 100644 --- a/source/auth/auth_util.c +++ b/source/auth/auth_util.c @@ -1327,6 +1327,9 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, return nt_status; } + (*server_info)->login_server = unistr2_tdup(mem_ctx, + &(info3->uni_logon_srv)); + (*server_info)->ptok = token; SAFE_FREE(lgroupSIDs); diff --git a/source/include/auth.h b/source/include/auth.h index 91751e71804..7282f4d38b2 100644 --- a/source/include/auth.h +++ b/source/include/auth.h @@ -69,6 +69,8 @@ typedef struct auth_serversupplied_info DATA_BLOB user_session_key; DATA_BLOB lm_session_key; + + char *login_server; /* which server authorized the login? */ uint32 sam_fill_level; /* How far is this structure filled? */ diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c index a6fe9ef31af..7880a724b5c 100644 --- a/source/rpc_server/srv_netlog_nt.c +++ b/source/rpc_server/srv_netlog_nt.c @@ -764,8 +764,13 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * return NT_STATUS_UNSUCCESSFUL; } - pstrcpy(my_name, global_myname()); - + + if(server_info->login_server) { + pstrcpy(my_name, server_info->login_server); + } else { + pstrcpy(my_name, global_myname()); + } + if (!NT_STATUS_IS_OK(status = nt_token_to_group_list(p->mem_ctx, &domain_sid, |