2.2.0-alpha1 "unexpected network error"
Robert Dahlem
Robert.Dahlem at gmx.net
Mon Dec 11 18:06:03 GMT 2000
Hi,
On Wed, 06 Dec 2000 10:11:55 +0100, Robert Dahlem wrote:
>At least I got 2.2.0-alpha1 to compile on my Reliant Unix 5.43 (32
>bit system, formerly known as SINIX).
> [...]
>But whenever I try to use anything (clicking on the share in Explorer
>or "DIR X:") the beast tells me something like "Unexpected Network
>error. Retry?" (roughly translated from german). Debug logs up to
>level 5 show nothing unusual.
BTW: I#ve been hit by the same problem on my Linux box.
>Anything I can do to hunt this down?
Well, nobody seems to be really interested, so I tried my luck myself.
:-)
I found out that the problem occurs only when there is a file not
matching the 8.3 conventions. I modified tcpdump a bit and found that
the problem is in the answer to a trans2 findfirst/findnext request,
when the info level is SMB_FIND_FILE_BOTH_DIRECTORY_INFO. This one
returns filename, attributes, dates and a ShortName together with a
ShortNameLength.
ShortNameLength is never higher than 12 (8+the_dot+3 ?) in 2.0.7 but
gets the real file name length in 2.2.0-alpha1.
Former code (in smbd/trans2.c:get_lanman2_dir_entry()) was:
if (!was_8_3) {
pstrcpy(p+2,fname);
if (!name_map_mangle(p+2,True,True,SNUM(conn)))
(p+2)[12] = 0;
} else
*(p+2) = 0;
strupper(p+2);
SSVAL(p,0,strlen(p+2));
p += 2 + 24;
and now is:
if (!was_8_3) {
fstrcpy(p+2,fname);
name_map_mangle(p+2,True,True,SNUM(conn));
strupper(p+2);
SSVAL(p, 0, strlen(p+2));
} else {
SSVAL(p,0,0);
*(p+2) = 0;
}
p += 2 + 24;
As soon as I re-insert "(p+2)[12] = 0;" after name_map_mangle(), the
problem disappears.
I'm not confident enough with my own knowledge, so could please anyone
comment on this?
Regards,
Robert
--
---------------------------------------------------------------
Robert.Dahlem at gmx.net Fax +49-69-432647
---------------------------------------------------------------
Sent using PMMail (http://www.pmmail2000.com) - fast, decent, email
software; far better than Outlook. Try it sometime.
More information about the samba-technical
mailing list