wireshark/capture
Tomasz Moń c6ef99f006
win32-utils: Explicitly list inherited handles
Windows processes inherit all inheritable handles when a new process is
created using CreateProcess() with bInheritHandles set to TRUE. This can
lead to undesired object lifetime extension. That is, the child process
will keep ineritable handles alive even if it does not use them. Up to
Windows Vista it was not possible explicitly list handles that should be
inherited. Wireshark no longer works on Windows releases earlier than
Vista, so use the new API without checking Windows version.

Require all callers to win32_create_process() to pass in the list of
handles to inherit. Set the listed handles as inheritable shortly before
calling CreateProcess() and set them as not inheritable shortly after
the process is created. This minimizes possibility for other callers
(especially in 3rd party libraries) to inherit handles by accident.

Do not terminate mmdbresolve process on exit. Instead rely on process
exit when EOF is received on standard input. Previously the EOF was
never received because mmdbresolve inherited both ends of standard input
pipe, i.e. the fact that Wireshark closed the write end was not observed
by mmdbresolve because mmdbresolve kept write handle the standard input
pipe open.
2022-08-16 20:53:22 +02:00
..
.editorconfig
CMakeLists.txt CMake: Adjust wsutil includes and linking. 2021-07-14 03:56:05 +00:00
airpcap.h Revert "A small for for the Doxygen warning:" 2022-06-20 09:56:54 +00:00
airpcap_loader.c Windows: Fix build 2022-02-24 20:29:04 +00:00
airpcap_loader.h Windows: Fix build 2022-02-24 20:29:04 +00:00
capture-pcap-util-int.h capture: Add header files to Doxygen 2021-11-30 06:27:26 +00:00
capture-pcap-util-unix.c dumpcap: Fix a TODO for Npcap test 2022-02-24 21:15:51 +00:00
capture-pcap-util.c Replace g_strdup_printf() with ws_strdup_printf() 2021-12-19 21:21:58 +00:00
capture-pcap-util.h dumpcap: Fix a TODO for Npcap test 2022-02-24 21:15:51 +00:00
capture-wpcap.c dumpcap: Fix a TODO for Npcap test 2022-02-24 21:15:51 +00:00
capture-wpcap.h capture: Add header files to Doxygen 2021-11-30 06:27:26 +00:00
capture_ifinfo.c Replace g_strdup_printf() with ws_strdup_printf() 2021-12-19 21:21:58 +00:00
capture_ifinfo.h capture: Add header files to Doxygen 2021-11-30 06:27:26 +00:00
capture_session.h extcap: Close capture session after extcap finishes 2022-08-10 06:18:15 +02:00
capture_sync.c win32-utils: Explicitly list inherited handles 2022-08-16 20:53:22 +02:00
capture_sync.h Clean up handling of --capture-comment. 2021-07-15 05:43:36 +00:00
capture_win_ifnames.c Refactor our logging and extend the wslog API 2021-06-11 09:40:28 +00:00
capture_win_ifnames.h capture: Add header files to Doxygen 2021-11-30 06:27:26 +00:00
iface_monitor.c Replace g_snprintf() with snprintf() 2021-12-19 20:06:13 +00:00
iface_monitor.h capture: Add header files to Doxygen 2021-11-30 06:27:26 +00:00
ws80211_utils.c Replace g_strdup_printf() with ws_strdup_printf() 2021-12-19 21:21:58 +00:00
ws80211_utils.h capture: Add header files to Doxygen 2021-11-30 06:27:26 +00:00