Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Dec 2018 09:58:22 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        Eugene Grosbein <eugen@freebsd.org>, Andre Albsmeier <Andre.Albsmeier@siemens.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   Re: svn commit: r341794 - stable/11/etc/periodic/weekly
Message-ID:  <1544893102.76088.70.camel@freebsd.org>
In-Reply-To: <c00a7e0c-5258-26b2-efea-72af490d71a1@freebsd.org>
References:  <201812101424.wBAEOgbC053582@repo.freebsd.org> <20181215090926.GA33682@bali> <c00a7e0c-5258-26b2-efea-72af490d71a1@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2018-12-15 at 17:55 +0700, Eugene Grosbein wrote:
> 15.12.2018 16:09, Andre Albsmeier wrote:
> 
> > 
> > On Mon, 10-Dec-2018 at 14:24:42 +0000, Eugene Grosbein wrote:
> > > 
> > > Author: eugen
> > > Date: Mon Dec 10 14:24:41 2018
> > > New Revision: 341794
> > > URL: https://svnweb.freebsd.org/changeset/base/341794
> > > 
> > > Log:
> > >   MFC r340322-r340324,r340327: periodic/etc/weekly/340.noid
> > >   
> > >   Prevent periodic/etc/weekly/340.noid from descending into root
> > > directories
> > >   of jails. Jails have their own user/group databases and this
> > > script
> > >   can produce multiple false warnings, not to mention significant
> > > extra
> > >   load in case of large jailed subtrees. Leave this check for
> > > jailed
> > >   invocations of the same script.
> > This gave me:
> > 
> > Check for files with an unknown user or group:
> > .: cannot open /usr/share/bsdconfig/common.subr: No such file or
> > directory
> > 
> > on systems where bsdconfig is not installed.
> This periodic script does not try to access
> /usr/share/bsdconfig/common.subr
> I think error message comes from another periodic script.
> Can you please run it with "sh -x /etc/periodic/weekly/340.noid" to
> make sure?
> 
> 

It uses sysrc, which sources in /usr/share/bsdconfig/common.subr; this
is the first reference to sysrc in any periodic script, so it does
establish a new dependency, requiring sysrc to be installed on any
system that runs periodic scripts.

A safer way to extract the root path of all running jails might be
something like:

  if which -s jls; then
      allpaths="$(jls -d path)"
      for onepath in ${allpaths}; do 
          # do whatever with ${onepath} here
      done
  fi

-- Ian




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