Re: [Libguestfs] [PATCH 2/3] added icat API to retrieve deleted or inaccessible files

2016-03-07 Thread Richard W.M. Jones
On Mon, Mar 07, 2016 at 09:55:24PM +0200, noxdafox wrote: > On 07/03/16 21:45, Richard W.M. Jones wrote: > >Thanks, I have pushed this patch series. > > > >Could you consider changing: > > > >>+optional = Some "icat"; > >I think it would be nice to have a single feature, and to call the > >feat

Re: [Libguestfs] [PATCH 2/3] added icat API to retrieve deleted or inaccessible files

2016-03-07 Thread noxdafox
On 07/03/16 21:45, Richard W.M. Jones wrote: Thanks, I have pushed this patch series. Could you consider changing: +optional = Some "icat"; I think it would be nice to have a single feature, and to call the feature "sleuthkit" or "forensics" or something like that. We don't need to have

Re: [Libguestfs] [PATCH 0/2] added icat and fls0 APIs for deleted files recovery

2016-03-07 Thread noxdafox
On 07/03/16 21:31, Richard W.M. Jones wrote: On Mon, Mar 07, 2016 at 08:14:41PM +0200, noxdafox wrote: As the API documentation says, this is the low level API which I have provided as an example. I took inspiration from the guestfs_ls0 API which does a similar job storing the content of a di

Re: [Libguestfs] [PATCH 2/3] added icat API to retrieve deleted or inaccessible files

2016-03-07 Thread Richard W.M. Jones
Thanks, I have pushed this patch series. Could you consider changing: > +optional = Some "icat"; I think it would be nice to have a single feature, and to call the feature "sleuthkit" or "forensics" or something like that. We don't need to have one feature per API since installation of a si

Re: [Libguestfs] [PATCH 0/2] added icat and fls0 APIs for deleted files recovery

2016-03-07 Thread Richard W.M. Jones
On Mon, Mar 07, 2016 at 08:14:41PM +0200, noxdafox wrote: > As the API documentation says, this is the low level API which I > have provided as an example. > > I took inspiration from the guestfs_ls0 API which does a similar job > storing the content of a directory onto a host file. > > If I unde

[Libguestfs] [PATCH 3/3] added icat API tests

2016-03-07 Thread Matteo Cafasso
Signed-off-by: Matteo Cafasso --- Makefile.am| 1 + configure.ac | 1 + tests/tsk/Makefile.am | 26 + tests/tsk/test-icat.sh | 53 ++ 4 files changed, 81 insertions(+) create mode 100644 tests/tsk/Ma

[Libguestfs] [PATCH 0/3] added The Sleuth Kit and icat API for downloading inaccessible files

2016-03-07 Thread Matteo Cafasso
The Sleuth Kit is a filesystem forensic tool for accessing disk volumes and extracting digital evidence from. http://www.sleuthkit.org/ The icat API allows to download a file from a device given its metadata number (inode). It supports multiple filesystem types. The icat command allows to acces

[Libguestfs] [PATCH 2/3] added icat API to retrieve deleted or inaccessible files

2016-03-07 Thread Matteo Cafasso
Signed-off-by: Matteo Cafasso --- daemon/Makefile.am | 1 + daemon/tsk.c | 114 +++ generator/actions.ml | 13 ++ po/POTFILES | 1 + src/MAX_PROC_NR | 2 +- 5 files changed, 130 insertions(+), 1 deletion(-) create

[Libguestfs] [PATCH 1/3] added The Sleuth Kit package to the appliance

2016-03-07 Thread Matteo Cafasso
Signed-off-by: Matteo Cafasso --- appliance/packagelist.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appliance/packagelist.in b/appliance/packagelist.in index aa5e07e..0951417 100644 --- a/appliance/packagelist.in +++ b/appliance/packagelist.in @@ -46,6 +46,7 @@ ifelse(REDHAT,1, p

Re: [Libguestfs] [PATCH] inspector: extend the OS "name" in the RELAX NG schema

2016-03-07 Thread Richard W.M. Jones
ACK both. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machin

[Libguestfs] [PATCH] inspector: add --no-applications and --no-icon

2016-03-07 Thread Pino Toscano
Add command line options to optionally disable the output of the installed application, and the guest icon. This makes the inspection slightly faster, producing a smaller XML to parse/process in case there is no interest in these details. --- inspector/inspector.c| 59

[Libguestfs] [PATCH] inspector: extend the OS "name" in the RELAX NG schema

2016-03-07 Thread Pino Toscano
Put the definition of "name" in an own , and add the missing operating systems so far known to libguestfs. --- inspector/virt-inspector.rng | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng inde

Re: [Libguestfs] [PATCH 1/2] added icat and fls0 APIs

2016-03-07 Thread noxdafox
On 07/03/16 13:32, Richard W.M. Jones wrote: On Sun, Mar 06, 2016 at 05:42:25PM +0200, Matteo Cafasso wrote: +static int +file_out (const char *cmd) +{ + int r; + FILE *fp; + char buffer[GUESTFS_MAX_CHUNK_SIZE]; Soon libguestfs will prevent you from using large stack allocations. This is eas

Re: [Libguestfs] [PATCH 0/2] added icat and fls0 APIs for deleted files recovery

2016-03-07 Thread noxdafox
On 07/03/16 13:29, Richard W.M. Jones wrote: On Sun, Mar 06, 2016 at 05:42:24PM +0200, Matteo Cafasso wrote: As discussed in the topic: https://www.redhat.com/archives/libguestfs/2016-March/msg00018.html I'd like to add to libguestfs the disk forensics capabilities offered by The Sleuth Kit.

Re: [Libguestfs] [PATCH v2] Use less stack.

2016-03-07 Thread Richard W.M. Jones
On Mon, Mar 07, 2016 at 05:12:33PM +0100, Pino Toscano wrote: > On Monday 07 March 2016 11:18:32 Richard W.M. Jones wrote: > > +#if defined(__GNUC__) && GUESTFS_GCC_VERSION >= 40800 /* gcc >= 4.8.0 */ > > +#pragma GCC diagnostic push > > +#pragma GCC diagnostic ignored "-Wstack-usage=1" > > +#e

Re: [Libguestfs] [PATCH] inspect: list applications with APK

2016-03-07 Thread Richard W.M. Jones
ACK this and the previous patch. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 li

[Libguestfs] [PATCH] inspect: list applications with APK

2016-03-07 Thread Pino Toscano
Implement the helper function for guestfs_inspect_list_applications2 to be able to parse the list of installed applications with the APK package manager (used on Alpine Linux). --- src/inspect-apps.c | 121 + 1 file changed, 121 insertions(+) di

[Libguestfs] [PATCH] build: fix reading of the java version

2016-03-07 Thread Pino Toscano
Update the check for the first line (the one containing the version) to match also the message with OpenJDK; switch to awk so it is easier to extract the version inside the double quotes. --- m4/guestfs_java.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/guestfs_java.m4

Re: [Libguestfs] [PATCH v2] Use less stack.

2016-03-07 Thread Pino Toscano
On Monday 07 March 2016 11:18:32 Richard W.M. Jones wrote: > GCC has two warnings related to large stack frames. We were already > using the -Wframe-larger-than warning, but this reduces the threshold > from 1 to 5000 bytes. > > However that warning only covers the static part of frames (not

[Libguestfs] Workaround for KSplice with libguestfs

2016-03-07 Thread Frank Laszlo
Hello, If anyone happens to run into an issue with trying to mount/use image files with libguestfs when ksplice is installed on the host system. This is the workaround. Create file: '/usr/lib64/guestfs/supermin.d/zz-ksplice-workaround' with the following contents: /sbin/depmod.ksplice /sbin/kspl

Re: [Libguestfs] [PATCH 1/2] added icat and fls0 APIs

2016-03-07 Thread Richard W.M. Jones
On Sun, Mar 06, 2016 at 05:42:25PM +0200, Matteo Cafasso wrote: > +static int > +file_out (const char *cmd) > +{ > + int r; > + FILE *fp; > + char buffer[GUESTFS_MAX_CHUNK_SIZE]; Soon libguestfs will prevent you from using large stack allocations. This is easy to fix. See: https://www.redhat.c

Re: [Libguestfs] [PATCH 0/2] added icat and fls0 APIs for deleted files recovery

2016-03-07 Thread Richard W.M. Jones
On Sun, Mar 06, 2016 at 05:42:24PM +0200, Matteo Cafasso wrote: > As discussed in the topic: > https://www.redhat.com/archives/libguestfs/2016-March/msg00018.html > > I'd like to add to libguestfs the disk forensics capabilities offered by The > Sleuth Kit. > http://www.sleuthkit.org/ > > The t

[Libguestfs] [PATCH v2] Use less stack.

2016-03-07 Thread Richard W.M. Jones
GCC has two warnings related to large stack frames. We were already using the -Wframe-larger-than warning, but this reduces the threshold from 1 to 5000 bytes. However that warning only covers the static part of frames (not alloca). So this change also enables -Wstack-usage=1 which cover

Re: [Libguestfs] [PATCH 0/5] Use less stack.

2016-03-07 Thread Richard W.M. Jones
On Mon, Mar 07, 2016 at 10:45:47AM +0100, Pino Toscano wrote: > On Sunday 06 March 2016 23:08:56 Richard W.M. Jones wrote: > > Various changes/fixes to use smaller stack frames. > > - patches #1 and #2 LGTM > - patch #3 LGTM as well, eventually a small change to it can be done > (but it isn't m

Re: [Libguestfs] [PATCH 0/5] Use less stack.

2016-03-07 Thread Pino Toscano
On Sunday 06 March 2016 23:08:56 Richard W.M. Jones wrote: > Various changes/fixes to use smaller stack frames. - patches #1 and #2 LGTM - patch #3 LGTM as well, eventually a small change to it can be done (but it isn't mandatory) - patch #4 LGTM, although seems part of the changes of patch #5 a

Re: [Libguestfs] [PATCH 3/5] lib: inspect: gpt_prefix is a constant string.

2016-03-07 Thread Pino Toscano
On Sunday 06 March 2016 23:08:59 Richard W.M. Jones wrote: > --- > src/inspect-fs-windows.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c > index ba72727..5adf145 100644 > --- a/src/inspect-fs-windows.c > +++ b/src/ins