[prev in list] [next in list] [prev in thread] [next in thread]
List: util-linux-ng
Subject: Re: [PATCH] mount: add a search path for mount helpers
From: Karel Zak <kzak () redhat ! com>
Date: 2010-01-22 8:52:33
Message-ID: 20100122085233.GI6641 () nb ! net ! home
[Download RAW message or body]
On Thu, Jan 21, 2010 at 07:40:59PM -0500, Mike Frysinger wrote:
> 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)
OK, makes sense. I'd like to remove /etc and /etc/fs from the default
search path. The people who need this nonsense can use the new configure
options.
Karel
--
Karel Zak <kzak@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic