search for: inspect_with_augeas

Displaying 20 results from an estimated 30 matches for "inspect_with_augeas".

2011 Nov 23
8
[PATCH 0/8] Add MD inspection support to libguestfs
...clare and use variables on the same line in [PATCH 4/8] md: Inspect MD devices I separated this, as it's potentially independently useful. I've also split out the NFs as requested. [PATCH 5/8] NFC: Consolidate the error path in check_fstab in [PATCH 6/8] NFC: Allow multiple config files in inspect_with_augeas [PATCH 7/8] inspection: Handle MD devices in fstab * Split out the NFCs * Changed warning() to debug() in all cases * Following the pattern of other code, I have: * Not called error() when failure is due to the error return of a guestfs api * Explicitly called g->abort_cb() for malloc failur...
2015 Oct 15
1
[PATCH v2] inspect: check for errors in files parsed with augeas (RHBZ#1229119)
...rted with a single mount point ('/'). --- src/inspect-fs-unix.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 3d19276..968aa40 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1983,6 +1983,9 @@ inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, int64_t size; int r; CLEANUP_FREE char *pathexpr = NULL; + CLEANUP_FREE_STRING_LIST char **matches = NULL; + char **match; + size_t len; /* Security: Refuse to do this if a config file is too large. */ for (i = 0; configfiles[i] != NULL; ++i...
2015 Oct 16
1
[PATCH] inspect: Include more information for augeas parse errors (RHBZ#1229119)
...b7704980c08b5ff. --- src/inspect-fs-unix.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 968aa40..4fac7f4 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1985,7 +1985,6 @@ inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, CLEANUP_FREE char *pathexpr = NULL; CLEANUP_FREE_STRING_LIST char **matches = NULL; char **match; - size_t len; /* Security: Refuse to do this if a config file is too large. */ for (i = 0; configfiles[i] != NULL; ++i) { @@ -2023,16 +2022,33 @@...
2011 Nov 22
2
[PATCH] inspection: Handle MD devices in fstab
This patch fixes inspection when fstab contains devices md devices specified as /dev/mdN. The appliance creates these devices without reference to the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created as /dev/md127 in the appliance. With this patch, we match the uuids of detected md devices against uuids specified in mdadm.conf, and map them appropriately when we
2015 Oct 15
0
[PATCH] inspect: check for errors in files parsed with augeas (RHBZ#1229119)
...rted with a single mount point ('/'). --- src/inspect-fs-unix.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 3d19276..e9822ca 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1983,6 +1983,9 @@ inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, int64_t size; int r; CLEANUP_FREE char *pathexpr = NULL; + CLEANUP_FREE_STRING_LIST char **matches = NULL; + char **match; + size_t len; /* Security: Refuse to do this if a config file is too large. */ for (i = 0; configfiles[i] != NULL; ++i...
2016 Dec 06
3
[PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
...a1a757c..0fea9c8 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -89,6 +89,7 @@ static char *resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map, enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); +static void canonical_mountpoint (char *mp); /* Hash structure for uuid->path lookups */ typedef struct md_uuid { @@ -1286,6 +1287,9 @@ check_fstab (guestfs_h *g, struct inspect_fs...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...2abbf24..6dfc299 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -96,6 +96,9 @@ static char *resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map, enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); +static int inspect_with_augeas2 (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *, const char *)); +static int check_systemd_mounts...
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
2014 Sep 23
1
[PATCH] inspect: map Hurd devices, and enable fstab introspection
...s___check_hurd_root (guestfs_h *g, struct inspect_fs *fs) /* Determine the architecture. */ check_architecture (g, fs); - /* XXX Check for /etc/fstab. */ + if (guestfs_is_file (g, "/etc/fstab") > 0) { + const char *configfiles[] = { "/etc/fstab", NULL }; + if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) + return -1; + } /* Determine hostname. */ if (check_hostname_unix (g, fs) == -1) @@ -1635,6 +1642,22 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) if (r == -1) return NULL; } + else if (match3 (g,...
2016 Dec 07
0
Re: [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
...-- a/src/inspect-fs-unix.c > +++ b/src/inspect-fs-unix.c > @@ -89,6 +89,7 @@ static char *resolve_fstab_device (guestfs_h *g, const char *spec, > Hash_table *md_map, > enum inspect_os_type os_type); > static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); > +static void canonical_mountpoint (char *mp); > > /* Hash structure for uuid->path lookups */ > typedef struct md_uuid { > @@ -1286,6 +1287,9 @@ check_fstab (guestfs...
2014 Dec 03
0
[PATCH 2/4] Support fstab block device resolution for NetBSD
...const char *mountable, const char *mp); static char *resolve_fstab_device (guestfs_h *g, const char *spec, - Hash_table *md_map); + Hash_table *md_map, + enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); static int is_partition (guestfs_h *g, const char *partition); @@ -1049,7 +1051,7 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs) mountable = safe_strdup (g, fs->mountable...
2014 Dec 02
0
[PATCH 3/5] Support fstab block device resolution for NetBSD
...const char *mountable, const char *mp); static char *resolve_fstab_device (guestfs_h *g, const char *spec, - Hash_table *md_map); + Hash_table *md_map, + enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); static int is_partition (guestfs_h *g, const char *partition); @@ -1045,7 +1047,7 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs) /* Ignore "/.swap" (Pardus) and ps...
2011 Dec 01
2
[PATCH 0/2] handle MD devices in fstab
Only change from previous post is explicitly checking md_map for NULL before hash_free and lookup.
2011 Nov 25
2
[PATCH 0/2] MD device inspection
These patches are rebased on top of current master. In addition, I've made the following changes: * Fixed whitespace error. * Functions return -1 on error. * Added a debug message when guest contains md devices, but nothing was parsed from mdadm.conf.
2011 Dec 02
3
[PATCH 1/3] build: Add more suppressions for valgrind tests
--- extratests/suppressions | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/extratests/suppressions b/extratests/suppressions index 97d4b78..78ca4ab 100644 --- a/extratests/suppressions +++ b/extratests/suppressions @@ -3,19 +3,19 @@ Memcheck:Cond fun:* fun:numa_node_size64 - fun:numa_init + obj:/usr/lib64/libnuma.so.1 } {
2014 Dec 09
0
[PATCH] inspection: Not an installer if there are multiple partitions (RHBZ#1171666).
...750c27b..5ba8beb 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -96,7 +96,6 @@ static char *resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map, enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); -static int is_partition (guestfs_h *g, const char *partition); /* Hash structure for uuid->path lookups */ typedef struct md_uuid { @@ -1431,7 +1430,7 @@ resolve_fstab_device_xdev (...
2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...+ return -1; + } + } + } else { + return -1; + } + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* We already know /etc/fstab exists because it's part of the test above. */ + const char *configfiles[] = { "/etc/fstab", NULL }; + if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) + return -1; + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + return 0; +} + /* The currently mounted device may be a Hurd root. Hurd has distros * just like Linux. */ @@ -821,6 +873,18 @@ check_hostname_...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...+ return -1; + } + } + } else { + return -1; + } + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* We already know /etc/fstab exists because it's part of the test above. */ + const char *configfiles[] = { "/etc/fstab", NULL }; + if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) + return -1; + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + return 0; +} + /* The currently mounted device may be a Hurd root. Hurd has distros * just like Linux. */ @@ -821,6 +873,18 @@ check_hostname_...
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use __attribute__((cleanup(...))) to automatically free memory when pointers go out of the current scope. In general terms this seems to be a small win although you do have to use it carefully. For functions where you can completely get rid of the "exit code paths", it can simplify things. For a good example, see the
2011 Oct 13
9
[PATCH 1/9] Partially fix --disable-erlang
From: Michael Scherer <misc at zarb.org> Without this, configure will always enable erlang, no matter what argument are passed. Now, we can disable it, even if configure still need the erlang compiler for some obscure reason. --- configure.ac | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 337a3ed..e0bed2f 100644 ---