Re: uid of user who mounts

From: Steve French (smfrench_at_austin.rr.com)
Date: 07/31/04

  • Next message: Lee Revell: "Re: input system: EVIOCSABS(abs) ioctl disabled, why?"
    To: "Randy.Dunlap" <rddunlap@osdl.org>
    Date:	Fri, 30 Jul 2004 22:34:01 -0500
    
    

    Thanks - I had missed that - and it is a little cleaner to call it
    "user" than "mount_uid" in the line in /proc/mounts, and there are no
    existing parms returned that are similar (except "username" which should
    be easy enough to understand). Interestingly I did not see other
    filesystems returning that in /proc/mounts (I slightly prefer having it
    stored in the filesystems kernel code and returned in showopts not just
    put by userspace in the file mtab) - the only minor annoyance is that /
    etc/mtab returns the username (rather than the uid).

    On Fri, 2004-07-30 at 19:08 -0700, Randy.Dunlap wrote:
    > 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: Lee Revell: "Re: input system: EVIOCSABS(abs) ioctl disabled, why?"

    Relevant Pages

    • Re: Finding currently logged in users
      ... >Each user on the system should have a unique userid UID. ... username -> uid is a one-way map. ... places to record UIDs of logged-in users anyway. ... "lordhighmasteroftheuniverseanddns" is logged in and listed by who ...
      (comp.unix.programmer)
    • Re: username/uid restrictions
      ... > I see from my new RHEL4 sysadmin guide that uid's up to 500 are ... Just claim UID 100 onwards as yours! ... echo "package $package added user using this line" ... > duplicates the username of one of the directors, ...
      (Fedora)
    • Re: username/uid restrictions
      ... When I first began setting up my Unix userbase some 15 years ago, I unfortunately chose to start at uid 100, so I now have to change the uid's of some 400 users, 36 million files, on a hundred or so boxes. ... There seems to be no rule to distinguish a reserved username (presumably the list in the RHEL sysadmin guide is going to grow) and its only a matter of time before some newly allocated name collides with one which has been given to a user. ... then echo "package $package added user using this line" echo $ ...
      (Fedora)
    • Re: User Information (Easy Questions!)
      ... which will tell you the users' UID and what groups they are a member of. ... the password file can lock you out of the machine. ... No -- file and program ownership is recorded in the filesystem using ... from username to UID. ...
      (freebsd-questions)
    • Re: deleting user account: disposition of users files?
      ... that, like ls, won't be able to, and will just report the uid. ... The username is NOT stored in the inode. ... > automatically inherit the files of the defunct user. ... > sounded like some systems prevent this by preventing userids from being ...
      (comp.unix.solaris)