0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 03:52:28 +02:00
OpenVPN is an open source VPN daemon
Go to file
Selva Nair fa5ab2438a Ensure the current common_name is in the environment for scripts
When username-as-common-name is in effect, the common_name
is "CN" from the certificate for auth-user-pass-verify. It gets
changed to "username" after successful authentication. This
changed value gets into the env when client-connect script is
called.

However, "common_name" goes through the cycle of being
"CN", then "username" during every reauth (renegotiation).
As the client-connect script is not called during reneg, the changed
value never gets back into the env. The end result is that the
disconnect script gets "common_name=<CN>" instead of the username.
Unless no reneg steps have happened before disconnect.
(For a more detailed analysis see
https://community.openvpn.net/openvpn/ticket/1434#comment:12)

Fix by adding common_name to env whenever it changes.

Trac: #1434
Very likely applies to #160 as well, but that's too old and
some of the relevant code path has evolved since then.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20211023000706.25016-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23051.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-10-23 17:39:50 +02:00
.github GitHub Actions: use latest working lukka/run-vcpkg 2021-10-19 16:05:07 +02:00
.travis Change travis build scripts to use https when fetching prerequisites. 2020-11-24 18:01:46 +01:00
build Add building man page on Windows 2021-09-12 11:24:51 +02:00
contrib contrib/vcpkg-ports: remove openssl port 2021-08-01 19:08:00 +02:00
debug build: standard directory layout 2012-03-22 22:07:08 +01:00
dev-tools Update copyrights 2021-06-15 10:41:07 +02:00
distro Update copyrights 2021-06-15 10:41:07 +02:00
doc doc: fix indentation in protocol-options.rst 2021-09-21 15:49:57 +02:00
include Remove support for PF (Packet Filter) 2021-09-12 10:24:25 +02:00
m4 Remove support for non ISO C99 vararg support 2021-03-28 16:34:42 +02:00
sample Remove support for PF (Packet Filter) 2021-09-12 10:24:25 +02:00
src Ensure the current common_name is in the environment for scripts 2021-10-23 17:39:50 +02:00
tests Add small unit test for testing HMAC 2021-10-21 08:25:28 +02:00
.git-blame-ignore-revs Add c1ff8f247f (engine, pool, SSO) to .git-blame-ignore-revs 2020-06-26 15:03:39 +02:00
.gitattributes cleanup: add .gitattributes to control eol style explicitly 2012-04-26 20:54:26 +02:00
.gitignore Move examples into openvpn-examples(5) man page 2021-07-02 11:50:11 +02:00
.mailmap Update .mailmap to unify and clean up odd names and e-mail addresses 2016-10-18 13:46:04 +02:00
.svncommitters Added mapping files from SVN commit ID to more descriptive commit IDs. 2010-10-21 11:31:26 +02:00
.travis.yml travis: don't run t_net.sh test 2020-08-10 18:34:19 +02:00
AUTHORS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
ChangeLog Update copyrights 2021-06-15 10:41:07 +02:00
Changes.rst Set TLS 1.2 as minimum by default 2021-09-21 13:24:26 +02:00
compat.m4 Remove checks for uint* types that are part of C99 2021-04-07 08:30:34 +02:00
config-msvc-version.h.in msvc: fix product version display 2021-10-14 16:29:35 +02:00
config-msvc.h Fix some more wrong defines in config-msvc.h 2021-10-19 11:42:53 +02:00
configure.ac configure: remove useless -Wno-* from default CFLAGS 2021-10-06 11:56:58 +02:00
CONTRIBUTING.rst Update CONTRIBUTING.rst to allow GitHub PRs for code review purposes 2016-05-19 11:22:50 +02:00
COPYING Update copyrights 2021-06-15 10:41:07 +02:00
COPYRIGHT.GPL copyright: Update GPLv2 license texts 2017-06-16 10:38:03 +02:00
INSTALL Drop support for OpenSSL 1.0.1 2020-07-20 21:40:11 +02:00
Makefile.am Update copyrights 2021-06-15 10:41:07 +02:00
msvc-build.bat win: support for Visual Studio 2017 2018-10-01 08:16:29 +02:00
msvc-dev.bat win: support for Visual Studio 2017 2018-10-01 08:16:29 +02:00
msvc-env.bat win: support for Visual Studio 2017 2018-10-01 08:16:29 +02:00
NEWS This is the start of the BETA21 branch. 2005-09-26 05:28:27 +00:00
openvpn.sln msvc: add ARM64 configuration 2021-05-10 17:54:57 +02:00
PORTS Update copyrights 2021-06-15 10:41:07 +02:00
README Update copyright to include 2018 plus company name change 2018-02-01 08:29:21 +01:00
README.ec Implement tls-groups option to specify eliptic curves/groups 2020-07-21 22:33:58 +02:00
README.IPv6 Update IPv6 related readme files 2014-01-03 16:01:12 +01:00
README.mbedtls docs: Replace all PolarSSL references to mbed TLS 2017-09-06 23:42:55 +02:00
README.wolfssl README.wolfssl Update 2021-03-19 15:19:31 +01:00
TODO.IPv6 Fix various spelling mistakes 2019-02-06 19:07:34 +01:00
version.m4 Change version.m4 to 2.6_git 2020-08-12 13:00:21 +02:00
version.sh.in build: windows: install version.sh to allow installer read version 2012-03-24 00:14:23 +01:00

OpenVPN -- A Secure tunneling daemon

Copyright (C) 2002-2018 OpenVPN Inc. This program is free software;
you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.

*************************************************************************

To get the latest release of OpenVPN, go to:

	https://openvpn.net/index.php/download/community-downloads.html

To Build and Install,

	tar -zxf openvpn-<version>.tar.gz
	cd openvpn-<version>
	./configure
	make
	make install

or see the file INSTALL for more info.

*************************************************************************

For detailed information on OpenVPN, including examples, see the man page
  http://openvpn.net/man.html

For a sample VPN configuration, see
  http://openvpn.net/howto.html

To report an issue, see
  https://community.openvpn.net/openvpn/report

For a description of OpenVPN's underlying protocol,
  see the file ssl.h included in the source distribution.

*************************************************************************

Other Files & Directories:

* configure.ac -- script to rebuild our configure
  script and makefile.

* sample/sample-scripts/verify-cn

  A sample perl script which can be used with OpenVPN's
  --tls-verify option to provide a customized authentication
  test on embedded X509 certificate fields.

* sample/sample-keys/

  Sample RSA keys and certificates.  DON'T USE THESE FILES
  FOR ANYTHING OTHER THAN TESTING BECAUSE THEY ARE TOTALLY INSECURE.

* sample/sample-config-files/

  A collection of OpenVPN config files and scripts from
  the HOWTO at http://openvpn.net/howto.html

*************************************************************************

Note that easy-rsa and tap-windows are now maintained in their own subprojects.
Their source code is available here:

  https://github.com/OpenVPN/easy-rsa
  https://github.com/OpenVPN/tap-windows

The old cross-compilation environment (domake-win) and the Python-based
buildsystem have been replaced with openvpn-build:

  https://github.com/OpenVPN/openvpn-build

See the INSTALL file for usage information.