diff options
author | Samba Release Account <samba-bugs@samba.org> | 1996-08-09 18:05:34 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1996-08-09 18:05:34 +0000 |
commit | 02b98a8965a60a7c3394835ff01074fc88ffbb89 (patch) | |
tree | 4d387b6b0abdcf6b33ab567283e5b6928aa611b9 /source3/namelogon.c | |
parent | 6d3eb881e284659262fd78c6ad269d6882e1f8cd (diff) | |
download | samba-02b98a8965a60a7c3394835ff01074fc88ffbb89.tar.gz samba-02b98a8965a60a7c3394835ff01074fc88ffbb89.tar.xz samba-02b98a8965a60a7c3394835ff01074fc88ffbb89.zip |
applying login updates from jim@oxfordcc.co.uk, sent in by
lewis2@server.uwindsor.ca. rest of this patch to follow.
bug in interface.c - uninitialised pointer.
nmbd has 0x20 as well as 0x0 NetBIOS name when lmhosts entry is added.
lkcl
(This used to be commit 2b9475cc5fda4b272f19c4f168d3f00363c8042b)
Diffstat (limited to 'source3/namelogon.c')
-rw-r--r-- | source3/namelogon.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/source3/namelogon.c b/source3/namelogon.c index 8a7fe87965c..24bb9842474 100644 --- a/source3/namelogon.c +++ b/source3/namelogon.c @@ -38,6 +38,10 @@ extern pstring myname; /**************************************************************************** process a domain logon packet + + 08aug96 lkcl@pires.co.uk + reply_code == 0xC courtesy of jim@oxfordcc.co.uk forwarded by + lewis2@server.uwindsor.ca **************************************************************************/ void process_logon_packet(struct packet_struct *p,char *buf,int len) { @@ -87,11 +91,11 @@ void process_logon_packet(struct packet_struct *p,char *buf,int len) reply_code = 7; reply_name = lp_domain_controller(); if (!*reply_name) { - DEBUG(3,("No domain controller configured\n")); - return; + reply_name = myname; + reply_code = 0xC; } - DEBUG(3,("GETDC request from %s(%s)\n", - machine,inet_ntoa(p->ip))); + DEBUG(3,("GETDC request from %s(%s), reporting %s 0x%2x\n", + machine,inet_ntoa(p->ip), reply_name, reply_code)); } break; default: @@ -110,6 +114,28 @@ void process_logon_packet(struct packet_struct *p,char *buf,int len) StrnCpy(q,reply_name,16); strupper(q); q = skip_string(q,1); + + if (reply_code == 0xC) + { + if ( PTR_DIFF (q,outbuf) & 1 ) + { + q++; + } + + StrnCpy(q,reply_name,16); + strupper(q); + q = skip_string(q,1); + + StrnCpy(q,lp_workgroup(),16); + strupper(q); + q = skip_string(q,1); + + SIVAL(q,0,1); + q += 4; + SSVAL(q,0,0xFFFF); + q += 2; + } + SSVAL(q,0,0xFFFF); q += 2; |