]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Move get_tmp_dir to win32-util.c and error out on failure
authorArne Schwabe <arne@rfc2549.org>
Mon, 8 Jan 2024 17:13:49 +0000 (18:13 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 8 Jan 2024 21:15:59 +0000 (22:15 +0100)
commitf0a17ed8513405af0efb1df2ab2bda3956e01910
treec35cf285225ec11262610d2884e7dd7ab66b56d4
parent7268e14dba61254b04a0b2db37c12c8ab58423ea
Move get_tmp_dir to win32-util.c and error out on failure

Currently we only warn in get_tmp_dir fails and set o->tmp_dir to
a null pointer. This will not be caught by check_file_access_chroot
either since that ignores NULL pointers but other parts of OpenVPN
will assume that tmp_dir is set to a non-NULL string.

Also move get_tmp_dir to win32-util.c to use it in unit tests.

Change-Id: I525ccf7872880367b248ebebb0ddc83551498042
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20240108171349.15871-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27964.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c
src/openvpn/win32-util.c
src/openvpn/win32-util.h
src/openvpn/win32.c
src/openvpn/win32.h