Re: [PATCH] mount: add a search path for mount helpers

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

 



On Thursday 21 January 2010 17:43:25 Karel Zak wrote:
> On Fri, Jan 15, 2010 at 11:57:06PM -0500, Mike Frysinger wrote:
> > On Friday 15 January 2010 06:47:24 Karel Zak wrote:
> > > On Thu, Jan 14, 2010 at 10:42:51PM -0500, Mike Frysinger wrote:
> > > > --- a/mount/mount.c
> > > > +++ b/mount/mount.c
> > > > @@ -631,6 +631,8 @@ do_mount (struct mountargs *args, int *special,
> > > > int *status) { return ret;
> > > >  }
> > > >
> > > > +#define MOUNT_SEARCH_PATH "/sbin:/usr/sbin"
> > >
> > >  This should be defined by
> > >
> > >     ./configure --with-mount-path=<list>
> > >
> > >  where the default is "/sbin". Is it acceptable compromise?
> >
> > why dont we unify these random hardcoded paths.  mkfs has one, fsck has a
> > similar one, and mount has a completely different one.  so for the
> > configure options, we can do:
> > 	--with-fs-paths-default=paths    default search path for fs helpers
> > 			default=/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc
> > 	--with-fs-paths-extra=paths    extra search paths for fs helpers
> > 			default=<none>
> 
>  I'm not sure if good understand. Do you want to use 'extra' path as
>  a prefix to the standard $PATH (for example in fsck) and the 'default'
>  path for programs where we ignore system $PATH (e.g. mount)?
> 
>  What will be the final $PATH in fsck, mfs and mount?
>  Please, examples ;-)

what i propose is:
 - replace all hardcoded lists from fsck/mkfs/mount with one coming from 
configure
 - configure would do:
	- initialize search path to ""
	- if paths-default is non-empty, append it to the search path
		- default value is /sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc
	- if paths-extra is non-empty, append it to the search path
		- default value is ""
 - fsck/mkfs would then take the search path and append current $PATH to get 
final result
 - mount would only search the compiled in search path (due to obvious 
security implications with it being set*id)
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux