Displaying 4 results from an estimated 4 matches for "unix_whitelist".
2016 Dec 14
0
[PATCH v2 3/4] sysprep: Add a new operation to remove editor backup files (RHBZ#1401320).
...ense along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+open Printf
+
+open Sysprep_operation
+open Common_gettext.Gettext
+open Common_utils
+open Visit
+open Fnmatch
+
+module G = Guestfs
+
+let unix_whitelist = List.sort compare [
+ "/etc";
+ "/root";
+ "/srv";
+ "/tmp";
+ "/var";
+]
+let unix_whitelist_as_pod =
+ String.concat "\n" (List.map ((^) " ") unix_whitelist)
+
+let globs = List.sort compare [
+ "*.bak";
+ &...
2016 Dec 14
1
Re: [PATCH v2 3/4] sysprep: Add a new operation to remove editor backup files (RHBZ#1401320).
...; ---
Looks nice -- I have few notes below.
Also, should this operation include also the swap files that editors
can leave while editing?
> + let fses =
> + match g#inspect_get_type root with
> + | "hurd"
> + | "linux"
> + | "minix" -> unix_whitelist
> + | f when String.is_suffix f "bsd" -> unix_whitelist
> + | _ -> ["/"] in
There's a similar list also in customize/customize_run.ml for the
`SSHInject operation -- I guess an helper function could be added to
Common_utils.
> + List.iter (
> +...
2016 Dec 14
6
[PATCH v2 0/4] sysprep: Remove various backup files.
In v2:
- The backup-files operation now operates on a conservative whitelist
of filesystems, so it won't touch anything in /usr. Consequently
it also runs much more quickly, about 4 seconds on the barebones
virt-builder fedora-25 image.
- Call Gc.compact () in visit_tests.
- Added documentation to fnmatch.mli.
2016 Dec 14
5
[PATCH v3 0/5] sysprep: Remove various backup files.
v3:
- Split out test for "unix-like" guest OSes into separate commit.
- Add guestfish --format=qcow2 to the test (x2).
Rich.