summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-12 00:30:52 +0100
committerGünther Deschner <gd@samba.org>2010-03-12 00:37:30 +0100
commit8194fc37571257d4b5df3e78f5e38e914b18dc43 (patch)
treef2c0d2fa6135007e579f31c1ef3abbe1c57a60f9
parent1a10a5949d9f2148bdcd61a864104e5c305f8a59 (diff)
downloadsamba-8194fc37571257d4b5df3e78f5e38e914b18dc43.tar.gz
samba-8194fc37571257d4b5df3e78f5e38e914b18dc43.tar.bz2
samba-8194fc37571257d4b5df3e78f5e38e914b18dc43.zip
s3-netlogon: Fix bug #7237: _netr_SamLogon segfaults for clients sending NULL domain.
Thanks to Marc Muehlfeld <muehlfeld@medizinische-genetik.de>. Guenther
-rw-r--r--source3/rpc_server/srv_netlog_nt.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index b9bfda9a83..b41b3d1070 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -1142,17 +1142,23 @@ static NTSTATUS _netr_LogonSamLogon_base(pipes_struct *p,
case NetlogonServiceInformation:
case NetlogonInteractiveTransitiveInformation:
case NetlogonServiceTransitiveInformation:
- nt_username = logon->password->identity_info.account_name.string;
- nt_domain = logon->password->identity_info.domain_name.string;
- nt_workstation = logon->password->identity_info.workstation.string;
+ nt_username = logon->password->identity_info.account_name.string ?
+ logon->password->identity_info.account_name.string : "";
+ nt_domain = logon->password->identity_info.domain_name.string ?
+ logon->password->identity_info.domain_name.string : "";
+ nt_workstation = logon->password->identity_info.workstation.string ?
+ logon->password->identity_info.workstation.string : "";
DEBUG(3,("SAM Logon (Interactive). Domain:[%s]. ", lp_workgroup()));
break;
case NetlogonNetworkInformation:
case NetlogonNetworkTransitiveInformation:
- nt_username = logon->network->identity_info.account_name.string;
- nt_domain = logon->network->identity_info.domain_name.string;
- nt_workstation = logon->network->identity_info.workstation.string;
+ nt_username = logon->network->identity_info.account_name.string ?
+ logon->network->identity_info.account_name.string : "";
+ nt_domain = logon->network->identity_info.domain_name.string ?
+ logon->network->identity_info.domain_name.string : "";
+ nt_workstation = logon->network->identity_info.workstation.string ?
+ logon->network->identity_info.workstation.string : "";
DEBUG(3,("SAM Logon (Network). Domain:[%s]. ", lp_workgroup()));
break;