smbmount & /etc/mtab

Hagen Heiduck wibox1 at wifa.uni-leipzig.de
Sat Sep 2 11:32:56 GMT 2000


Hi,

I think there's a little bug with smbmount (I'm using version 2.0.7) and
mounting to directories containing backslashes. For example:

  vivid:/tmp # mkdir "test\path"

  vivid:/tmp # ls -l
  total 1
  drwxrwxrwt   4 root     root           60 Sep  2 12:48 .
  drwxr-xr-x  17 root     root          306 Aug 27 09:43 ..
  drwxr-xr-x   2 root     root           35 Sep  2 12:48 test\path

  vivid:/tmp # mount -t smbfs -o guest //vivid/data test\\path

  vivid:/tmp # mount
  /dev/hdc2 on / type reiserfs (rw)
  /dev/hda1 on /boot type ext2 (rw)
  proc on /proc type proc (rw)
  devpts on /dev/pts type devpts (rw,gid=5,mode=0620)
  //vivid/data on /tmp/test\\path type smbfs (0)

So I think there's a wrong entry in /etc/mtab ->"test\\path"<-.
I must contain only one "\" (or \\ respectively).

Even when I try to unmount it the following appears:

  vivid:/tmp # umount test\\path

  vivid:/tmp # mount
  /dev/hdc2 on / type reiserfs (rw)
  /dev/hda1 on /boot type ext2 (rw)
  proc on /proc type proc (rw)
  devpts on /dev/pts type devpts (rw,gid=5,mode=0620)
  //vivid/data on /tmp/test\\path type smbfs (0)

test\\path is unmounted but still in /etc/mtab
Or:
  vivid:/tmp # umount //vivid/data
  umount: //vivid/data: not found

  vivid:/tmp # mount
  /dev/hdc2 on / type reiserfs (rw)
  /dev/hda1 on /boot type ext2 (rw)
  proc on /proc type proc (rw)
  devpts on /dev/pts type devpts (rw,gid=5,mode=0620)

test\\path is still mounted but not anymore in /etc/mtab

I did edit /etc/mtab (delete one "\") when it was mounted and then there
were no problems with unmounting. 

Even "mount" handles it right with other types of file systems I guess
this has to be solved in smbmount.


Many greetings,
Hagen






More information about the samba-technical mailing list