[Openvpn-devel] [PATCH] wtmp_init() does not honor username/groupname config options and chown()s wtmp file

2007-09-02 Thread Maximilian Wilhelm
Now wtmp_init() does try to lookup the uid for "username" and the gid for "groupname" if configured and - if successfull - chown the wtmp file to this combination. (The lookup of uid/gid is neccessary here as 'context->c0' is no yet initialized at the point wtmp_init() is called.) Sign

[Openvpn-devel] WTMP support for OpenVPN 2.1

2007-09-02 Thread Maximilian Wilhelm
Hi! This is an initial attempt to let OpenVPN 2.1 write a wtmp log of all connections including the username, it's VPN IP and the real remote IP the user connected from. This provides an OpenVPN admin with a simple database of all connections of his VPN servers and the possibility to easily see

[Openvpn-devel] [PATCH] Let Makefile.am build wtmp, too.

2007-09-02 Thread Maximilian Wilhelm
Signed-off-by: Maximilian Wilhelm --- Makefile.am |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 36e2cf9..6384857 100644 --- a/Makefile.am +++ b/Makefile.am @@ -94,7 +94,8 @@ openvpn_SOURCES = \ status.c status.h \ syshea

[Openvpn-devel] [PATCH] Let OpenVPN write wtmp entries if configured so.

2007-09-02 Thread Maximilian Wilhelm
Signed-off-by: Maximilian Wilhelm --- multi.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/multi.c b/multi.c index 2c23a44..5d8c80e 100644 --- a/multi.c +++ b/multi.c @@ -462,7 +462,9 @@ multi_close_instance (struct multi_context *m, dmsg (D_MULTI_DEBUG, "M

[Openvpn-devel] [PATCH] Added the ability to configure wtmp logging:

2007-09-02 Thread Maximilian Wilhelm
--log-wtmp server_id [file] : Enable logging to wtmp file using the two digit server_id a prefix for the utmp line. Optionally you can write to an own wtmp file. (Default is /var/log/ovpnwtmp. --- options.c | 31 +++ options.

[Openvpn-devel] [PATCH] Let multi.c call wtmp_* routines when ENABLE_WTMP is defined.

2007-09-02 Thread Maximilian Wilhelm
Signed-off-by: Maximilian Wilhelm --- multi.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/multi.c b/multi.c index fa924f1..2c23a44 100644 --- a/multi.c +++ b/multi.c @@ -42,6 +42,10 @@ #include "forward-inline.h" +#ifdef ENABLE_WTMP +#include "wtmp.

[Openvpn-devel] [PATCH] Let set_utmp_line() use the configured 'server_id' as prefix in utmp line string

2007-09-02 Thread Maximilian Wilhelm
Now every utmp line will look like "ovpn%d-%s" where %d are the two last digits of the server_id and %s some chars of the session_id (as many as fit into the remaining space in 'ut_line'. This provides the ability to let at most 100 OpenVPN instances on one single maschine write to the s

[Openvpn-devel] [PATCH] Added WTMP support for OpenVPN

2007-09-02 Thread Maximilian Wilhelm
Signed-off-by: Maximilian Wilhelm --- wtmp.c | 333 wtmp.h | 27 + 2 files changed, 360 insertions(+), 0 deletions(-) create mode 100644 wtmp.c create mode 100644 wtmp.h diff --git a/wtmp.c b/wtmp.c new file mode 100644 in

[Openvpn-devel] [PATCH] Push a pointer to the whole options struct to wtmp_init()

2007-09-02 Thread Maximilian Wilhelm
This change introduces the ability to figure out as which user OpenVPN will run after dropping privileges. This is very usefull when creating the wtmp file, which by default is owned by root resulting in OpenVPN not being able to write to it. So now the owner and group can be changed to

[Openvpn-devel] [patch] Log serial number of a client certificate

2007-09-02 Thread Patrick Cervicek
On July, I asked on the user-list how to obtain the certificate serial number of an active client: http://thread.gmane.org/gmane.network.openvpn.user/19913 just in case sombody needs it, you'll find a two-line-patch underneath. I get now in my log: VERIFY OK: depth=0, serial=79, emailAddress=

[Openvpn-devel] [patch] Log serial number of a client certificate

2007-09-02 Thread Patrick Cervicek
On July, I asked on the user-list how to obtain the certificate serial number of an active client: http://thread.gmane.org/gmane.network.openvpn.user/19913 just in case sombody needs it, you'll find a two-line-patch underneath. I get now in my log: VERIFY OK: depth=0, serial=79, emailAddress=pac