Commit Graph

241 Commits

Author SHA1 Message Date
Nikos Mavrogiannopoulos
8769b2e041 ocserv: avoid crash when --pid-file is used
Resolves #143

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-01 19:13:57 +01:00
Nikos Mavrogiannopoulos
b59a12591c config.c: clarify if clause
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-02-25 16:03:50 +01:00
Nikos Mavrogiannopoulos
e61029445c gnutls: increased dependency to 3.3.0
That way PKCS#11 reinitialization and global initialization are
implicit.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-02-11 12:02:30 +01:00
Nikos Mavrogiannopoulos
894cdb7a52 config: skip unknown sections
This would allow future extensibility, by making clients which
don't support a section to skip it.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-01-23 21:07:18 +01:00
Nikos Mavrogiannopoulos
1b8079a11a Replaced the configuration parser with inih parser
That eliminates the dependency on libopts as well as autogen.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-01-23 21:07:18 +01:00
Nikos Mavrogiannopoulos
533677bd73 ocserv: use getopt for command line parsing
The complexity of its command line options didn't require
the use of libopts, and by eliminating that dependency for cmd
parsing, we can chose another parser for config file parsing.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-01-23 21:07:18 +01:00
Nikos Mavrogiannopoulos
fb299001ea config: fixed incorrect sign check
Resolves #132

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
2018-01-12 13:39:25 +01:00
Nikos Mavrogiannopoulos
7bc61b1d56 Avoid gcc warnings due to snprintf truncation
Detect such truncation and act accordingly.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2017-12-10 15:01:20 +01:00
Nikos Mavrogiannopoulos
83770bb45d config: avoid compiler warning
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2017-09-07 21:57:31 +02:00
Nikos Mavrogiannopoulos
99b2fdcd06 Reset periodically the server statistics kept
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2017-04-14 16:39:00 +03:00
Nikos Mavrogiannopoulos
9938056f6c Disable DTLS-PSK protocol when run under a unix socket
It is not possible to derive PSK keys when only the TCP CSTP session
is available, without the TLS session.

Relates #22

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
2017-03-20 09:27:46 +01:00
Johannes Sjøkvist
ae2fd78580 Add support for oid 2.5.29.17 RFC822Name
This is needed to be able to retreive email from the Subject
Alternative Name from the certificate.

Signed-off-by: Johannes Sjøkvist <johannes@konsept-it.no>
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2017-01-28 15:04:20 +01:00
Nikos Mavrogiannopoulos
3c8cdaedb1 Send "config client" XML field after successful auth
This allows to advertise the XML configuration file for the
client to download, in recent openconnect clients. In addition
made support for the client XML file unconditional (no longer
depending on the anyconnect client compatibility flag).
2017-01-04 16:20:29 +01:00
Nikos Mavrogiannopoulos
1f8304fc04 Improve output of --version 2016-12-23 09:14:59 +01:00
Andrew Patrikalakis
69261b6aa8 Automatically switch to TCP in case of no received UDP traffic
and enable by default
2016-11-01 19:53:33 -07:00
Nikos Mavrogiannopoulos
c53b97367e config: more consistent printing of startup error and info messages 2016-09-22 15:52:22 +02:00
Nikos Mavrogiannopoulos
445b9070a6 untied the cisco-client-compat option from the DTLS-LEGACY protocol
Introduced instead the 'dtls-legacy' config option which can be used
to explicitly disable the legacy DTLS protocol.
2016-09-22 15:43:50 +02:00
Nikos Mavrogiannopoulos
bd87c7607e renamed match-tls-and-dtls-ciphers to match-tls-dtls-ciphers 2016-09-22 15:26:02 +02:00
Nikos Mavrogiannopoulos
4c85fa97f0 Added configuration option 'dtls-psk'
When this option is set to false, the DTLS-PSK protocol
will not be negotiated by worker processes. The process will fallback
to the legacy protocol in that case.
2016-09-22 15:20:35 +02:00
Nikos Mavrogiannopoulos
555d2cb03e Added the match-tls-and-dtls-ciphers config option
That when enable, it will prevent any DTLS negotiation other than the
DTLS-PSK, and will ensure that the cipher/mac combination matches on
the TLS and DTLS connections. The cisco-client-compat config option
when disabled, it will disable the pre-draft-DTLS negotiation.
2016-09-13 13:25:35 +02:00
Nikos Mavrogiannopoulos
5c9cda67fb ocserv: added a host-update-script config option
This option will set a script to be called once the user is
connected and provides a hostname to be used with his IP. That
script can be used to update a DNS server or so.

Relates #39
2016-06-04 19:49:03 +02:00
Nikos Mavrogiannopoulos
7f65577fbd ocserv: enforce a default auth timeout value
That is to prevent processes hanging on inactive sessions.
2016-05-16 14:47:15 +02:00
Nikos Mavrogiannopoulos
0b4333d7ee ocserv: warn when conflicting supplemental config options are specified
That is, do not allow radius' groupconfig=true option to be combined
with config-per-user/group. This reduces frustration since these options
are incompatible.
2016-04-01 15:32:27 +02:00
Nikos Mavrogiannopoulos
010257c6a2 Simplified cookie handling
This change set eliminates the need for cryptographically authenticated
cookies and relies on sec-module providing accurate information on
the SID provided by the client.
2016-02-23 15:31:17 +01:00
Nikos Mavrogiannopoulos
72a71d21d1 ocserv: added the --test-config command line option
This allows to test a configuration file for being valid without
starting the server.
2016-01-19 10:27:58 +01:00
Nikos Mavrogiannopoulos
5bb19cae39 don't attempt to open per_user_dir if it is NULL
Nor attempt to close a NULL handle. This addresses a crash in certain libc's.
2016-01-05 21:44:43 +01:00
Nikos Mavrogiannopoulos
9252e22298 Added reference counting to configuration values.
That is, to allow referencing to these values from proc_st
without fearing of them being invalidated on a config reload. We
perform a cleanup of these values on the server periodic check.
2015-12-05 11:08:51 +01:00
Nikos Mavrogiannopoulos
eabfbe8473 Added configuration option 'restrict-user-to-ports'
This option is intended to allow restricting users to accessing
specific ports once they enter the VPN. The rules set using this
option will be enforced by the ocserv-fw script.
2015-12-02 10:38:12 +01:00
Nikos Mavrogiannopoulos
2d823aa200 Added config option 'append-routes'
If set to true it will restore the old configuration semantics
of appending the global routes to per user/group config.
2015-11-28 19:28:24 +01:00
Nikos Mavrogiannopoulos
f5fca982dc Added configuration option restrict-user-to-routes
This option, if set, will call /usr/bin/ocserv-fw for each user
connecting, i.e., adding firewall restrictions based on its allowed
routes.
2015-11-23 17:31:55 +01:00
Nikos Mavrogiannopoulos
2473633b8d Added cookie key rotation 2015-11-17 08:33:38 +01:00
Nikos Mavrogiannopoulos
65004a55df Added configuration option tunnel-all-dns 2015-11-10 13:50:03 +01:00
Nikos Mavrogiannopoulos
4985fc0013 Use /128 as default IPv6 prefix to be backwards compatible 2015-11-01 17:18:49 +01:00
Nikos Mavrogiannopoulos
33f9b57714 occtl: move ctl.h in occtl/ and fixed args.def to include version.inc 2015-10-31 00:09:24 +01:00
Nikos Mavrogiannopoulos
7a4fc3b0aa moved ip-related macros to ip-util 2015-10-30 14:03:24 +01:00
Nikos Mavrogiannopoulos
7d4a8f1551 renamed ipv4_prefix_to_mask to distinguish from the ipv6 function 2015-10-29 23:22:35 +01:00
Nikos Mavrogiannopoulos
97d6074ed3 when reading IPv4 routes ensure they are read/converted to proper format 2015-10-28 14:22:18 +01:00
Nikos Mavrogiannopoulos
5a10283125 Added the config option expose-iroutes
This allows the server to advertise routes offered by few clients
to all clients except the ones offering them.
2015-10-25 22:43:54 +01:00
Nikos Mavrogiannopoulos
40bd1550c1 ipv6: introduced ipv6-subnet-prefix config option
That option allows to specify the IPv6 subnet prefix to be given
to client. That is, allow providing the clients networks larger
than /128. Set the option to 128 to simulate the previous behavior
of ocserv.
2015-10-24 19:26:48 +02:00
Nikos Mavrogiannopoulos
e5d02eb228 plain auth: support OTP authentication using usersfile
That adds a dependency on liboath.
2015-09-25 15:03:38 +02:00
Nikos Mavrogiannopoulos
1bfa6e7648 Reinstated the PAM accounting method
It can be used to check for a valid PAM account, even when
certificates or another authentication method is in use.
2015-09-18 16:45:32 +02:00
Nikos Mavrogiannopoulos
199b3fdfce Store the configuration file internally to avoid dependency on cmdline arguments
That allows reloading the configuration even after our setproctitle()
has overwritten the argv arguments.
2015-09-04 14:17:38 +02:00
Nikos Mavrogiannopoulos
76712ef87f Keep PAM in the accounting types but simply ignore it.
That requires no configuration changes for system where this
was accidentally enabled.
2015-08-31 16:38:05 +02:00
Nikos Mavrogiannopoulos
1c64073cf2 pam: removed accounting; it served no purpose
In fact it could even cause issues in the security-module
depending on what was configured in PAM.
2015-08-31 16:19:48 +02:00
Nikos Mavrogiannopoulos
af6a44c346 config: remove whitespace from the end of strings 2015-08-17 14:13:12 +02:00
Nikos Mavrogiannopoulos
bc4f866ec0 Added support for reading the client cert verification status and CN from proxy protocol 2015-07-16 09:58:15 +02:00
Nikos Mavrogiannopoulos
17e71dccd8 Added support for proxy protocol (v2) 2015-07-15 13:03:58 +02:00
Nikos Mavrogiannopoulos
8b186fb53a Allow specifying a PIN and SRK PIN in the config file
That pin will be used to decrypt encrypted key files as well.
2015-06-25 14:12:57 +02:00
Nikos Mavrogiannopoulos
9d621d2b5d certificates and keys were moved to permanent configuration 2015-06-25 13:38:59 +02:00
Nikos Mavrogiannopoulos
321bb72ede combined cfg.h and common-config.h 2015-06-17 09:56:50 +02:00