[pacman-dev] Missing sanity checks for path -> weird behaviors and segfaults

Dan McGee dpmcgee at gmail.com
Mon Jul 23 17:38:23 EDT 2007


On 7/23/07, Xavier <shiningxc at gmail.com> wrote:
> On Mon, Jul 23, 2007 at 08:18:58PM +0100, Andrew Fyfe wrote:
> > Xavier wrote:
> > > If Root isn't specified, paths like (null)var/ will be created.
> > > I think pacman should either default to / for Root, or just fail if it isn't
> > > set.
> > The backend (although I think this is a frontend problem :) should do
> >
> > if ( stat(rootdir, &buf) != 0 || ! S_ISDIR(&buf->st_mode) )
> >       Ooops invalid root directory....
> >
> > Doesn't the frontend already default to / or are you talking about a
> > case where rootdir='' in pacman.conf?
> >
>
> It doesn't default to / anymore (in git), but I think it would be better if
> it did (maybe in the frontend).
> The case of an invalid rootdir in pacman.conf could be caught by a sanity
> check (maybe in the backend).
> Anyway, I'm not sure in which place they should be, but I believe that
> sane defaults + sanity checks is an important thing to have.

I'm starting to do some of this on my working branch- see my gitweb for details.

-Dan




More information about the pacman-dev mailing list