summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-03-14 23:11:19 +0000
committerGerald Carter <jerry@samba.org>2003-03-14 23:11:19 +0000
commit7ae555c43c55ab95f75fb4afdd3d2bcb403ad3b3 (patch)
tree2d2cfac8e84ec41a1bc7a5c178784be2fd5b4233 /source3/lib/util.c
parent9db9982cd34d36d8b23e94a4063761c8b6aa9e17 (diff)
downloadsamba-7ae555c43c55ab95f75fb4afdd3d2bcb403ad3b3.tar.gz
samba-7ae555c43c55ab95f75fb4afdd3d2bcb403ad3b3.tar.bz2
samba-7ae555c43c55ab95f75fb4afdd3d2bcb403ad3b3.zip
fix WinXP & Win2K3 remote_arch and check pointer in ntlmssp code before dereferencing
(This used to be commit 2487480228b99183cab9e34ab497997e0c144ed6)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 8d62db5ebb..77ffa70a47 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1741,6 +1741,22 @@ BOOL is_myworkgroup(const char *s)
}
/*******************************************************************
+ we distinguish between 2K and XP by the "Native Lan Manager" string
+ WinXP => "Windows 2002 5.1"
+ Win2k => "Windows 2000 5.0"
+ NT4 => "Windows NT 4.0"
+ Win9x => "Windows 4.0"
+********************************************************************/
+
+void ra_lanman_string( const char *native_lanman )
+{
+ if ( 0 == strcmp( native_lanman, "Windows 2002 5.1" ) )
+ set_remote_arch( RA_WINXP );
+ else if ( 0 == strcmp( native_lanman, "Windows .NET 5.2" ) )
+ set_remote_arch( RA_WIN2K3 );
+}
+
+/*******************************************************************
Set the horrid remote_arch string based on an enum.
********************************************************************/