Subject: Re: mount_ados
To: NetBSD Amiga <amiga@netbsd.org>
From: Michael L. Hitch <osymh@gemini.oscs.montana.edu>
List: amiga
Date: 12/03/1994 11:40:02
On Dec  3,  4:22am, Chris G Demetriou wrote:
> > why do "/sbin/mount_ados" and "/sbin/mount_msdos" in the NetBSD 1.0
> > distribution come with setuid ? This way EVERY user can mount devices
> 
> No, they can mount things only if a certain set of conditions are met,
> namely:
> 	(1) they have appropriate permissions on the device's /dev
> 		entries
> 	(2) they have appropriate permissions on the to-be-mounted-on
> 		directory.

  Or if the file system doesn't do the appropriate checking of permissions.
I'm not quite sure what adosfs does for checks, but I don't think it
makes these checks, so any user can mount any AmigaDOS file system
anywhere.

> > but he can't even unmount them.
> 
> Indeed, they _can_ unmount them; user-created mounts are unmountable
> by the user who created them, and by root.

 The umount routine will verify that the user has the appropriate access
and permissions to do the unmount.  If the adosfs mount doesn't do the
proper checking and allows the mount, the file system will be mounted
but the access checks will fail on the umount.

Michael

-- 
Michael L. Hitch			INTERNET:  osymh@montana.edu
Computer Consultant
Office of Systems and Computing Services
Montana State University	Bozeman, MT	USA