summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-03-18 07:37:39 +0000
committerVolker Lendecke <vlendec@samba.org>2004-03-18 07:37:39 +0000
commitef8eae0688a8c9da20c187b9d5cd6a1e4f425142 (patch)
tree1deb146309c1e2441a8fe66d348a2266ed6f4732
parent38cbf8f61ca8c57efc6f1a97e7f145f0103fdced (diff)
downloadsamba-ef8eae0688a8c9da20c187b9d5cd6a1e4f425142.tar.gz
samba-ef8eae0688a8c9da20c187b9d5cd6a1e4f425142.tar.bz2
samba-ef8eae0688a8c9da20c187b9d5cd6a1e4f425142.zip
Fix sambaUserWorkstations for network samlogons against us as DC. Strip
the \\ off the workstation. Volker (This used to be commit a409dd55e857e692a90124bf46575752935cc78b)
-rw-r--r--source3/rpc_server/srv_netlog_nt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 2f301a794c..51ed79980c 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -598,14 +598,22 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
switch (ctr->switch_value) {
case NET_LOGON_TYPE:
{
+ const char *wksname = nt_workstation;
+
if (!NT_STATUS_IS_OK(status = make_auth_context_fixed(&auth_context, ctr->auth.id2.lm_chal))) {
return status;
}
+ /* For a network logon, the workstation name comes in with two
+ * backslashes in the front. Strip them if they are there. */
+
+ if (*wksname == '\\') wksname++;
+ if (*wksname == '\\') wksname++;
+
/* Standard challenge/response authenticaion */
if (!make_user_info_netlogon_network(&user_info,
nt_username, nt_domain,
- nt_workstation,
+ wksname,
ctr->auth.id2.lm_chal_resp.buffer,
ctr->auth.id2.lm_chal_resp.str_str_len,
ctr->auth.id2.nt_chal_resp.buffer,