summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-03-15 14:47:00 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-03-15 14:47:00 +0000
commit86b0018cc7e246910a9a621b2bf379f782506a08 (patch)
tree25024d3d9ec3d9b6ff10e5852258923cb928a8a1
parent0c1db06e77e8129fb02d21cf389b6fbe6d17c564 (diff)
downloadsamba-86b0018cc7e246910a9a621b2bf379f782506a08.tar.gz
JHT ===> Moved MAJOR_VERSION and MINOR_VERSION defines to smb.h
Made version info consistent in ipc.c and nameannounce.c Added define for BROWSER_ELECTION_VALUE and BROWSER_CONSTANT (see do_announce_host() in nameannounce.c). Sniffing with the latest bloodhound I found that the byte range occupied by the BROWSER_ELECTION_VALUE is interpreted depending on the type of announcement being made. In a Local_Master_Announcement it is BROWSER_ELECTION_VALUE but in both Workgroup_Announcement and Host_Announcement this is seen as Comment_String_Pointer. What does this mean? We need to know?
-rw-r--r--source/include/smb.h10
-rw-r--r--source/nameannounce.c9
-rw-r--r--source/smbd/ipc.c3
3 files changed, 14 insertions, 8 deletions
diff --git a/source/include/smb.h b/source/include/smb.h
index e9d74befc23..506bbb9b165 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -794,7 +794,15 @@ char *Strstr(char *s, char *p);
#define SV_TYPE_DOMAIN_ENUM 0x80000000
#define SV_TYPE_ALL 0xFFFFFFFF
-/* what server type are we currently */
+/* what server type are we currently - JHT Says we ARE 4.10 */
+/* this was set by JHT in liaison with Andrew Tridgell early 1996 */
+/* setting to 4.10 at same time as announcing ourselves as NT Server */
+#define MAJOR_VERSION 0x04
+#define MINOR_VERSION 0x01
+
+/* Browser Election Values */
+#define BROWSER_ELECT_VERSION 0x010f
+#define BROWSER_CONSTANT 0xaa55
/* Capabilities. see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */
diff --git a/source/nameannounce.c b/source/nameannounce.c
index 990be00602d..8dc0668f4ed 100644
--- a/source/nameannounce.c
+++ b/source/nameannounce.c
@@ -160,12 +160,13 @@ void do_announce_host(int command,
StrnCpy(p+5,server_name,16);
strupper(p+5);
- CVAL(p,21) = 0x02; /* major version */
- CVAL(p,22) = 0x02; /* minor version */
+ CVAL(p,21) = MAJOR_VERSION; /* major version */
+ CVAL(p,22) = MINOR_VERSION; /* minor version */
SIVAL(p,23,server_type);
- SSVAL(p,27,0x010f); /* browse version: got from NT/AS 4.00 */
- SSVAL(p,29,0xaa55); /* browse signature */
+ /* browse version: got from NT/AS 4.00 - Value defined in smb.h (JHT)*/
+ SSVAL(p,27,BROWSER_ELECTION_VERSION);
+ SSVAL(p,29,BROWSER_CONSTANT); /* browse signature */
strcpy(p+31,server_comment);
p += 31;
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index 9f8369912c9..3a2df56b3e2 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -60,9 +60,6 @@ extern fstring local_machine;
#define SNLEN 15 /* service name length */
#define QNLEN 12 /* queue name maximum length */
-#define MAJOR_VERSION 4
-#define MINOR_VERSION 1
-
extern int Client;
static BOOL api_Unsupported(int cnum,uint16 vuid, char *param,char *data,