From: Razvan Cojocaru <[email protected]> read() returning -1 was taken as success, so a failed read from systemd-ask-password yielded an empty response instead of an error.
Change-Id: Ic49db236b36014ea6ee621a09252a534e3d05ef7 Signed-off-by: Razvan Cojocaru <[email protected]> Acked-by: Frank Lichtenheld <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2205 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2205 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld <[email protected]> diff --git a/src/openvpn/console_systemd.c b/src/openvpn/console_systemd.c index f0ca7fa..059686f 100644 --- a/src/openvpn/console_systemd.c +++ b/src/openvpn/console_systemd.c @@ -76,7 +76,7 @@ return false; } memset(input, 0, capacity); - if (read(std_out, input, capacity - 1) != 0) + if (read(std_out, input, capacity - 1) > 0) { chomp(input); ret = true; _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
