[Openvpn-devel,v1] check_file_access: fix --extra-certs access check

Message ID 20261102115818.14189-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] check_file_access: fix --extra-certs access check |

Commit Message

Gert Doering Nov. 2, 2026, 11:58 a.m. UTC
  From: Razvan Cojocaru <razvanc@mailbox.org>

The file name was passed as the is_inline flag, so the check was
always skipped. Pass extra_certs_file_inline instead.

Broken since cb2e9218 ("convert *_inline attributes to bool").

Change-Id: Ia3f6dd4ce35869c92619ce0c56eeda8796bde006
Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2084
---

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/+/2084
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <frank@lichtenheld.com>
  

Patch

diff --git a/src/openvpn/check_file_access.c b/src/openvpn/check_file_access.c
index 83654b2..25d7f90 100644
--- a/src/openvpn/check_file_access.c
+++ b/src/openvpn/check_file_access.c
@@ -267,7 +267,7 @@ 
     errs |= check_file_access_inline(options->cert_file_inline, CHKACC_FILE | CHKACC_ACCEPT_URI,
                                      options->cert_file, R_OK, "--cert");
 
-    errs |= check_file_access_inline(options->extra_certs_file, CHKACC_FILE,
+    errs |= check_file_access_inline(options->extra_certs_file_inline, CHKACC_FILE,
                                      options->extra_certs_file, R_OK, "--extra-certs");
 
     if (!(options->management_flags & MF_EXTERNAL_KEY))