summaryrefslogtreecommitdiffstats
path: root/ps.c
Commit message (Collapse)AuthorAgeFilesLines
* handle Windows unicode pathsHeiko Hund2012-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | Openvpn for Windows is not compiled as a Unicode binary and thus cannot handle paths which contain non-ASCII characters using the argv vector. Characters that are not present in the system codepage are simply replaced with a question mark, e.g. if started as 'openvpn --config домой.ovpn' the file '?????.ovpn' is tried to be opened as configuration. The same applies to paths in config files which need to be UTF-8 encoded if they contain non ASCII characters. The option line 'key лев.pem' will lead to openvpn trying to open 'лев.pem' on a system with codepage 1252. This patch makes openvpn read the command line in UCS-2 and convert it to UTF-8 internally. Windows stores names in the filesystem in UCS-2. When using a paths openvpn converts it from UTF-8 to UCS-2 and uses the wide character Windows API function. Signed-off-by: Heiko Hund <heiko.hund@sophos.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix 2.2.0 build failure when management interface disabledMatthew L. Creech2011-05-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Solved hidden merge conflicts between master and svn-branch-2.1David Sommerseth2011-04-261-4/+4
| | | | | | | | | ps.c - The feat_ipv6_transport patch set modifies struct openvpn_sockaddr by adding a union named 'addr' in commit 8335caf929f21b31. ssl.c - A needed } and #endif had been dropped by a mistake Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
* Merge branch 'svn-branch-2.1' into mergeDavid Sommerseth2011-04-261-14/+102
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pulling in changes from James' 2.1/openvpn branch in SVN. Conflicts: buffer.c init.c manage.h multi.c openvpn.8 options.c ssl.c version.m4 win/sign.py Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
| * Fixed bug in port-share that could cause port share process toJames Yonan2011-04-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crash with output like this: TCP connection established with 85.190.0.3:41781 85.190.0.3:41781 SIGTERM[soft,port-share-redirect] received, client-instance exiting MANAGEMENT: TCP recv error: Socket operation on non-socket MANAGEMENT: Client disconnected MANAGEMENT: Triggering management exit Exiting due to fatal error EVENT: epoll_ctl EPOLL_CTL_MOD failed, sd=6: Bad file descriptor (errno=9) Then an error like this for every incoming connection that should be proxied: 76.120.71.74:55302 PORT SHARE: sendmsg failed -- unable to communicate with background process (6,8,-1,-1): Connection refused (errno=111) Version 2.1.3s git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7127 e7ae566f-a301-0410-adde-c780ea21d3b5
| * Fixed bug introduced in r7031 that might cause this error message:James Yonan2011-04-261-6/+16
| | | | | | | | | | | | | | PORT SHARE: sendmsg failed (unable to communicate with background process) git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@7062 e7ae566f-a301-0410-adde-c780ea21d3b5
| * Added optional journal directory argument to "port-share" directive, for ↵James Yonan2011-04-251-13/+91
| | | | | | | | | | | | reporting client IP origins of proxied connections. git-svn-id: http://svn.openvpn.net/projects/branches/BETA21@7031 e7ae566f-a301-0410-adde-c780ea21d3b5
* | Merge branch 'feat_ipv6_transport'David Sommerseth2011-04-251-3/+3
|\ \
| * | * rebased openvpn-2.1_rc1b.jjo.20061206.d.patchJuanJo Ciarlante2011-03-251-3/+3
| | | | | | | | | | | | | | | * passes {udp,tcp}x{v4,v6} loopback tests * passes {udp,tcp}x{v6} remote tests
* | | Fixed bug in port-share that could cause port share process to crashJames Yonan2011-04-141-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with output like this: TCP connection established with 85.190.0.3:41781 85.190.0.3:41781 SIGTERM[soft,port-share-redirect] received, client-instance exiting MANAGEMENT: TCP recv error: Socket operation on non-socket MANAGEMENT: Client disconnected MANAGEMENT: Triggering management exit Exiting due to fatal error EVENT: epoll_ctl EPOLL_CTL_MOD failed, sd=6: Bad file descriptor (errno=9) Then an error like this for every incoming connection that should be proxied: 76.120.71.74:55302 PORT SHARE: sendmsg failed -- unable to communicate with background process (6,8,-1,-1): Connection refused (errno=111) Version 2.1.3s
* | Merge branch 'feat_misc' into beta2.2David Sommerseth2010-11-181-12/+0
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: acinclude.m4 config-win32.h configure.ac misc.c thread.c thread.h - These conflicts was mainly due to feat_misc getting old and mostly caused by the pthread clean-up patches in feat_misc Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
| * Removed functions not being used anywhereDavid Sommerseth2010-11-181-12/+0
| | | | | | | | | | | | | | | | | | | | The GNU C compiler gave warnings about these functions in the patch not being used anywhere. Doing a git grep on the code turned out there were no callers to these functions. Taking these functions out, as there is not good reason why to carry dead code. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net> Acked-by: Peter Stuge <peter@stuge.se>
* | Updated copyright date to 2010.James Yonan2010-04-281-1/+1
|/ | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5599 e7ae566f-a301-0410-adde-c780ea21d3b5
* Update copyright to 2009.james2009-05-301-1/+1
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4477 e7ae566f-a301-0410-adde-c780ea21d3b5
* Added --prng option to control PRNG (pseudo-randomjames2008-11-181-1/+1
| | | | | | | | | | | number generator) parameters. In previous OpenVPN versions, the PRNG was hardcoded to use the SHA1 hash. Now any OpenSSL hash may be used. This is part of an effort to remove hardcoded references to a specific cipher or cryptographic hash algorithm. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3503 e7ae566f-a301-0410-adde-c780ea21d3b5
* Copyright notice changed to reflect change in name ofjames2008-10-061-1/+1
| | | | | | | Telethra to OpenVPN Technologies. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3409 e7ae566f-a301-0410-adde-c780ea21d3b5
* Call prng_init after fork in background processjames2008-07-171-0/+4
| | | | | | | | | | created by port_share_open, so as to ensure a newly seeded PRNG sequence. This is strictly defensive programming since port_share_proxy currently does not use the PRNG. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3070 e7ae566f-a301-0410-adde-c780ea21d3b5
* Copyright change OpenVPN Solutions LLC -> Telethra, Inc.james2008-07-141-1/+1
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3048 e7ae566f-a301-0410-adde-c780ea21d3b5
* Updated copyright notice to 2008.james2008-06-111-1/+1
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2995 e7ae566f-a301-0410-adde-c780ea21d3b5
* Moved branch into official BETA21 position.james2008-05-121-6/+0
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2959 e7ae566f-a301-0410-adde-c780ea21d3b5
* Modified --port-share code to remove the assumption thatjames2006-06-241-12/+14
| | | | | | | | CMSG_SPACE always evaluates to a constant, to enable compilation on NetBSD and possibly other BSDs as well. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1041 e7ae566f-a301-0410-adde-c780ea21d3b5
* Minor fixes for gcc (GCC) 4.0.2 warnings.james2006-02-231-1/+1
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@905 e7ae566f-a301-0410-adde-c780ea21d3b5
* Version 2.1_beta11 releasedjames2006-02-191-33/+35
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@904 e7ae566f-a301-0410-adde-c780ea21d3b5
* Port share proxy bug fixes.james2006-02-181-98/+60
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@903 e7ae566f-a301-0410-adde-c780ea21d3b5
* ps.c debug codejames2006-02-181-74/+154
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@902 e7ae566f-a301-0410-adde-c780ea21d3b5
* Added comments to ps.c (port share proxy code).james2006-02-181-3/+63
| | | | git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@901 e7ae566f-a301-0410-adde-c780ea21d3b5
* Added --port-share option for allowing OpenVPN and HTTPSjames2006-02-161-0/+783
server to share the same port number. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@893 e7ae566f-a301-0410-adde-c780ea21d3b5