summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/lib/util.c3
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c6
-rw-r--r--source3/smbd/sesssetup.c15
4 files changed, 25 insertions, 1 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index e96d664bd3..ddc1adff4e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1408,7 +1408,7 @@ enum ldap_ssl_types {LDAP_SSL_ON, LDAP_SSL_OFF, LDAP_SSL_START_TLS};
enum ldap_passwd_sync_types {LDAP_PASSWD_SYNC_ON, LDAP_PASSWD_SYNC_OFF, LDAP_PASSWD_SYNC_ONLY};
/* Remote architectures we know about. */
-enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, RA_WIN2K, RA_SAMBA};
+enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, RA_WIN2K, RA_WINXP, RA_SAMBA};
/* case handling */
enum case_handling {CASE_LOWER,CASE_UPPER};
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 3958600cbd..15b75356a8 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1764,6 +1764,9 @@ void set_remote_arch(enum remote_arch_types type)
case RA_WIN2K:
fstrcpy(remote_arch, "Win2K");
return;
+ case RA_WINXP:
+ fstrcpy(remote_arch, "WinXP");
+ return;
case RA_SAMBA:
fstrcpy(remote_arch,"Samba");
return;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index fa9b8eaeff..4006d0c08e 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1675,6 +1675,12 @@ Can't find printer handle we created for printer %s\n", name ));
&Printer->nt_devmode );
}
+ /* HACK ALERT!!! Sleep for 1/3 of a second to try trigger a LAN/WAN
+ optimization in Windows 2000 clients --jerry */
+
+ if ( RA_WIN2K == get_remote_arch() )
+ usleep( 384000 );
+
return WERR_OK;
}
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index eafe805aba..b0ef78f447 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -581,6 +581,21 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,
p += srvstr_pull_buf(inbuf, native_lanman, p, sizeof(native_lanman), STR_TERMINATE);
DEBUG(3,("Domain=[%s] NativeOS=[%s] NativeLanMan=[%s]\n",
domain,native_os,native_lanman));
+
+ /*
+ * 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"
+ */
+
+ if ( ra_type == RA_WIN2K ) {
+ if ( 0 == strcmp( native_lanman, "Windows 2002 5.1" ) )
+ set_remote_arch( RA_WINXP );
+ }
+
+
}
DEBUG(3,("sesssetupX:name=[%s]\\[%s]@[%s]\n", domain, user, get_remote_machine_name()));