0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-19 19:42:30 +02:00
Commit Graph

663 Commits

Author SHA1 Message Date
Steffan Karger
a9f5c744d6
Fix bounds check in read_key()
The bounds check in read_key() was performed after using the value, instead
of before.  If 'key-method 1' is used, this allowed an attacker to send a
malformed packet to trigger a stack buffer overflow.

Fix this by moving the input validation to before the writes.

Note that 'key-method 1' has been replaced by 'key method 2' as the default
in OpenVPN 2.0 (released on 2005-04-17), and explicitly deprecated in 2.4
and marked for removal in 2.5.  This should limit the amount of users
impacted by this issue.

CVE: 2017-12166
Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <80690690-67ac-3320-1891-9fecedc6a1fa@fox-it.com>
URL: https://www.mail-archive.com/search?l=mid&q=80690690-67ac-3320-1891-9fecedc6a1fa@fox-it.com
Signed-off-by: David Sommerseth <davids@openvpn.net>
(cherry picked from commit fce3437529)
2017-09-22 01:31:06 +02:00
Guido Vranken
4bec9d25d5 Prevent two kinds of stack buffer OOB reads and a crash for invalid input data
Pre-authentication remote crash/information disclosure for clients

If clients use a HTTP proxy with NTLM authentication (i.e.
"--http-proxy <server> <port> [<authfile>|'auto'|'auto-nct'] ntlm2"),
a man-in-the-middle attacker between the client and the proxy can
cause the client to crash or disclose at most 96 bytes of stack
memory. The disclosed stack memory is likely to contain the proxy
password.

If the proxy password is not reused, this is unlikely to compromise
the security of the OpenVPN tunnel itself.  Clients who do not use
the --http-proxy option with ntlm2 authentication are not affected.

CVE: 2017-7520
Signed-off-by: Guido Vranken <guidovranken@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <CAO5O-EJvHKid-zTj+hmFG_3Gv78ixqCayE9=C62DZaxN32WNtQ@mail.gmail.com>
URL: https://www.mail-archive.com/search?l=mid&q=CAO5O-EJvHKid-zTj+hmFG_3Gv78ixqCayE9=C62DZaxN32WNtQ@mail.gmail.com
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 7718c8984f)
(cherry picked from commit f38a4a1059)
2017-06-19 21:13:09 +02:00
Gert Doering
2cc3583ddb Fix potential 1-byte overread in TCP option parsing.
A malformed TCP header could lead to a one-byte overread when
searching for the MSS option (but as far as we know, with no
adverse consequences).

Change outer loop to always ensure there's one extra byte available
in the buffer examined.

Technically, this would cause OpenVPN to ignore the only single-byte
TCP option available, 'NOP', if it ends up being the very last
option in the buffer - so what, it's a NOP anyway, and all we
are interested is MSS, which needs 4 bytes.
(https://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml)

Found and reported by Guido Vranken <guidovranken@gmail.com>.

Trac: #745

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20170618194104.25179-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14874.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 22046a8834)
(cherry picked from commit 4d343fbe91)
2017-06-18 22:04:30 +02:00
Guido Vranken
0c8cf64cc1 Fix a null-pointer dereference in establish_http_proxy_passthru()
Prevents that the client crashes if the peer does not specify
the 'realm' and/or 'nonce' values. These pointers are
dereferenced in DigestCalcHA1() and DigestCalcResponse();
hence, if not set, a null-pointer dereference would occur.

Signed-off-by: Guido Vranken <guidovranken@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1497574736-2092-1-git-send-email-gv@guidovranken.nl>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14844.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 14865773ad)
(cherry picked from commit 479b6d13d8)
2017-06-16 09:21:00 +02:00
Guido Vranken
ce0f075c2c Fix 2 memory leaks in proxy authentication routine
Signed-off-by: Guido Vranken <guidovranken@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <CAO5O-EL11jDxO+c1Gu0FvunqwUTW2uxjy910+A-s63Nr5O3NWw@mail.gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14758.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 8d606cd3f6)
(cherry picked from commit a95927638f)
2017-06-13 09:14:57 +02:00
Guido Vranken
23d632de5d refactor my_strupr
Refactor my_strupr such that it will not check and possibly alter bytes
after the string's null terminator for strings of length 0.

Signed-off-by: Guido Vranken <guidovranken@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <CAO5O-ELXwXgGtRFou=FY1TAhW4W4BHPZF4=rqSY877njtXNMJg@mail.gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14756.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 69162924de)
(cherry picked from commit 8dd598e89f)
2017-06-13 09:13:40 +02:00
Steffan Karger
66576f9903 Drop packets instead of assert out if packet id rolls over (CVE-2017-7479)
Previously, if a mode was selected where packet ids are not allowed to roll
over, but renegotiation does not succeed for some reason (e.g. no password
entered in time, certificate expired or a malicious peer that refuses the
renegotiaion on purpose) we would continue to use the old keys.  Until the
packet ID would roll over and we would ASSERT() out.

Given that this can be triggered on purpose by an authenticated peer, this
is a fix for an authenticated remote DoS vulnerability.  An attack is
rather inefficient though; a peer would need to get us to send 2^32
packets (min-size packet is IP+UDP+OPCODE+PID+TAG (no payload), results in
(20+8+1+4+16)*2^32 bytes, or approx. 196 GB).

This is a fix for finding 5.2 from the OSTIF / Quarkslab audit.

This patch was cherry-picked from b727643c (release/2.3).

CVE: 2017-7479
Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1494537221-12050-3-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14645.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2017-06-13 09:02:02 +02:00
Steffan Karger
aded941686 cleanup: merge packet_id_alloc_outgoing() into packet_id_write()
The functions packet_id_alloc_outgoing() and packet_id_write() were
always called in tandem.  Instead of forcing the caller to allocate a
packet_id_net to do so, merge the two functions.  This simplifies the API
and reduces the chance on mistakes in the future.

This patch was cherry-picked from 5d747770 (release/2.3), with the unit
tests removed because release/2.2 does not have unit tests.

Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1494537221-12050-2-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14644.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2017-06-13 09:01:53 +02:00
Steffan Karger
9162db3d28 Update sample-keys
So 'make check' works again - the old keys were expired.  These are now
the same keys as we use in release/2.3, release/2.4 and master.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1494537221-12050-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14643.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2017-06-13 08:51:15 +02:00
Gert Doering
36201524c5 Preparing for v2.2.3 release (ChangeLog, version.m4).
This really is a bugfix-only mini release - no new features, just
a few major bugs fixed in the 2.3.x series backported to 2.2.2.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2014-11-30 19:04:44 +01:00
Jens Wagner
fc3e1657f1 Fix spurious ignoring of pushed config options (trac#349).
The function incoming_push_message(...) in push.c uses a local variable
option_types_found, that gets passed to do_up(...).

If the server push got split into several parts, only the last part
(PUSH_MSG_REPLY) option_types_found is used for do_up (initilized as 0
locally), the previous ones (PUSH_MSG_CONTINUATION) are ignored.

So e.g. a ping config, pushed by the server in the first push, followed
by a lot of "push route" configs, causing a second push message, will
have the do_up() called, but without e.g. the OPT_P_TIMER flag, so those
options will be silently ignored.

The patch resolves that, by introducing "push_option_types_found" in
"c->options" and using that as storage.

Fix trac bug #349.

Acked-by: Gert Doering <gert@greenie.muc.de>
URL: https://community.openvpn.net/openvpn/ticket/349
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 1aac9a0b7a)
2014-11-30 18:52:41 +01:00
Christian Niessner
e5e01614c4 Fix corner case in NTLM authentication (trac #172)
The problem is located in the file proxy.c within
"establish_http_proxy_passthru": To keep buffers small long
base64-encoded NTLM-Strings are truncated.

But the truncating is done on a wrong place: base 64 strings can be
cut every 4 chars. the buffer is 128 bytes - including the terminating
\0, so the usable data is only 127 bytes. And decoding a 127 char
base64 string fails... this is why the ntlm authentication fails in
certain cases (long strings)...

Acked-by: Joerg Willmann <joe@clnt.de>
URL: https://community.openvpn.net/openvpn/ticket/172

Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit f8ac53b98e)
2014-11-30 18:51:34 +01:00
Gert Doering
1ef95ee216 Fix client crash on double PUSH_REPLY.
Introduce an extra bool variable c2.pulled_options_md5_init_done to
keep track of md5_init state of pulled_options_state - avoid accessing
uninitialized state when a second PUSH_REPLY comes in (which only happens
under very particular circumstances).

Bug tracked down by Arne Schwabe <arne@rfc2549.rrg>.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: 20121225124856.GT22465@greenie.muc.de
URL: http://article.gmane.org/gmane.network.openvpn.devel/7216
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 1978db4b96)
2014-11-30 18:35:35 +01:00
Matthias Andree
74d9119c2b Enable TCP_NODELAY configuration on FreeBSD.
The missing #include <netinet/tcp.h> causes a defined(TCP_NODELAY) to
fail.  I have added the patch to the FreeBSD ports OpenVPN 2.2.2 and
2.3.0, and confirmed (with strings ... | grep) that the TCP_NODELAY code
is now part of the executable on amd64, and results in this log output:

Sat Jan 12 13:39:18 2013 Listening for incoming TCP connection on [undef]
Sat Jan 12 13:39:18 2013 Socket flags: TCP_NODELAY=1 succeeded

Obtained from: https://community.openvpn.net/openvpn/ticket/158
Credits to: M. Nottebrock

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: 1357994477-29981-1-git-send-email-matthias.andree@gmx.de
URL: http://article.gmane.org/gmane.network.openvpn.devel/7230
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 3e86f68875)
2014-11-29 14:59:42 +01:00
Steffan Karger
d106cf240f Use constant time memcmp when comparing HMACs in openvpn_decrypt.
Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 11d21349a4)
2014-11-29 14:57:11 +01:00
Steffan Karger
1be49401a3 Drop too-short control channel packets instead of asserting out.
This fixes a denial-of-service vulnerability where an authenticated client
could stop the server by triggering a server-side ASSERT().

OpenVPN would previously ASSERT() that control channel packets have a
payload of at least 4 bytes. An authenticated client could trigger this
assert by sending a too-short control channel packet to the server.

Thanks to Dragana Damjanovic for reporting the issue.

This bug has been assigned CVE-2014-8104.

Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1CED409804E2164C8104F9E623B08B9018803B0FE7@FOXDFT02.FOX.local>
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit c5590a6821)
2014-11-28 20:34:47 +01:00
David Sommerseth
12158e5a92 Preparing for v2.2.2 release
ChangeLog got a few updates for the the v2.2.1 section as well.  One
typo, plus some layout fixes.

Signed-off-by: David Sommerseth <davids@redhat.com>
2011-12-14 12:17:45 +01:00
samuli@openvpn.net
81ce1d45f8 Backported pkcs11-related parts of 7a8d707237 to 2.2 branch
Fixes https://community.openvpn.net/openvpn/ticket/145

Trac: 145
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-12-14 11:27:20 +01:00
David Sommerseth
b7bbe47a7f Only warn about non-tackled IPv6 packets once
When using OpenVPN 2.2 on clients and server with Windows based
clients, it will try to push IPv6 packets through the tunnel.  This
causes the server log to be filled up with log entries like this:

 Wed Jun 29 22:12:51 2011 username/1.2.3.4:56990 Need IPv6 code in mroute_extract_addr_from_packet

This patch modifies this message to state that IPv6 packets are not
tackled in tun mode, and prints it only once.

Trac: 147
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
2011-12-13 21:16:25 +01:00
Gert Doering
ed77e8ad8e log error message and exit for "win32, tun mode, tap driver version 9.8"
(driver is known-buggy for small IPv4 packets in tun mode)

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry-picked from commit 03ab4ead82)
2011-11-23 16:10:21 +01:00
Gert Doering
066df6aa44 bump tap driver version from 9.8 to 9.9
(bugfixed tapdrvr.c regarding small IPv4 packets)

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 1523d11012)
2011-11-23 16:04:23 +01:00
Gert Doering
c5b9d40f0f add missing break between "case IPv4" and "case IPv6", leading to the
minimum-size for IPv6 being applied to IPv4 packets, subsequently
leading to drop of small-sized IPv4 packets.

Bug found & fixed by Christian Niessner.

Signed-off-by: Christian Niessner <bug-report@secadm.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 10b99726a3)
2011-11-10 20:26:26 +01:00
David Sommerseth
68deffc892 Prepared for releasing OpenVPN 2.2.1
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-07-01 11:18:51 +02:00
Samuli Seppänen
924e2d9db3 Fixes to easy-rsa/2.0
As support for OpenSSL 1.0.0 requires a modified openssl.cnf file, it was
decided to rename openssl.cnf to openssl-1.0.0.cnf for clarity and better
support of different OpenSSL versions. The old openssl.cnf was renamed as
openssl-0.9.8.cnf.

This patch makes sure that all openssl*.cnf files are copied when running 'make
install' in easy-rsa and makes the whichopensslcnf script aware of them as well.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-07-01 10:31:42 +02:00
Samuli Seppänen
5d14fcd885 Made domake-win builds to use easy-rsa/2.0/openssl-1.0.0.cnf
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-07-01 10:31:42 +02:00
Samuli Seppänen
4ec60a5839 Updated "easy-rsa" for OpenSSL 1.0.0
This patch fixes remaining issues with Trac ticket #125. It does the following:

- Update easy-rsa/2.0/README
- Rename easy-rsa/2.0/openssl.cnf as openssl-0.9.8.cnf
- Add easy-rsa/2.0/openssl-1.0.0.cnf
- Updated vars.bat.sample to use openssl-1.0.0.cnf
- Updated win/openvpn.nsi to use openssl-1.0.0.cnf
- Add a few undefined variables to vars and vars.bat.sample:
  required by OpenSSL 1.0.0 (at least on Windows)

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Tested-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2011-07-01 10:31:26 +02:00
David Sommerseth
6ab3848244 Revert "Add new openssl.cnf to easy-rsa/Windows"
This reverts commit 6989cbde61.

Accoding to Jan Just Keijser [1] there are issues with this new
openssl.cnf file, so reverting this commit and wait for a new patch.

[1] http://thread.gmane.org/gmane.network.openvpn.devel/4729/focus=4735
2011-06-20 11:44:22 +02:00
Samuli Seppänen
6989cbde61 Add new openssl.cnf to easy-rsa/Windows
This is required for patch "Fix a build-ca issue on Windows" to work

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 663860ad04)
2011-06-20 11:04:26 +02:00
Samuli Seppänen
09282a688b Fix a build-ca issue on Windows
Fixes Trac ticket #125

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 38108434db)
2011-06-20 11:04:03 +02:00
David Sommerseth
22c7d4699b Remove support for Linux 2.2 configuration fallback
When configuring OpenVPN nowadays, the TUN/TAP configuration can
sometimes jump into the Linux 2.2 fallback code paths, which will
also fails.  The reason it jumps into fallback mode is that the
tun/tap device already exists or that /dev/net/tun does not exist.
This can be very confusing, as /dev/tunX which the fallback mode tries
to use, does not exist on Linux 2.4 and newer.

Considering that the last Linux 2.2 update was released 25-Feb-2004
and the first Linux 2.4 release came 04-Jan-2001, there are no
reasonable reasons to help users to stay on outdated kernels.
I consider this extra code path just waste of bytes ... so lets make
the world simpler.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit ce637abdaf)
2011-06-15 12:00:57 +02:00
Robert Fischer
a599b7f629 Documented --x509-username-field option
Also fixed a typo in the --help screen.

Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit ca8af756c5)
2011-06-14 11:14:27 +02:00
Robert Fischer
0010dd8d40 Added info about --show-proxy-settings
Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 54d40afdfa)
2011-06-14 11:05:53 +02:00
David Sommerseth
05485d7f77 Fix compiling issues with pkcs11 when --disable-management is configured
pkcs11.c seems to miss some header files which gets implicitly added when
the management interface is enabled.

Signed-off-by: David Sommerseth <davids@redhat.com>
Tested-by: Mr Dash Four <mr.dash.four@googlemail.com>
(cherry picked from commit efcdf594f8)
2011-05-31 23:44:49 +02:00
David Sommerseth
4fe914a0ef Don't define ENABLE_PUSH_PEER_INFO if SSL is not available
The push_peer_info feature depends on the SSL infrastructure and openvpn
will fail to build if ./configure --disable-crypto --disable-ssl is
used.  The solution is to not define ENABLE_PUSH_PEER_INFO if we don't
have crypto/ssl.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 21fc2edfc4)
2011-05-31 17:52:46 +02:00
Matthew L. Creech
e1f2f5f61e Fix 2.2.0 build failure when management interface disabled
I just upgraded to 2.2.0, and my build fails with:

ps.c: In function 'port_share_open':
ps.c:778:7: error: 'management' undeclared (first use in this function)
ps.c:778:7: note: each undeclared identifier is reported only once for
each function it appears in
make[5]: *** [ps.o] Error 1

[Comment by David Sommerseth:
 This happens only when building with --enable-small, --disable-management
 and --disable-pkcs11

 Also changed MANAGEMENT_ENABLED to ENABLE_MANAGEMENT from the original
 patch.
]

Mailing-list: http://thread.gmane.org/gmane.network.openvpn.devel/4639
Signed-off-by: Matthew L. Creech <mlcreech@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit ca0ed8458a)
2011-05-19 18:23:02 +02:00
Simon Matter
96ca4f3334 Fix issues with some older GCC compilers
Some older GCC compilers don't like that variables are declared
in the middle of the code, and expect them on the top in the
block/scope.

Trac-ticket: 99
Signed-off-by: Simon Matter <simon.matter@invoca.ch>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit aa52ca828f)
2011-05-10 13:24:51 +02:00
Gustavo Zacarias
60fdd9b01d Fix compile issues when using --enable-small and --disable-ssl/--disable-crypto
The tmp_dir string is required in the options struct regardless of options
so spin it out of #if conditionals.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit b70d99fb61)
2011-04-27 18:51:09 +02:00
David Sommerseth
1ed76da8b7 Tagging the v2.2.0 release
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
2011-04-21 21:26:40 +02:00
Robert Fischer
1d6f40a16c Update man page with info about --connect-timeout
Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 285252d1a1)
2011-04-21 21:13:51 +02:00
Robert Fischer
3aae5db7f7 Update man page with info about --capath
Signed-off-by: Robert Fischer <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit b63ecceb8b)
2011-04-21 21:13:45 +02:00
David Sommerseth
9322eca5d9 Add a simple comment regarding openvpn_snprintf() is duplicated
Commit df5a4380c3 copies this function
from buffer.c to service-win32/openvpnserv.c.  Any changes on either
places should be done in both implementations.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 14708eb69e)
2011-04-21 21:05:36 +02:00
David Sommerseth
47dd9a4d7b Improve the mysprintf() issue in openvpnserv.c
A quick and dirty compile fix was introduced in commit 77d2440509,
and was accepted under the condition that it would be a temporary fix.

As the usage of _snprintf() is realy not ideal on Windows, this patch
uses the same well tested openvpn_snprintf() function from buffer.c.
It was a longer discussion of several possibilities to re-use that code,
but in the end it seemed easier to just copy-paste this function to
openvpnserv.c for now.

The reason for this conclusion was that the function is really simple,
well defined and will most likely not be changed much in the future.
It is also added a comment in openvpnserv.c where this function
has its origins.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
(cherry picked from commit df5a4380c3)
2011-04-21 20:53:38 +02:00
Samuli Seppänen
1cc2b62d97 Fixed a bug with GUI icon deletion on upgrade from 2.2-RC or earlier
This bug was introduced in commit 110e42d199.

Trac-ticket: 120
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
(cherry picked from commit 6d1d08f679)
2011-04-15 16:10:52 +02:00
Gisle Vanem
d1a24b6fe3 Avoid re-defining uint32_t when using mingw compiler
Since MingW for quite a long time (since 3.2 in 2008?) has defined
'uint32_t' etc. in it's <stdint.h>, we need to guard against defining
them again. Ideally we should figure out in what version of MingW
this happened. But for now:

Signed-off-by: Gisle Vanem <gvanem@broadpark.no>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 6a8270c291)
2011-04-15 10:07:05 +02:00
rf
5ccb1c4ff0 Added man page entry for --management-client
Track-ticket: 114
Signed-off-by: rf <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit cffcefac8f)
2011-04-14 21:53:38 +02:00
rf
3136439d71 Update man page with info about --remote-random-hostname
Trac-ticket: 115
Signed-off-by: rf <ml-openvpn@trispace.org>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 6215e11e2b)
2011-04-14 21:53:30 +02:00
Samuli Seppänen
f71233577e Fixed copying of tapinstall.exe to dist/bin when using prebuilt TAP-drivers
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 343037a997)
2011-04-14 21:17:58 +02:00
Samuli Seppänen
8cf7903c31 Removed Win2k from supported platforms list in INSTALL and win/openvpn.nsi
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 9b8247edf3)
2011-04-14 21:17:54 +02:00
Samuli Seppänen
6f0ded5825 Fix a bug in devcon source code handling
The win/config_ti.py build script assumes to find ../tapinstall/7600/sources.in
which does not exists in devcon.exe source code directory. This makes
config_ti.py look for ../tapinstall/7600/sources instead.

Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit a18752d4fe)
2011-04-14 21:17:49 +02:00
David Sommerseth
eb4b1bb6ad Change the default --tmp-dir path to a more suitable path
In commit 4e1cc5f6dd the create_temp_filename() function was
reviewed and hardened, which in the end renamed this function to
create_temp_file() in commit 495e3cec5d.

With these changes it became more evident that OpenVPN needs a directory
where it can create temporary files.  The create_temp_file() will create
such files f.ex. if --client-connect or --plugin which makes use of
the OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY hook, such as openvpn-auth-pam.so.

When this happens, OpenVPN will normally create these files in the directory
OpenVPN was started.  In many cases, this will fail due to restricted access.
By using --tmp-dir and pointing it to a directory writeable to the user
running OpenVPN, it works again.

This patch makes OpenVPN use a more suitable temproary directory by default,
instead of the current working directory.  On non-Windows platforms this
default value is set to '/tmp', but can be modified at compile-time by
running ./configure --with-tmp-dir-path=<TEMP DIR PATH>.  On Windows, it
will use GetTempPath() to find temporary paths recommended by the OS.  If
this fails, it will fallback to the old behaviour, using the directory
where OpenVPN was started.

In any cases, this default value can be overridden in the configuration
file by using the --tmp-dir option, as before.

To check what the default is at runime, you can see this easily by doing
this:

      $ ./openvpn --verb 4 --dev tun | grep tmp_dir

Signed-off-by: David Sommerseth <davids@redhat.com>
Tested-by: Jan Just Keijser <janjust@nikhef.nl>
Acked-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit ca4c6d618d)
2011-04-14 21:10:29 +02:00