Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2159?usp=email

to review the following change.


Change subject: openvpnserv: accept a lone config file that passes validation
......................................................................

openvpnserv: accept a lone config file that passes validation

When the only option is a config file, ValidateOptions() checked it
with CheckOption() but returned FALSE even when the check passed. The
service then fell back to IsAuthorizedUser(), so users outside the
admin group could not start a config from the global config directory,
and got an empty error message.

Broken since f3c8a04d ("Restrict options/configs for startup through
interactive service").

Change-Id: I57469ca50c551ad475510690ecfa2d5e7cf9cfcf
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpnserv/interactive.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/59/2159/1

diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index 81205d6..28448c8 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -403,7 +403,8 @@
     {
         WCHAR *argv_tmp[2] = { L"--config", argv[first] };

-        if (!CheckOption(workdir, 2, argv_tmp, &settings))
+        ret = CheckOption(workdir, 2, argv_tmp, &settings);
+        if (!ret)
         {
             swprintf(errmsg, capacity, msg1, argv[first], workdir, 
settings.ovpn_admin_group);
         }

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2159?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I57469ca50c551ad475510690ecfa2d5e7cf9cfcf
Gerrit-Change-Number: 2159
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to