Displaying 20 results from an estimated 32 matches for "key_opts".
2018 Sep 19
0
[PATCH 1/2] mltools: create a cmdline_options struct
...ls/tools_utils.ml
index c4f230275..2b2d43db9 100644
--- a/common/mltools/tools_utils.ml
+++ b/common/mltools/tools_utils.ml
@@ -259,6 +259,10 @@ let machine_readable () =
in
Some { pr }
+type cmdline_options = {
+ getopt : Getopt.t;
+}
+
let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg =
(** Install an exit hook to check gc consistency for --debug-gc *)
let set_debug_gc () =
@@ -306,7 +310,10 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read
[ L"machine-readable" ], Getopt.Op...
2018 Sep 20
1
Re: [PATCH 1/2] mltools: create a cmdline_options struct
.../mltools/tools_utils.mli
> @@ -74,7 +74,13 @@ val machine_readable : unit -> machine_readable_fn option
> readable output to, in case it was enabled via
> [--machine-readable]. *)
>
> -val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> Getopt.t
> +type cmdline_options = {
> + getopt : Getopt.t; (** The actual Getopt handle. *)
> +}
> +(** Structure representing all the data needed for handling command
> + line options. *)
> +
> +v...
2018 Aug 20
2
[PATCH 1/2] mlstdutils/mltools: factorize the machine-readable option
...with [filename]
diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml
index 09f1bb544..04916b89a 100644
--- a/common/mltools/tools_utils.ml
+++ b/common/mltools/tools_utils.ml
@@ -229,7 +229,7 @@ let human_size i =
)
)
-let create_standard_options argspec ?anon_fun ?(key_opts = false) usage_msg =
+let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg =
(** Install an exit hook to check gc consistency for --debug-gc *)
let set_debug_gc () =
at_exit (fun () -> Gc.compact()) in
@@ -249,6 +249,11 @@ let create_...
2016 Sep 19
0
[PATCH 2/3] mllib: expose disk decrypt functionalities
...tdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" "noalloc"
+
module Char = struct
include Char
@@ -591,7 +595,7 @@ let human_size i =
)
)
-let create_standard_options argspec ?anon_fun usage_msg =
+let create_standard_options argspec ?anon_fun ?(key_opts = false) usage_msg =
(** Install an exit hook to check gc consistency for --debug-gc *)
let set_debug_gc () =
at_exit (fun () -> Gc.compact()) in
@@ -604,6 +608,14 @@ let create_standard_options argspec ?anon_fun usage_msg =
[ L"color"; L"colors";
L&quo...
2002 Jan 29
2
Key fingerprint logging
Hello there!
I have made a patch against OpenSSH 3.0.2p1 which allows the fingerprint of
the accepted key to be printed in the log message. It works with SSH1-RSA and
SSH2 pubkey (DSA+RSA) authentication.
This feature is controllable by the LogKeyFingerprint config option (turned
off by default).
Michal Kara
-------------- next part --------------
diff -u5
2016 Sep 19
0
[PATCH 3/3] OCaml tools: add crypto support (RHBZ#1362649)
.../customize/customize_main.ml
@@ -102,7 +102,7 @@ A short summary of the options is given below. For detailed help please
read the man page virt-customize(1).
")
prog in
- let opthandle = create_standard_options argspec usage_msg in
+ let opthandle = create_standard_options argspec ~key_opts:true usage_msg in
Getopt.parse opthandle;
if not !format_consumed then
@@ -175,6 +175,9 @@ read the man page virt-customize(1).
g#launch ();
g in
+ (* Decrypt the disks. *)
+ inspect_decrypt g;
+
(* Inspection. *)
(match Array.to_list (g#inspect_os ()) with
| [] ->...
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 +-
2003 May 16
4
[RFC] report options
I have hinted in the past of wanting to go to a more
selective control of the output of rsync. Here it is.
PROBLEMS with the existing --verbose et al.
The simple incrementing verbose doesn't allow one to
restrict stdout to what actually is of interest. For
instance inside dirvish i don't care about directories,
or any kind of non-regular file because they show up every
time even if
2018 Aug 20
0
[PATCH 2/2] OCaml tools: simplify machine-readable handling
...s_"Use unversioned names for files";
@@ -71,13 +69,13 @@ A short summary of the options is given below. For detailed help please
read the man page virt-get-kernel(1).
")
prog in
- let opthandle = create_standard_options argspec ~key_opts:true usage_msg in
+ let opthandle = create_standard_options argspec ~key_opts:true ~machine_readable:true usage_msg in
Getopt.parse opthandle;
(* Machine-readable mode? Print out some facts about what
* this binary supports.
*)
- if !machine_readable then (
+ if machine_readable...
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
2018 Aug 21
0
[PATCH 2/2] OCaml tools: add output selection for --machine-readable
...match !machine_readable_channel with
+ | Some chan -> chan
+ | None ->
+ let chan = open_machine_readable_channel () in
+ machine_readable_channel := Some chan;
+ chan
+ in
+ fprintf (get_machine_readable_channel ()) fs
+
let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg =
(** Install an exit hook to check gc consistency for --debug-gc *)
let set_debug_gc () =
at_exit (fun () -> Gc.compact()) in
+ let parse_machine_readable = function
+ | None ->
+ machine_readable_output := Channel stdout;
+...
2017 May 22
1
[PATCH] v2v: add crypto support (RHBZ#1451665)
...v2v/cmdline.ml
@@ -236,7 +236,7 @@ A short summary of the options is given below. For detailed help please
read the man page virt-v2v(1).
")
prog in
- let opthandle = create_standard_options argspec ~anon_fun usage_msg in
+ let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true usage_msg in
Getopt.parse opthandle;
(* Dereference the arguments. *)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 8cf1fad..59f5ef1 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -86,6 +86,9 @@ let rec main () =
g#launch ();
+ (* Decrypt the disks. *)
+ inspect_decrypt g;
+
(* I...
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
..."
external c_set_keys_from_stdin : unit -> unit = "guestfs_int_mllib_set_keys_from_stdin" "noalloc"
@@ -261,6 +268,7 @@ let machine_readable () =
type cmdline_options = {
getopt : Getopt.t;
+ ks : key_store;
}
let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg =
@@ -288,6 +296,9 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read
error (f_"invalid output for --machine-readable: %s") fmt
)
in
+ let ks = {
+ keys = Hashtbl.create 13;
+ } in
l...
2010 Apr 29
12
[Bug 1765] New: Error message if key not first in authorized_keys file
https://bugzilla.mindrot.org/show_bug.cgi?id=1765
Summary: Error message if key not first in authorized_keys file
Product: Portable OpenSSH
Version: 5.5p1
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: sshd
AssignedTo: unassigned-bugs at mindrot.org
2019 Jan 16
0
[PATCH 2/5] mltools: create a new external_command_code
...files changed, 18 insertions(+), 12 deletions(-)
diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml
index 3b1554c5a..e6b2b5713 100644
--- a/common/mltools/tools_utils.ml
+++ b/common/mltools/tools_utils.ml
@@ -338,7 +338,13 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read
}
(* Run an external command, slurp up the output as a list of lines. *)
-let external_command ?(echo_cmd = true) cmd =
+let rec external_command ?(echo_cmd = true) cmd =
+ let lines, exitcode = external_command_code ~echo_cmd cmd in
+ if exitcode <> 0 then
+...
2019 Mar 28
0
[PATCH v2 3/4] common/mltools: allow fd for machine readable output
...+ | Fd fd ->
+ (* Note that Unix.file_descr is really just an int. *)
+ Some (Unix.out_channel_of_descr (Obj.magic fd)) in
machine_readable_channel := chan
);
!machine_readable_channel
@@ -296,6 +300,11 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read
| n ->
error (f_"invalid output stream for --machine-readable: %s") fmt in
machine_readable_output := Channel chan
+ | "fd" ->
+ (try
+ machine_readable_output := Fd (int_of_string outname)
+...
2019 Mar 22
0
[PATCH 3/4] common/mltools: allow fd for machine readable output
...e chan
- | File f -> Some (open_out f) in
+ | File f -> Some (open_out f)
+ | Fd fd -> Some (c_out_channel_from_fd fd) in
machine_readable_channel := chan
);
!machine_readable_channel
@@ -296,6 +299,11 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read
| n ->
error (f_"invalid output stream for --machine-readable: %s") fmt in
machine_readable_output := Channel chan
+ | "fd" ->
+ (try
+ machine_readable_output := Fd (int_of_string outname)
+...
2018 Aug 21
4
[PATCH 0/2] RFC: add output selection for --machine-readable
Hi,
this is a first approach (hence RFC, since it misses tests &
documentation) in selecting the output for --machine-readable.
The possible choices are:
* --machine-readable: to stdout, like before
* --machine-readable=file:name-of-file: to the specified file
* --machine-readable=stream:stdout: explicitly to stdout
* --machine-readable=stream:stderr: explicitly to stderr
This makes it
2018 Aug 23
0
[PATCH v2 2/2] OCaml tools: add output selection for --machine-readable
...Some (open_out f) in
+ machine_readable_channel := chan
+ );
+ !machine_readable_channel
+ in
+ match chan with
+ | None -> None
+ | Some chan ->
+ let pr fs =
+ ksprintf (output_string chan) fs
+ in
+ Some { pr }
+
let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_readable = false) usage_msg =
(** Install an exit hook to check gc consistency for --debug-gc *)
let set_debug_gc () =
at_exit (fun () -> Gc.compact()) in
+ let parse_machine_readable = function
+ | None ->
+ machine_readable_output := Channel stdout
+...
2019 Jan 16
2
Re: [PATCH 2/5] mltools: create a new external_command_code
...), 12 deletions(-)
>
> diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml
> index 3b1554c5a..e6b2b5713 100644
> --- a/common/mltools/tools_utils.ml
> +++ b/common/mltools/tools_utils.ml
> @@ -338,7 +338,13 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ?(machine_read
> }
>
> (* Run an external command, slurp up the output as a list of lines. *)
> -let external_command ?(echo_cmd = true) cmd =
> +let rec external_command ?(echo_cmd = true) cmd =
> + let lines, exitcode = external_command_code ~echo_cmd cmd in
>...