Opened 5 years ago

Closed 5 years ago

#618 closed Bug / Defect (fixed)

OpenVPN 2.3.8 no longer asks for username/password

Reported by: ismail.donmez Owned by: Gert Döring
Priority: major Milestone: release 2.3.9
Component: Generic / unclassified Version: OpenVPN 2.3.8 (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords:
Cc: David Sommerseth, Gert Döring

Description

Since the daemonizing changes in the 2.3.8 release openvpn no longer asks for password when its started from systemd. This is with openSUSE 13.2 x86-64.

Attachments (2)

0001-Fix-systemd-errors-when-openvpn-is-started-when-ther.patch (2.4 KB) - added by David Sommerseth 5 years ago.
[PATCH] Fix systemd errors when openvpn is started when there is no tty available
0001-Fix-isatty-check-for-good.patch (2.6 KB) - added by Gert Döring 5 years ago.

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by David Sommerseth

[PATCH] Fix systemd errors when openvpn is started when there is no tty available

comment:1 Changed 5 years ago by David Sommerseth

The attached patch is a proposal fixing this issue, but it is needed to investigate if the original patch should do the isatty() check in a better place first.

comment:2 Changed 5 years ago by David Sommerseth

This patch breaks 'Enter Private Key Password' when starting OpenVPN via systemctl on the command line with a tty available. Username/password works as expected.

comment:3 Changed 5 years ago by Gert Döring

Owner: set to Gert Döring
Status: newaccepted

comment:4 Changed 5 years ago by Gert Döring

Milestone: release 2.3.9

Changed 5 years ago by Gert Döring

comment:5 Changed 5 years ago by Gert Döring

I think the patch I have attached should fix all issues - as in: I've tested all cases that I can reproduce here (no systemd, but auth-user-pass and passphrase-protected keys), and I understand why I broke systemd - the "do we have systemd?" branch happens right inside get_console_input() which I did not want to touch initially.

Could you please test this? Patch is against master, but should apply just as is to 2.3.8 or release/2.3 branch.

If this works, it will be part of 2.3.9 which will be shipped in the next few days.

(See also #630)

comment:6 Changed 5 years ago by Gert Döring

Resolution: fixed
Status: acceptedclosed

Selva ACKed on the mailing list and I got a "works for me" in #630, so here we go...

commit 015fe7177181fb4944ddf33debcfcd20c62ba55a (master)
commit db55abd9e28546874edd78fa50df594a78e794b9 (release/2.3)

Author: Gert Doering
Date: Wed Dec 9 21:03:55 2015 +0100

Fix isatty() check for good.

Signed-off-by: Gert Doering <gert@…>
Acked-by: Selva Nair <selva.nair@…>
Message-Id: <1449691435-5928-1-git-send-email-gert@…>

Note: See TracTickets for help on using tickets.