The calling code only calls tun_afunix_exec_child if is_tun_afunix is true,
which checks that the path is having unix: as prefix.
But since adding an ASSERT here to ensure that it is really the case
does not cost us anything, just add the ASSERT.
Reported-By: Joshua Rogers <contact@joshua.hu>
Found-By: Zeropath
Change-Id: Idbb7bf279eb467fc1d56ab75a50b5eb2c8d0a57e
Signed-off-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1320
Message-Id: <
20251028115953.22487-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33934.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
const char *msgprefix = "ERROR: failure executing process for tun:";
struct argv argv = argv_new();
+ /* we should always called with a proper unix: dev node string */
+ ASSERT(dev_node && strncmp(dev_node, "unix:", strlen("unix:")) == 0);
/* since we know that dev-node starts with unix: we can just skip that
* to get the program name */
const char *program = dev_node + strlen("unix:");