]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Call daemon() before initializing crypto library
authorSteffan Karger <steffan@karger.me>
Mon, 27 Apr 2015 14:28:57 +0000 (16:28 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 26 May 2015 14:10:08 +0000 (16:10 +0200)
commitf025de005d719201a69ad0313d545a1ddd244752
tree03ff203a86684ef2a98bc04c80263f78d05b5928
parent7895590cf1f513f508132f8987fee8fef2759df7
Call daemon() before initializing crypto library

But keep the chdir to / at the place where deamon() was before, to preserve
the current behaviour wrt relative paths in the config.

This should fix the issue reported in trac #480, without changing the
behaviour visible to the end user.

Note that by moving the daemon() call to an earlier stage of the init
process, we no longer have to call platform_mlockall() again, or do a
pkcs11_forkFixup().

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1430144937-4149-1-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9609
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit da9b292733e929a2900dc32d37f0424c3d588366)
src/openvpn/init.c
src/openvpn/init.h
src/openvpn/openvpn.c
src/openvpn/pkcs11.c
src/openvpn/pkcs11.h