Ensure input read using systemd-ask-password is null terminated
Also properly check the return value of read() and leave room
for termination.
Fixes junk data occasionally seen in strings read through systemd.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <
1460606013-4983-1-git-send-email-selva.nair@gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11437
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit
d09fbf958f1c0b15372b3e87d784ae666b91a96b)