search for: c_inspect_decrypt

Displaying 20 results from an estimated 31 matches for "c_inspect_decrypt".

2020 Jan 22
0
[PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
...(allowdiscards)); CAMLreturn (Val_unit); } diff --git a/mltools/tools_utils.ml b/mltools/tools_utils.ml index 1271802..cb94125 100644 --- a/mltools/tools_utils.ml +++ b/mltools/tools_utils.ml @@ -29,7 +29,7 @@ and key_store_key = | KeyString of string | KeyFileName of string -external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> unit = "guestfs_int_mllib_inspect_decrypt" +external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> bool -> unit = "guestfs_int_mllib_inspect_decrypt" external c_set_echo_k...
2018 Sep 20
2
Re: [PATCH 2/2] Introduce a --key option in tools that accept keys
...; + fun k v acc -> > + (k, v) :: acc > + ) ks.keys [] in > (* Note we pass original 'g' even though it is not used by the > * callee. This is so that 'g' is kept as a root on the stack, and > * so cannot be garbage collected while we are in the c_inspect_decrypt > * function. > *) > c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle) > + keys_as_list An array would be even easier, but I guess you've written the list code now :-) - - - I think Eric's / qemu's shared key stuff sounds very complex, and...
2019 Apr 01
2
[PATCH] OCaml tools: fix 3999 -> 3339 typo
...e_time_string (value unitv) { CAMLparam1 (unitv); char buf[64]; diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index de42df600..127180225 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -32,7 +32,7 @@ and key_store_key = external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> unit = "guestfs_int_mllib_inspect_decrypt" external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc" external c_set_keys_from_stdin : unit -> unit = "guestfs_int_...
2016 Sep 19
0
[PATCH 2/3] mllib: expose disk decrypt functionalities
...e unitv) +{ + keys_from_stdin = 1; + return Val_unit; +} diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 4e36d50..7cb8198 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -21,6 +21,10 @@ open Printf open Common_gettext.Gettext open Getopt.OptionName +external c_inspect_decrypt : Guestfs.t -> int64 -> unit = "guestfs_int_mllib_inspect_decrypt" +external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc" +external c_set_keys_from_stdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" &quo...
2019 Mar 22
8
[PATCH 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Pino Toscano (4): common/mltools: move the code for machine readable up common/mltools: make sure machine
2020 Jan 27
3
[PATCH v2 1/2] mltools, options: support --allow-discards when decrypting LUKS devices
...(allowdiscards)); CAMLreturn (Val_unit); } diff --git a/mltools/tools_utils.ml b/mltools/tools_utils.ml index 1271802..cb94125 100644 --- a/mltools/tools_utils.ml +++ b/mltools/tools_utils.ml @@ -29,7 +29,7 @@ and key_store_key = | KeyString of string | KeyFileName of string -external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> unit = "guestfs_int_mllib_inspect_decrypt" +external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> bool -> unit = "guestfs_int_mllib_inspect_decrypt" external c_set_echo_k...
2017 Mar 07
0
[PATCH v4 7/9] dib: move do_cp to mllib.Commun_utils
...ng.length str - 1] <> '\n' then str ^ "\n" else str diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index e1d63292e..945728b5e 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -1167,3 +1167,8 @@ let inspect_decrypt g = * function. *) c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle) + +let do_cp src destdir = + let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in + if run_command cmd <> 0 then + error (f_"copy of %s to %s failed") src destdir diff --git a/mllib/common_utils.mli b/ml...
2017 Mar 23
0
[PATCH v5 07/10] dib: move do_cp to mllib.Commun_utils
...ng.length str - 1] <> '\n' then str ^ "\n" else str diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index e1d63292e..945728b5e 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -1167,3 +1167,8 @@ let inspect_decrypt g = * function. *) c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle) + +let do_cp src destdir = + let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in + if run_command cmd <> 0 then + error (f_"copy of %s to %s failed") src destdir diff --git a/mllib/common_utils.mli b/ml...
2017 Apr 12
0
[PATCH v6 07/10] dib: move do_cp to mllib.Commun_utils
...ng.length str - 1] <> '\n' then str ^ "\n" else str diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 63d8dd92e..ceac57711 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -1186,3 +1186,8 @@ let inspect_decrypt g = * function. *) c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle) + +let do_cp src destdir = + let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in + if run_command cmd <> 0 then + error (f_"copy of %s to %s failed") src destdir diff --git a/mllib/common_utils.mli b/ml...
2017 Sep 12
0
[PATCH v8 5/7] mllib: add do_mv helper function to Common_utils
...l | 6 ++++++ mllib/common_utils.mli | 3 +++ 2 files changed, 9 insertions(+) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 597128967..1126f233b 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -561,3 +561,9 @@ let inspect_decrypt g = * function. *) c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle) + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file '%s' to '%s' failed") src dest diff --git a/mllib/common_utils.mli b/mll...
2019 Mar 28
0
[PATCH v2 1/4] common/mltools: move the code for machine readable up
...60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 24641369e..5a35708cd 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -33,6 +33,36 @@ external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc" external c_set_keys_from_stdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" "noalloc" +type...
2019 Mar 22
0
[PATCH 3/4] common/mltools: allow fd for machine readable output
...aise_out_of_memory (); + + CAMLreturn (caml_alloc_channel (chan)); +} diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index ade4cb37f..3c54cd4a0 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -32,6 +32,7 @@ and key_store_key = external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> unit = "guestfs_int_mllib_inspect_decrypt" external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc" external c_set_keys_from_stdin : unit -> unit = "guestfs_int_...
2019 Mar 28
8
[PATCH v2 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the messages of OCaml tools as JSON to the machine parseable stream. Related, although not strictly needed for this (and thus can be split if requested), is the addition of the fd format for the machine readable stream. Changes from v1: - use Obj.magic to convert int -> Unix.file_descr - add tests Pino Toscano (4):
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi, the following series adds a --key option in the majority of tools: this makes it possible to pass LUKS credentials programmatically, avoid the need to manually input them, or unsafely pass them via stdin. Thanks, Pino Toscano (2): mltools: create a cmdline_options struct Introduce a --key option in tools that accept keys builder/cmdline.ml | 2 +-
2016 Sep 19
6
[PATCH 0/3] add crypto/LUKS support in some OCaml-based tools
Hi, this series refactors some guestfish code (not much), and exposes it via Common_utils, so it is possible to decrypt LUKS partitions when using virt-customize, virt-get-kernel, virt-sparsify, and virt-sysprep. This brings them closer in features with C tools. Most probably a couple more of other OCaml-based tools (virt-v2v to convert encrypted guests, and virt-builder to use encrypted
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
...otal - 2, 3); + buf[total - 2] = ':'; + + CAMLreturn (caml_copy_string (buf)); +} diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 3c54cd4a0..1a1d11075 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -33,6 +33,7 @@ external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc" external c_set_keys_from_stdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" "noalloc" extern...
2020 Jan 21
12
[PATCH 0/1] WIP: Support LUKS-encrypted partitions
The following patch attempts to implement sparsification of LUKS-encrypted partitions. It uses lsblk to pair the underlying LUKS block device with its mapped name. Also, --allow-discards was added by default to luks_open(). There are several potential issues that I can think of: 1) If and entire device is encrypted (not just one of more partitions), the lsblk trick might not work. 2) The
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...turn (Val_unit); } diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 2b2d43db9..ad08d05eb 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -22,7 +22,14 @@ open Std_utils open Common_gettext.Gettext open Getopt.OptionName -external c_inspect_decrypt : Guestfs.t -> int64 -> unit = "guestfs_int_mllib_inspect_decrypt" +type key_store = { + keys : (string, key_store_key) Hashtbl.t; +} +and key_store_key = + | KeyString of string + | KeyFileName of string + +external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_s...
2019 Mar 28
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
...total - 2] = ':'; + + CAMLreturn (caml_copy_string (buf)); +} diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 35478f39e..de42df600 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -32,6 +32,7 @@ and key_store_key = external c_inspect_decrypt : Guestfs.t -> int64 -> (string * key_store_key) list -> unit = "guestfs_int_mllib_inspect_decrypt" external c_set_echo_keys : unit -> unit = "guestfs_int_mllib_set_echo_keys" "noalloc" external c_set_keys_from_stdin : unit -> unit = "guestfs_int_...
2017 Sep 12
10
[PATCH v8 0/7] virt-builder-repository tool
Hi all, Here is the latest iteration on the virt-builder-repository series. Diffs to previous version are: fixing things mentioned by Pino, integrate Pino's osinfo ocaml iterator and adding a check of the mime type to filter potential image files. Cédric Bosdonnat (6): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry