[Quick Fix Inside] Samba 3.0.3 - Unhandled Backslash while accessing Samba Share

Jens Graef jgraef at linetco.com
Tue May 4 15:11:56 GMT 2004

Hello List!

After upgrading to Samba 3.0.3 I discovered a strange phenomenon:

Client is NT4.0 + SP6 (I think)
A share from a Samba 3.0.3 server  is connected as W:


cd \test
type test.txt  -> file  not found

type W:\test\test.txt -> content

Samba logfile shows for "not-found"-case:

[2004/05/03 18:52:27, 5] smbd/filename.c:unix_convert(114)
  unix_convert called on file "test\TEST.TXT"
[2004/05/03 18:52:27, 10] smbd/open.c:fd_open(45)
  fd_open: name test\TEST.TXT, flags = 00 mode = 0775, fd = -1. No such
file or directory

Apparently, there is a Windows-type directory separator evading all
The problem does NOT exist with Windows XP.
Because I'm not very familiar with samba and there was a hurry to fix
this NT-Machine I produced the following hack:

I inserted into filename.c, line 115 , after     DEBUG(5, ("unix_convert
called on file \"%s\"\n", name));

/* simple hack by jgraef for \\-local-dir-bug - code should be in
check_path_syntax, but no time */
end = strchr_m(name, '\\');
        if(end) {
          DEBUG(1, ("unix_convert: found suspicious \\ and changed it to

After recompilation the problem was gone.
Can one of you discover the real source of the problem and build a
"real" fix into further samba versions?
Btw: Keep up the good work!


Jens Graef
Gesellschafter der Linux Network Consulting GbR
Fon: 07151 2050988
Fax: 07151 2050989

More information about the samba-technical mailing list