[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2045: smb[u]mount not suid root



> Where does it say they are suid safe?

>From the smbmount(8) man page:

          If  the  real  uid  of the caller is not root, smbmount
          checks whether the user is allowed to mount a  filesys-
          tem  on  the  mount-point. So it should be safe to make
          smbmount setuid root. In the filesystem, the  real  uid
          of  the  caller  is stored, so that smbumount can check
          whether the caller is allowed to unmount  the  filesys-
          tem.

Also, from the smbumount(8) man page:

       With   this   program,   normal  users  can  unmount  smb-
       filesystems, provided that it is suid root.

       smbumount has been written to give normal linux-users more
       control  over  their resources. It is safe to install this
       program suid root, because only the user who has mounted a
       filesystem is allowed to unmount it again.

       For  root it is not necessary to use smbumount. The normal
       umount program works perfectly well,  but  it  would  cer-
       tainly be problematic to make umount setuid root.

(Actually, the Debian umount is suid-safe, but won't unmount user-mounted SMB
filesystems unless run as root.)

> What is different between a user mounting a NFS and a smbfs, why should
> normal users be able to do this?

There isn't much difference; users can be allowed to mount NFS filesystems
with proper /etc/fstab entries.

An important difference, though, is that smbfs treats ownership of all files
and directories to be the same as the user who mounted the filesystem. So, it
doesn't work well to require root to mount an SMB filesystem for a user (say,
the user's home directory on an SMB server) because all the files will
effectively be owned by root.

--
Robert Leslie
rob@advantage.org


Reply to: