Skip to content

Fix CR prompt with --auth-user-pass + R from a file

Wayne Davison openvpn-devel 1 version In review

Get series with b4
b4 am [email protected]...

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Fix CR prompt with --auth-user-pass & support reading response.doc/openvpn.8 src/openvpn/misc.c+29 -1014 replies
2/2Fix indentation of just-tweaked section plus an off-by-one section.src/openvpn/misc.c+60 -600 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Openvpn-devel] [PATCH 0/2] Fix CR prompt with --auth-user-pass + R from a file

There is a bug in the challenge/response code when the username & password is read from a file -- the response is never prompted for. This bug affects older versions, including 2.3.8. The following patchset applies to master, and uses a similar bool idiom as what has been added for user & pass.

I also added code to read the response out of the --auth-user-pass file if there is a 3rd line present. This is particularly useful for an 2FA setup where the response is unchanging (in my case it is always "push" for a Duo Push).

The master branch already supports treating an empty password in the file as indicating that the password should be prompted from the user (2.3.8 used to complain), so I also amended the manpage to mention that the password can be empty in addition to its line not being present. This allows me to use a file that contains user / empty-pass / "push" and have openvpn just prompt me for my password.

I've broken the patch up into 2 parts for clarity, since it re-indents a large section of code. The 2nd patch also fixes an off-by-one indentation that is in the same file. Feel free to merge the patches together, as you see fit.