Re: uid of user who mounts

From: Randy.Dunlap (rddunlap_at_osdl.org)
Date: 07/31/04

  • Next message: Kristian Høgsberg: "Re: input system: EVIOCSABS(abs) ioctl disabled, why?"
    Date:	Fri, 30 Jul 2004 19:08:25 -0700
    To: Steve French <smfrench@austin.rr.com>
    
    

    On Fri, 30 Jul 2004 21:05:09 -0500 Steve French wrote:

    | To allow user unmounts of cifs shares (much like the setuid smbumount
    | utility allows for smbfs), it has been suggested that the cifs vfs could
    | return the uid of the mounter in /proc/mounts This would avoid having
    | to add an ioctl (as smbfs did) and seems as secure as the ioctl approach
    | (to get the uid of the original mounter).
    |
    | If user mounts are allowed, is there any worse security exposure in
    | letting the tool check the uid who mounted via /proc/mounts (to allow
    | user unmount).
    |
    | Is there any precedent for the name for the name of such a parm? I was
    | thinking of "mnt_uid" since simply using "uid=" would seem to overload
    | the meaning of "uid", which is already used as a mount parm by various
    | filesystems to signify the default uid for files ( ie in the cifs case
    | when mounting to Windows - and Unix CIFS protocol extensions are not
    | enabled) and it is not always the case that the default uid for files
    | would be the same as the uid of the person who mounted.

    For the last question, looks like "user=" is already used for that.
    See 'man mount':

                  user Allow an ordinary user to mount the file system. The
                         name of the mounting user is written to mtab so that he
                         can unmount the file system again. This option implies
                         the options noexec, nosuid, and nodev (unless overridden
                         by subsequent options, as in the option line
                         user,exec,dev,suid).

    --
    ~Randy
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Kristian Høgsberg: "Re: input system: EVIOCSABS(abs) ioctl disabled, why?"

    Relevant Pages

    • uid of user who mounts
      ... To allow user unmounts of cifs shares (much like the setuid smbumount ... (to get the uid of the original mounter). ...
      (Linux-Kernel)
    • Samba, cifs, and local/remote uids/gids
      ... servers and on client machines wishing to connect to CIFS shares ... Try to synchronise allocation of uid and gid between client and server ...
      (comp.os.linux.misc)
    • Re: Samba: smbfs works, cifs does not
      ... Workstation: FC5 and FC4 ... This parameter is ignored when the target server supports the CIFS ... So what are these CIFS Unix extensions? ... I suspect that you're running into issues where the UID *numbers* are ...
      (Fedora)