Name mangling bug: was samba bug?

MCCALL,DON (HP-USA,ex1) don_mccall at hp.com
Wed Sep 26 15:46:01 GMT 2001


Hi James;

Well, "should" is such a relative concept... ;->
But looking at a log level 10, we can see that samba is indeed mangling
foo...
  
[2001/09/26 11:23:58, 5] smbd/trans2.c:(447)
  get_lanman2_dir_entry found ./foo... fname=foo...
[2001/09/26 11:23:58, 5] smbd/mangle.c:(989)
  name_map_mangle( foo..., need83 = FALSE, cache83 = TRUE, 1 )
[2001/09/26 11:23:58, 5] smbd/mangle.c:(1024)
  name_map_mangle() ==> [foo...]
[2001/09/26 11:23:58, 5] smbd/mangle.c:(338)
  Checking foo... for 8.3
[2001/09/26 11:23:58, 5] smbd/mangle.c:(989)
  name_map_mangle( foo..., need83 = TRUE, cache83 = TRUE, 1 )
[2001/09/26 11:23:58, 5] smbd/mangle.c:(338)
  Checking foo... for 8.3
[2001/09/26 11:23:58, 5] smbd/mangle.c:(871)
  Mangling name FOO... to FOO~0R
[2001/09/26 11:23:58, 5] smbd/mangle.c:(1024)
  name_map_mangle() ==> [FOO~0R]


And in fact, if you go into a command prompt window, and type 

dir k: /x  (where k: is mapped to the share that contains the directory
foo..)
you will see the mapped name along with the 'real' name.
you can then type 
dir k:\FOO~0R

and you will get the directory listing you would expect.

The issue isn't with samba, but with the windows explorer not showing you
the 'mangled' 8.3 names, or using them when they do the request across the
wire.

IMHO, anyway...

Hope this helps,
Don

-----Original Message-----
From: James Nord [mailto:teilo at cdt.luth.se]
Sent: Wednesday, September 26, 2001 10:53 AM
To: samba at samba.org
Cc: MCCALL,DON (HP-USA,ex1)
Subject: Re: Name mangling bug: was samba bug?


So then samba *should* mangle the unix file "foo..."?

/James

MCCALL,DON (HP-USA,ex1) wrote:

>Hi James,
>this sounds familiar - I believe I looked at a wire trace,
>and windows is dropping the trailing dots BEFORE it sends the 
>request over the wire. so samba never sees the name foo..., thus
>does not create it.
>Don
>-----Original Message-----
>From: James Nord [mailto:teilo at cdt.luth.se]
>Sent: Wednesday, September 26, 2001 9:34 AM
>To: James Nord
>Cc: samba at samba.org
>Subject: Name mangling bug: was samba bug?
>
>
>James Nord wrote:
>
>>Hi,
>>
>>I stumbled accross the following just now (samba 2.2.2-pre)
>>
>>anyone else seen this? is it known?
>>
>>windows explorer make a new folder "foo..." -> gets renamed to "foo" 
>>i.e. looses the trailing three dots..
>>
>>from unix make a dir "foo..." you see it listed in windows explrer.
>>
>>user at sambaserver# echo hello > foo.../hello.txt
>>
>>windows explorer  "foo..." dir is empty..
>>
>>/James
>>
>Okay the name choping is a windows (at least 2000) thing - tried 
>creating documents from cmd.exe and cygwin tools, all loose the trailing 
>"..."'s
>Haven't tested on 9x/Dos/NT4
>
>But samba normally mangles illegal names? why does it not do so here?
>
>user at sambaserv > mkdir samba\hello\\ooo
>
>user at win2000> dir foo
>H:\temp\samba>dir
> Volume in drive H is homes_inh
> Volume Serial Number is 1205-4BBA
>
> Directory of H:\temp\samba
>
>2001/09/26  15:29       <DIR>          .
>2001/09/26  15:29       <DIR>          ..
>2001/09/26  15:29       <DIR>          HELLO~O0
>               0 File(s)              0 bytes
>               3 Dir(s)   5 637 144 576 bytes free
>
>/James
>


-- 
Technology is a word that describes something that doesn't work yet.
	Douglas Adams







More information about the samba mailing list