[L] Change in openvpn[master]: compat: close all unrelated fds in forked helpers

"razvanc \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <a9818a68d9a9f67d041bc61bc096dc0687aaa2f0-EmailReviewComments-HTML@gerrit.openvpn.net>
Attention is currently required from: plaisthos, srkyn.

razvanc has posted comments on this change by srkyn. ( http://gerrit.openvpn.net/c/openvpn/+/1881?usp=email )

Change subject: compat: close all unrelated fds in forked helpers
......................................................................


Patch Set 2:

(5 comments)

File CMakeLists.txt:

http://gerrit.openvpn.net/c/openvpn/+/1881/comment/3ffd533d_2460ca4e?usp=email :
PS2, Line 699:             )
This makes it look as if test_close_fds is somehow related to test_cryptoapi. Might be clearer to just put it under a separate `if (NOT WIN32)` block.


http://gerrit.openvpn.net/c/openvpn/+/1881/comment/4823d90e_d2c1c613?usp=email :
PS2, Line 852:             tests/unit_tests/openvpn/mock_get_random.c
Do you need `mock_get_random.c` here? The Automake version doesn't add it and it seems fine.


File src/compat/close-fds.c:

http://gerrit.openvpn.net/c/openvpn/+/1881/comment/ac18c82a_b964a594?usp=email :
PS2, Line 39: #ifdef HAVE_CLOSE_RANGE
I could be wrong (maybe I missed something subtle), but AFAICT this path can never be exercised under the CMake build.


http://gerrit.openvpn.net/c/openvpn/+/1881/comment/3da10afb_ecf791a5?usp=email :
PS2, Line 42:         const int lower_closed = keep == 3 || close_range(3, (unsigned int)keep - 1, 0) == 0;
This should probably be `bool` instead.


File tests/unit_tests/openvpn/Makefile.am:

http://gerrit.openvpn.net/c/openvpn/+/1881/comment/39623fc0_62c1a8bd?usp=email :
PS2, Line 52: close_fds_testdriver_CFLAGS = -I$(top_srcdir)/src/compat @TEST_CFLAGS@
This is the only testdriver whose CFLAGS omit `-I$(top_srcdir)/src/openvpn`. That breaks the mbedTLS build.



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

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iacd56d245e9ab30cfb25b2b364ca661fa289dc55
Gerrit-Change-Number: 1881
Gerrit-PatchSet: 2
Gerrit-Owner: srkyn <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-Reviewer: razvanc <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: srkyn <[email protected]>
Gerrit-Comment-Date: Sat, 29 Aug 2026 14:19:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.