Re: smbmount and mount [and spaces in devices]
Package: mount
Version: 2.7l-4
This is a bug. I'm opening a bug report. Credit goes to Jens.
[I did bump into this earlier, but I had forgotten it already..;)]
On Thu, May 28, 1998 at 06:50:29PM +0200, Jens Ritter wrote:
> I see this strange behaviour of samba:
> I mount a share from a Windows box (with a space in it):
> smbmount //tornado\!/"xyz iii" xyz -I foobar
> (xyz is a directory), I use the data in xyz and umount it.
>
> Now mount reports:
> //tornado!/xyz on iii type /mnt/xyz/tornado1/xyz (smbfs)
> ^^^^^^^^^
> Strange isn´t it?
[...]
> Is it a fearture or a bug? If it is the latter one, where to report?
Actually, it isn't strange. Status of currently mounted
filesystems is saved in /etc/mtab, and this file has one
line per mount, fields separated with a _space_. So, if
you have a mount point/device with a space, fields are split
wrong.
It has nothing to do with samba - you can easily reproduce it
with:
$ touch 'foo bar'
$ /sbin/mke2fs 'foo bar' 123
$ sudo mount -o loop 'foo bar' /mnt
$ mount
[...]
/home/tv/foo on bar type /mnt (ext2)
Maybe the fields with spaces should be quoted? What programs
read /etc/mtab?
/proc/mounts logs that example as /dev/loop1, so it is not vulnerable,
atleast not with loop devices. Haven't tested others.
This is with frozen, kernel 2.0.33.
--
tv-nospam-sig-1@hq.yok.utu.fi - it's a valid address w/o spam
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: