svn commit: r341794 - stable/11/etc/periodic/weekly

Ian Lepore ian at freebsd.org
Sat Dec 15 16:58:37 UTC 2018


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



More information about the svn-src-stable mailing list