On 25/05/16 00:53, Selva Nair wrote:
> Do not mask input when echo is requested. Useful for username
> input and sometimes for challenge response.
> 
> Signed-off-by: Selva Nair <selva.n...@gmail.com>
> ---
>  src/openvpn/console.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/openvpn/console.c b/src/openvpn/console.c
> index 86331a1..8a8acb4 100644
> --- a/src/openvpn/console.c
> +++ b/src/openvpn/console.c
> @@ -167,7 +167,10 @@ get_console_input_systemd (const char *prompt, const 
> bool echo, char *input, con
>  
>    argv_init (&argv);
>    argv_printf (&argv, SYSTEMD_ASK_PASSWORD_PATH);
> -  argv_printf_cat (&argv, "%s", prompt);
> +  if (echo)
> +    argv_printf_cat (&argv, "--echo %s", prompt);
> +  else
> +    argv_printf_cat (&argv, "%s", prompt);
>  
>    if ((std_out = openvpn_popen (&argv, NULL)) < 0) {
>         return false;
> 

Hi Selva,

Thanks a lot!  This patch do make sense, feature wise.  And we already
have basically that in a patch queue already.  The problem with this
approach is that it may break systems with systemd older than version 216.

Gert also requested that this whole interface should be made less "linux
specific" [1], so I started on a patchset which makes the
query-user-input interface far more modular.  But I need to get start
hacking on a v4 of that patch set as Gert didn't like several things in
the previous attempt [2].

[1] <http://thread.gmane.org/gmane.network.openvpn.devel/9085/focus=9091>
[2] <http://thread.gmane.org/gmane.network.openvpn.devel/10021/>

I've just changed employer, and OpenVPN is truly part of what I will be
working on.  So getting the query-user-input patches through is high up
on my list.  I just need to get settled with my new employer and I'll
start hacking on it.  But your patch is pretty much identical to what
I've already proposed [3].

[3] <http://thread.gmane.org/gmane.network.openvpn.devel/10021/focus=10019>


-- 
kind regards,

David Sommerseth


Reply via email to