search for: guestfs_filesize

Displaying 20 results from an estimated 26 matches for "guestfs_filesize".

2017 Mar 22
2
[PATCH] inspect: improve detection of Mageia install discs
...ilename) +{ + int64_t size; + CLEANUP_FREE_STRING_LIST char **lines = NULL; + const char *elem; + char *saveptr; + + fs->type = OS_TYPE_LINUX; + + /* Don't trust guestfs_head_n not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_SMALL_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + filename, size); + return -1;...
2017 Mar 22
1
Re: [PATCH] inspect: improve detection of Mageia install discs
...const char *elem; > > + char *saveptr; > > + > > + fs->type = OS_TYPE_LINUX; > > + > > + /* Don't trust guestfs_head_n not to break with very large files. > > + * Check the file size is something reasonable first. > > + */ > > + size = guestfs_filesize (g, filename); > > + if (size == -1) > > + /* guestfs_filesize failed and has already set error in handle */ > > + return -1; > > + if (size > MAX_SMALL_FILE_SIZE) { > > + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)&qu...
2017 Mar 22
0
Re: [PATCH] inspect: improve detection of Mageia install discs
...STRING_LIST char **lines = NULL; > + const char *elem; > + char *saveptr; > + > + fs->type = OS_TYPE_LINUX; > + > + /* Don't trust guestfs_head_n not to break with very large files. > + * Check the file size is something reasonable first. > + */ > + size = guestfs_filesize (g, filename); > + if (size == -1) > + /* guestfs_filesize failed and has already set error in handle */ > + return -1; > + if (size > MAX_SMALL_FILE_SIZE) { > + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), > + fi...
2015 Sep 09
2
[PATCH] inspect: try to use /etc/os-release on Linux guests
...i; + enum inspect_os_distro distro = OS_DISTRO_UNKNOWN; + CLEANUP_FREE char *product_name = NULL; + int major_version = -1, minor_version = -1; + + /* Don't trust guestfs_read_lines not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_SMALL_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + filename, size); + return -1;...
2017 Sep 20
7
[PATCH v2] 0/6] Various clean ups in lib/
v1 -> v2: - Remove the unnecessary calls to guestfs_int_lazy_make_tmpdir in the final patch. Rich.
2017 Sep 19
7
[PATCH 0/6] Various clean ups in lib/
Miscellaneous small cleanups in lib/ directory. Rich.
2012 Sep 21
1
[PATCH] Update SuSE Linux detection.
...e_suse_release (guestfs_h *g, struct inspect_fs *fs, const char *filename) +{ + int64_t size; + char *major, *minor; + char **lines; + int r = -1; + + /* Don't trust guestfs_head_n not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_SMALL_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + filename, size); + return -1;...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...har *pathexpr = NULL; + + /* Security: Refuse to do this if a config file is too large. */ + for (i = 0; configfiles[i] != NULL; ++i) { + if (guestfs_is_file_opts (g, configfiles[i], + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) == 0) + continue; + + size = guestfs_filesize (g, configfiles[i]); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_AUGEAS_FILE_SIZE) { + error (g, _("size of %s is unreasonably large (%" PRIi64 " bytes)"), + configfiles[i...
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
2011 Nov 23
8
[PATCH 0/8] Add MD inspection support to libguestfs
This series fixes inspection in the case that fstab contains references to md devices. I've made a few changes since the previous posting, which I've summarised below. [PATCH 1/8] build: Create an MD variant of the dummy Fedora image I've double checked that no timestamp is required in the Makefile. The script will not run a second time to build fedora-md2.img. [PATCH 2/8] build:
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2017 Jul 14
0
[PATCH 12/27] daemon: Reimplement ‘file_architecture’ API in OCaml.
...intf"); - return NULL; - } - - if (strstr (file, "gzip")) - method = "zcat"; - else if (strstr (file, "bzip2")) - method = "bzcat"; - else - method = "cat"; - - /* Security: Refuse to download initrd if it is huge. */ - size = guestfs_filesize (g, path); - if (size == -1 || size > 100000000) { - error (g, _("size of %s unreasonable (%" PRIi64 " bytes)"), - path, size); - goto out; - } - - if (mkdtemp (dir) == NULL) { - perrorf (g, "mkdtemp"); - goto out; - } - - initrd = safe_as...
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.
2013 Jun 14
3
[PATCH 0/2] Fix inspection of Fedora guests (RHBZ#974489).
Here is a preliminary fix for this bug. I'm running the test suite on this now. 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
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
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.