Subject: Re: bin/3615: umount change to allow relative path unmounting
To: Chris G. Demetriou <cgd@pa.dec.com>
From: None <nimenees@par0163.urh.uiuc.edu>
List: netbsd-bugs
Date: 05/13/1997 18:34:03
> > >Description:
> > umount currently always takes the path you give it and converts it
> > to an absolute path w/realpath. This causes the unmount to fail if someone
> > happened to mount something using a relative path.
>
> I'd say that the right solution to this may be to disallow mounts with
> relative paths... Allowing them is ... confusing, at best.
hmm... I suppose it is. Perhaps the easiest way would be just to
check for a leading "/" in the syscall. All the mount_<fs> bins should be
checked to make sure they convert to absolute paths.
this seems to work for the syscall:
*** vfs_syscalls.c.old Tue May 13 18:08:48 1997
--- vfs_syscalls.c Tue May 13 18:30:31 1997
*************** sys_mount(p, v, retval)
*** 93,98 ****
--- 93,100 ----
struct vattr va;
struct nameidata nd;
+ if (*(SCARG(uap, path)) != '/')
+ return (ENOENT);
/*
* Get vnode to be covered
*/
eric
haszlaki@uiuc.edu