summaryrefslogtreecommitdiffstats
path: root/src/openvpn/openvpn.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix using management interface to get passwords.Steffan Karger2015-07-211-2/+9
| | | | | | | | | | | | | | | | | | | | | Commits da9b292733e929a2900dc32d37f0424c3d588366 and 315f6fbc7f657a7f1127628bd714f468709d5185 broke the use case where we are asking password from the management client. The password is always asked before daemonization. With this fix we avoid this and ask it via management interface in the same spot as before the mentioned commits. Tested on Linux. v2: This patch was first submitted by Christian Pellegrin (from Google), and reworked by Steffan Karger (from the OpenVPN team) to also work for setups with --management-query-passwords but without --auth-user-pass. Signed-off-by: Steffan Karger <steffan@karger.me> Signed-off-by: Christian Pellegrin <chripell@google.com> Tested-by: Christian Pellegrin <chripell@google.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <55A6C46C.5080601@karger.me> URL: http://article.gmane.org/gmane.network.openvpn.devel/9927 Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit d4fbe287fc2ddbef05fdfe22adc641859a8a7412)
* fix regression: query password before becoming daemonSteffan Karger2015-07-131-1/+4
| | | | | | | | | | | | | | | | | The init sequence was changed to daemonize before the crypto init to fix issues on FreeBSD some commits ago. This introduced a regression where we would no longer query for passwords before daemonizing, as described in trac #574 and #576. This commit restores the correct order, and adds a bit of const correctness since we're touching this now code anyway. Signed-off-by: Steffan Karger <steffan@karger.me> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1436477759-5884-1-git-send-email-steffan@karger.me> URL: http://article.gmane.org/gmane.network.openvpn.devel/9901 Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit 315f6fbc7f657a7f1127628bd714f468709d5185)
* write pid file immediately after daemonizingSteffan Karger2015-06-211-1/+4
| | | | | | | | | | | | | | | | | | Since we split daemonizing from changing directory in commit da9b292 (f025de005d719201a69ad0313d545a1ddd244752 in release/2.3), we can now simply write the pid file immediately after daemonizing. This not only fixes the bug reported in trac #563, but also further simplifies the code. trac #563 Signed-off-by: Steffan Karger <steffan@karger.me> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1434665325-3225-1-git-send-email-steffan@karger.me> URL: http://article.gmane.org/gmane.network.openvpn.devel/9793 Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit 659eae7b79e5565bb0c93f6d6d04e2163fea1141)
* Call daemon() before initializing crypto librarySteffan Karger2015-05-261-0/+4
| | | | | | | | | | | | | | | | | | | 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)
* Add SSL library version reporting.Gert Doering2014-04-181-0/+1
| | | | | | | | | | | | | Print the version of the SSL and LZO library (if any) used. SSL library version is also sent as IV_SSL=<version> to the server if --push-peer-info is enabled. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Steffan Karger <steffan.karger@fox-it.com> Message-Id: <20140416152456.GI16637@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/8537 (cherry picked from commit 1ec984b154aa3247ef58c9d44e7e477880b632b1)
* Fix slow memory drain on each client renegotiation.Gert Doering2013-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | This reverts commit bee92b479414d12035b0422f81ac5fcfe14fa645 and parts of commit dc7be6d078ba106f9b0de12f3e879c3561c3c537, as these introduced a subtle memory drain on client renegotiations (es->gc got initialized, which led to "unused" gc_entry records accumulating while a client is connected). Setting es->gc=NULL causes env_set_add_nolock() / remove_env_item() to free() allocated and no longer used strings in the es, while an active gc would leave them for cleanup with gc_free() at client disconnect time. Signed-off-by: Gert Doering <gert@greenie.muc.de> Conflicts: src/openvpn/buffer.c Acked-by: David Sommerseth <dazo@users.sourceforge.net> Message-Id: <20131023162618.GP161@greenie.muc.de> URL: http://article.gmane.org/gmane.network.openvpn.devel/7939 (cherry picked from commit 4368147972d61b598bbcd5d2904d891130d5e517)
* cleanup: windows: convert argv (UCS-2 to UTF-8) at earliestAlon Bar-Lev2012-06-291-1/+36
| | | | | | | | | | | | | | | | Discussed at [1]. Use wmain under windows, drop the custom parsing and shell32 linkage. There is no need for gc magic as this allocation is static. [1] http://permalink.gmane.org/gmane.network.openvpn.devel/5433 Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Message-Id: 1332621070-28464-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6063 Tested-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: move out config.h include from sysheadAlon Bar-Lev2012-03-221-0/+6
| | | | | | | | | | | Yet another step in reducing the syshead.h content. Conditional compilation of sources needs to be based on a minimum program prefix (config.h only). Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: standard directory layoutAlon Bar-Lev2012-03-221-0/+285
Suitable for mature project. root - administrative stuff doc - documents src - sources tests - tests distro - distro specific files sample - samples SIDE EFFECT: many changes to rpm spec. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Adriaan de Jong <dejong@fox-it.com> Signed-off-by: David Sommerseth <davids@redhat.com>