On Thu, Jan 26, 2006 at 11:19:55AM +0100, Peter Eisentraut wrote:
> Steve Langasek wrote:
> > On Thu, Jan 26, 2006 at 11:00:40AM +0100, Peter Eisentraut wrote:
> > > Steve Langasek wrote:
> > > > But an ill-designed one; refusing to allow mounting over a
> > > > directory that you own but don't currently have write access to,
> > > > when other filesystems have no such requirement, is unnecessarily
> > > > inconsistent.

> > > What is this inconsistent with?

> > *all other uses of mount*?

> All other uses of mount are done as root, and this feature only applies 
> to smbmnt being run as non-root user.

No, they are not.  User mounts are a well-established concept, and smbmnt
behaves inconsistently with respect to them.

$ id
uid=1000(vorlon) gid=1000(vorlon) 
groups=5(tty),24(cdrom),29(audio),40(src),44(video),50(staff),1000(vorlon),2001(peripherals)
$ grep mnt/test1 /etc/fstab
/dev/hda5       /mnt/test1       ext3    noauto,user     0       0
$ ls -ld /mnt/test1
drwxr-xr-x 2 root root 6 2006-01-26 02:28 /mnt/test1/
$ mount /mnt/test1
$ mount | grep test1
/dev/ide/host0/bus0/target0/lun0/part5 on /mnt/test1 type ext3 
(rw,noexec,nosuid,nodev,user=vorlon)
$ umount /mnt/test1
$ grep mnt/test2 /etc/fstab
//maury/pub     /mnt/test2      smb     username=vorlon,user,noauto     0     0
$ ls -ld /mnt/test2
drwxr-xr-x 2 root root 6 2006-01-26 02:33 /mnt/test2/
$ mount /mnt/test2
added interface ip=192.168.13.2 bcast=192.168.13.255 nmask=255.255.255.0
Got a positive name query response from 64.22.192.12 ( 192.168.13.57 )
Password: 
cannot mount on /mnt/test2: Operation not permitted
smbmnt failed: 1
$ sudo chown vorlon /mnt/test2
$ mount /mnt/test2
added interface ip=192.168.13.2 bcast=192.168.13.255 nmask=255.255.255.0
Got a positive name query response from 64.22.192.12 ( 192.168.13.57 )
Password: 
$ mount | grep test2
//maury/pub on /mnt/test2 type smbfs (rw)
$

This is in addition, of course, to the behavior when calling smbmnt
directly; though the two are related.

I'm not satisfied with smbmount's behavior, and really never have been.  I
don't think it'll ever be fixed in smbmount (as opposed to in mount.cifs),
but that doesn't mean it's not a bug.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/

Attachment: signature.asc
Description: Digital signature

Reply via email to