Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Nov 2023 10:14:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273088] /etc/periodic/weekly/340.noid: extend to support /etc/jail.conf.d/ exclusions
Message-ID:  <bug-273088-227-nYK7ajSpFT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-273088-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-273088-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273088

--- Comment #2 from Markus Stoff <markus@stoffdv.at> ---
I don't know why this request has not received any feedback, but I also thi=
nk
that this script should consider the same sources as /etc/rc.d/jail. Everyt=
hing
else is counterintuitive and should probably be considered unexpected behav=
ior.

Therefore I've added a second attachment which also fixes another issue with
the original script.

The "-e" option separates the parameters by the separator provided. However,
each jails parameters will be on a separate line (i.e. a new line character=
 is
inserted after the last parameter of a jail).

In case the "path" parameter is the last parameter of a jail, the script wi=
ll
consider the line break and the first parameter of the next jail as part of=
 the
value.

Example:

  $ cat /etc/jail.conf
  issue { path =3D '/some/path'; }
  cause { path =3D '/another/path'; }

  $ jail -f /etc/jail.conf -e :
  name=3Dissue:path=3D/some/path
  name=3Dcause:path=3D/another/path

In the above case, the script would try to hand "-path
/some/path$'\n'name=3Dcause -prune" to find, leading it to fail to parse its
arguments (resulting in a noop for this script).

Therefore I changed the separator to the newline character. Another option =
to
fix the bug would be to just add the newline character to IFS. However, usi=
ng
newline as a separator allowed to simplify and optimize the main loop.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273088-227-nYK7ajSpFT>