search for: make_augeas_path_expression

Displaying 16 results from an estimated 16 matches for "make_augeas_path_expression".

2016 Dec 09
1
[PATCH] inspect: improve canonical_mountpoint implementation
...src/inspect-fs-unix.c | 56 ++++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 49ac3f9..7e940d6 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -2130,44 +2130,28 @@ make_augeas_path_expression (guestfs_h *g, const char **configfiles) * the same length or shorter than the argument passed. */ static void -drop_char (char *mp) +canonical_mountpoint (char *s) { - size_t len = strlen (mp); - memmove (&mp[0], &mp[1], len); -} + size_t len = strlen (s); + char *orig = s; -st...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...f (inspect_with_augeas2 (g, fs, + (const char**) filenames, check_systemd_mnt) == -1) { + return -1; + } + } + + return 0; +} + +static int check_fstab (guestfs_h *g, struct inspect_fs *fs) { CLEANUP_FREE_STRING_LIST char **entries = NULL; @@ -1705,6 +1885,66 @@ static char *make_augeas_path_expression (guestfs_h *g, const char **configfiles * to 'f' the Augeas handle is closed. */ static int +inspect_with_augeas2 (guestfs_h *g, struct inspect_fs *fs, + const char **configfiles, + int (*f) (guestfs_h *, struct inspect_fs *, const char *)) +{ +...
2015 Mar 16
2
[PATCH] RFE: Inspection should support systemd mount units
Adds support for systemd .mount files, uses Augeas to extract mount points. Fixes RHBZ#1113153. Maros Zatko (1): inspection: add support for systemd .mount files src/inspect-fs-unix.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) -- 1.9.3
2016 Dec 06
3
[PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
...L) return -1; + /* Canonicalize the path, so "///usr//local//" -> "/usr/local" */ + canonical_mountpoint (mp); + /* Ignore certain mountpoints. */ if (STRPREFIX (mp, "/dev/") || STREQ (mp, "/dev") || @@ -2081,3 +2085,51 @@ make_augeas_path_expression (guestfs_h *g, const char **configfiles) debug (g, "augeas pathexpr = %s", ret); return ret; } + +/* Canonicalize the path, so "///usr//local//" -> "/usr/local" + * + * The path is modified in place because the result is always + * the same length or shorter...
2016 Dec 07
0
Re: [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
...Canonicalize the path, so "///usr//local//" -> "/usr/local" */ > + canonical_mountpoint (mp); > + > /* Ignore certain mountpoints. */ > if (STRPREFIX (mp, "/dev/") || > STREQ (mp, "/dev") || > @@ -2081,3 +2085,51 @@ make_augeas_path_expression (guestfs_h *g, const char **configfiles) > debug (g, "augeas pathexpr = %s", ret); > return ret; > } > + > +/* Canonicalize the path, so "///usr//local//" -> "/usr/local" > + * > + * The path is modified in place because the result is alw...
2014 Dec 09
0
[PATCH] inspection: Not an installer if there are multiple partitions (RHBZ#1171666).
...byid (guestfs_h *g, const char *part, /* Make the partition name and check it exists. */ device = safe_asprintf (g, "/dev/sda%s", part); - if (!is_partition (g, device)) { + if (!guestfs___is_partition (g, device)) { free (device); return 0; } @@ -1786,25 +1785,3 @@ make_augeas_path_expression (guestfs_h *g, const char **configfiles) debug (g, "augeas pathexpr = %s", ret); return ret; } - -static int -is_partition (guestfs_h *g, const char *partition) -{ - CLEANUP_FREE char *device = NULL; - - guestfs_push_error_handler (g, NULL, NULL); - - if ((device = guestfs_part_...
2017 Aug 09
0
[PATCH v12 08/11] daemon: Implement inspection types and utility functions.
...rogue guest from performing a denial of service attack + * by having large, over-complicated configuration files which are + * unrelated to the task at hand. (Thanks Dominic Cleal). + * Note this requires Augeas >= 1.0.0 because of RHBZ#975412. + *) + let pathexpr = make_augeas_path_expression configfiles in + ignore (aug_rm_noerrors aug pathexpr); + Augeas.load aug; + + (* Check that augeas did not get a parse error for any of the + * configfiles, otherwise we are silently missing information. + *) + let matches = aug_matches_noerrors aug "/augeas/fi...
2017 Jun 12
1
[PATCH] UNFINISHED daemon: Reimplement most inspection APIs in the daemon.
This is the (incomplete) patch which reimplements inspection APIs in the daemon. All ‘XXX’s in this patch indicate areas which are not yet implemented or need further work. Rich.
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here: https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html This depends on these three series (the first two being single minor patches): https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series "[PATCH 00/27] Reimplement many daemon APIs in OCaml." (https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html) v8 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html v9: - I split up the mega-patch into a more reviewable series of smaller, incremental patches. There are some other changes vs v8, but
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which fixes the whole utf8/iconv business. It's probably better to list what isn't fixed: (1) I didn't leave the osinfo code around because I'm still haven't looked too closely at virt-builder-repository. Can't we just fetch this code from the git history when we need it? (2) I didn't change the way
2017 Jul 31
16
[PATCH v11 00/10] Reimplement inspection in the daemon.
v10: https://www.redhat.com/archives/libguestfs/2017-July/msg00245.html No actual change here, but I rebased and retested. Also this series now does not depend on any other patch series since everything else needed is upstream. Rich.
2017 Jun 19
29
[PATCH v7 00/29] Reimplement inspection in the daemon.
v6 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html and this requires the utilities refactoring posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html Inspection is now complete[*], although not very well tested. I'm intending to compare the output of many guests using old & new virt-inspector to see if I can find any
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html I believe this addresses all comments received so far. Also it now passes a test where I compared about 100 disk images processed with old and new virt-inspector binaries. The output is identical in all cases except one which is caused by a bug in blkid