Your message dated Tue, 20 Jan 2009 22:00:10 +0100
with message-id <[email protected]>
and subject line Bug only in smbfs mount
has caused the Debian Bug report #59987,
regarding Bug in smbfs (fix included)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
59987: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=59987
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: smbfs
Version: 2.0.6-5

Operating system: Debian GNU/Linux Potato, kernel 2.2.15pre13/smp

Problem: Smbmnt does not allow me to mount an smbfs on a directory I
don't own even when /etc/fstab contains an entry with the "user" option.
(This behaviour is different from other filesystems like ext2).

Scenario:

$ ls -ld /xchange
drwxr-xr-x    2 root     root         4096 Dec 21 16:19 /xchange

$ grep xchange /etc/fstab
//mowgli/xchange    /xchange   smbfs   username=eric,uid=1000,user,noauto

$ mount /xchange 
Password: 
cannot mount on /xchange: Operation not permitted
smbmnt failed: 1
mount.smbfs: ioctl failed, res=-1
Could not umount /xchange: Invalid argument


I've looked through the source, and discovered the cause of the
failure. Smbmnt allows the mount only when I either own the mount point
or the real userid is 0. Because I run mount as non-root, the real userid
is non-zero while the effective uid is 0.

The following patches fixes smbmnt's behaviour:

--- samba-2.0.6/source/client/smbmnt.c.orig     Wed Oct 13 07:26:45 1999
+++ samba-2.0.6/source/client/smbmnt.c  Thu Mar  9 11:45:15 2000
@@ -120,6 +120,7 @@
         }
 
         if ((getuid() != 0) && 
+           (geteuid() != 0) && 
            ((getuid() != st.st_uid) || 
             ((st.st_mode & S_IRWXU) != S_IRWXU))) {
                 errno = EPERM;

cya,
Eric

-- 
Eric Lammerts <[email protected]>

"Home is where the dot files are."




--- End Message ---
--- Begin Message ---
Version: 3.0.27a-2

The bug reported in that issue was in smbmount, which we no longer
provide as we only provide a wrapper and mount.cifs as of 3.0.27a-2

Though mount.cifs has other issues related to shares mountable by
users (such as #403724), it does not appear to have this bug.




-- 


Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to