Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2014 10:16:58 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: mergemaster and better support for ezjails
Message-ID:  <alpine.BSF.2.11.1407131011100.8810@wonkity.com>
In-Reply-To: <20140713152442.K50382@sola.nimnet.asn.au>
References:  <alpine.BSF.2.11.1407121753240.50320@wonkity.com> <20140713152442.K50382@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Jul 2014, Ian Smith wrote:

> On Sat, 12 Jul 2014 20:08:52 -0600, Warren Block wrote:
>> A couple of patches to make mergemaster work better with ezjails.
>> > These are only very superficially tested.  Feedback welcome.
>> > 1. If /etc/mergemaster.rc exists in the jail, it is sourced.  This
>>    allows IGNORE_FILES to be set in the jail.  And other settings, but
>>    that's the one I wanted.
>
> # Read /etc/mergemaster.rc first so the one in $HOME can override
> #
> if [ -r /etc/mergemaster.rc ]; then
> -  . /etc/mergemaster.rc
> +  . "${DESTDIR}/etc/mergemaster.rc"
> fi
>
> # Read .mergemasterrc before command line so CLI can override
> #
> if [ -r "$HOME/.mergemasterrc" ]; then
> -  . "$HOME/.mergemasterrc"
> +  . "${DESTDIR}/$HOME/.mergemasterrc"
> fi
>
> Maybe a dumb question, but ..
>
> In both cases, don't we need to test the readability of those files with 
> ${DESTDIR} prepended, rather than the originals, before sourcing them?  Or 
> can we here safely assume that they will exist? Or doesn't it matter?

Yes, you are right, but it doesn't matter because as Mateusz Guzik 
points out, it's not safe to source those files from a jail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1407131011100.8810>