Commit Graph

3024 Commits

Author SHA1 Message Date
Nikos Mavrogiannopoulos
5fd5a1b349 main: allow forcing maintenance cycle with SIGUSR2
This is done for testing purposes; allow test the maintenance
cycle without waiting for the necessary time.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-15 08:25:37 +02:00
Nikos Mavrogiannopoulos
55b8ce4b08 main: corrected call of CRL reload
Resolves #149

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-15 08:15:34 +02:00
Nikos Mavrogiannopoulos
b117a165a6 gssapi auth: set the virtual host data early
That prevents a crash on its use from get_name() later
in the initialization.

Resolves #145

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 21:30:43 +02:00
Nikos Mavrogiannopoulos
61e5d23f48 Merge branch 'tmp-minor-fixes' into 'master'
Minor updates on master branch

See merge request ocserv/ocserv!79
2018-04-14 19:19:49 +00:00
Nikos Mavrogiannopoulos
b4bb6c2049 .gitlab-ci.yml: do not use PAM under asan
PAM tests would fail due to address sanitizer not detecting
the stack switches.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 18:55:10 +02:00
Nikos Mavrogiannopoulos
0bb085de4a tests: pam-test was restricted to pam_matrix
valgrind and asan were indicating issues with pam_oath, so
avoid using it in the testsuite.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 18:36:03 +02:00
Nikos Mavrogiannopoulos
cf8304cadf sec-mod/main: eliminate mem leaks related to vhost transition
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 18:34:12 +02:00
Nikos Mavrogiannopoulos
9af953383e tests: properly handle memory in cfg_parse_ports() unit test
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:21 +02:00
Nikos Mavrogiannopoulos
f1e3d1e0a7 trim_trailing_whitespace: avoid invalid memory access/read
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:21 +02:00
Nikos Mavrogiannopoulos
82bc4fb841 proxy protocol: added check to avoid memcpy on zero data
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:21 +02:00
Nikos Mavrogiannopoulos
eb41aa8f45 .gitlab-ci.yml: corrected run of ubsan/asan
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:21 +02:00
Nikos Mavrogiannopoulos
9ecafa9d73 configure: do not warn on string truncation
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:21 +02:00
Nikos Mavrogiannopoulos
aec5112609 radius: allow more space in route from txt to avoid truncation
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:21 +02:00
Nikos Mavrogiannopoulos
f4cef63501 pam: corrected check for empty password
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:21 +02:00
Nikos Mavrogiannopoulos
b4b3f8978d tlslib: eliminated unneeded code for GnuTLS >= 3.3.0
We already require GnuTLS 3.3.0 or later.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:23:09 +02:00
Nikos Mavrogiannopoulos
6f70ec1464 proc_table_update_ip: corrected DTLS address comparison
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:22:59 +02:00
Nikos Mavrogiannopoulos
90b3c439fb tests: server-cert-rsa-pss moved to xfail set
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:22:46 +02:00
Nikos Mavrogiannopoulos
21694d54dc tlslib: set public key algorithm with gnutls_privkey_import_ext4
Previously we would require communication with sec-mod, which is
not setup during configuration time.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-14 14:22:46 +02:00
Nikos Mavrogiannopoulos
9cdd2be7f0 include crypt.h to use crypt()
This is necessary in Fedora28 as it doesn't provide
crypt() prototype in unistd.h

https://bugzilla.redhat.com/show_bug.cgi?id=1566464

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
2018-04-12 14:59:05 +02:00
Nikos Mavrogiannopoulos
1b313b9e80 tlslib: added missing struct element
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
2018-04-12 13:08:47 +02:00
Nikos Mavrogiannopoulos
c69c702818 Merge branch 'tmp-replace-tests' into 'master'
tests: replace docker tests with tests based on namespaces

See merge request ocserv/ocserv!77
2018-04-10 19:59:54 +00:00
Nikos Mavrogiannopoulos
158b099c9f tests: added test with compression enabled
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-06 06:53:27 +02:00
Nikos Mavrogiannopoulos
017bd414f9 .gitlab-ci.yml: update code coverage
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-05 20:09:36 +02:00
Nikos Mavrogiannopoulos
265e30dab7 tests: full-test was moved into traffic test
The new traffic test only requires namespaces and no docker.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-05 20:06:27 +02:00
Nikos Mavrogiannopoulos
490a201826 haproxy-connect: split into lib
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-05 18:59:41 +02:00
Nikos Mavrogiannopoulos
6aaf37913f Merge branch 'tmp-haproxy' into 'master'
Added testsuite with haproxy

See merge request ocserv/ocserv!75
2018-04-04 05:38:05 +00:00
Nikos Mavrogiannopoulos
86fe0fc457 tests: added check with haproxy connection
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-04 07:22:49 +02:00
Nikos Mavrogiannopoulos
d6332cd428 proc_table_update_ip: do not update IP if the previous IP is not found
That adds a safety net in case there is a mismatch of IPs, to prevent
adding two entries in the hashtable for the same IP.

Resolves #146

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-02 23:04:39 +02:00
Nikos Mavrogiannopoulos
bd5ad4d7c3 doc update
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-01 13:31:59 +02:00
Nikos Mavrogiannopoulos
8eda81e033 proc-search: indentation fixes
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-01 13:30:47 +02:00
Nikos Mavrogiannopoulos
63b7e81e87 tests: added test with proxy-protocol
That tests operation under haproxy with proxy-protocol without docker.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-01 13:30:47 +02:00
Nikos Mavrogiannopoulos
5c719b4264 worker: properly handle the haproxy health commands
That is, do not close that connection, but follow up and accept
it, according to the protocol.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-04-01 13:30:47 +02:00
Nikos Mavrogiannopoulos
e09f54ea77 NEWS: document only entries which are not available in 0.11.x branch
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-22 08:46:26 +01:00
Nikos Mavrogiannopoulos
348a45902e Merge branch 'tmp-bsd-rename' into 'master'
Rename the tun device on FreeBSD

See merge request ocserv/ocserv!71
2018-03-22 07:41:06 +00:00
Nikos Mavrogiannopoulos
1aa3056849 doc update
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-21 12:55:04 +01:00
Nikos Mavrogiannopoulos
d8731fbb99 configure: warn when no worker isolation is available
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-21 12:52:04 +01:00
Nikos Mavrogiannopoulos
0247db65d2 tun: better separation of OS dependent tun functionality
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-21 12:52:04 +01:00
Nikos Mavrogiannopoulos
511fe9a0d3 combined bsd_open_tun with bsd_ifrename
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-21 12:52:04 +01:00
Nikos Mavrogiannopoulos
6913b1fb33 rename tun device on FreeBSD
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-21 12:52:04 +01:00
Nikos Mavrogiannopoulos
e996e2fe06 Merge branch 'tmp-fix-multi-line-val' into 'master'
Allow more than 128+96 configuration options

Closes #141

See merge request ocserv/ocserv!74
2018-03-21 11:40:22 +00:00
Nikos Mavrogiannopoulos
1e88a224ee _add_multi_line_val: corrected array size extension
The current implementation would impose an artificial limit of
configuration options to (DEFAULT_CONFIG_ENTRIES+128) after which
the server would crash on loading. With that change we allow for
an arbitrary number of configuration options.

Resolves #141

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-21 12:28:26 +01:00
Nikos Mavrogiannopoulos
0de68ef4b1 tests: added reproducer for #141
This tests whether more than 128 options can be read in
routes or dns fields.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-21 12:28:24 +01:00
Nikos Mavrogiannopoulos
7b4c1bae5a .gitlab-ci.yml: added ubsan build
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-12 21:56:03 +01:00
Nikos Mavrogiannopoulos
dfab7f6e30 Create coverage report and depend on pre-built CI images
It will be made available at:
https://ocserv.gitlab.io/ocserv/coverage/

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-12 21:54:44 +01:00
Nikos Mavrogiannopoulos
96efa890e9 config: allow empty device name on vhosts
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-11 15:12:23 +01:00
Nikos Mavrogiannopoulos
704763ac40 config: corrected check for empty device name
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-11 06:40:20 +01:00
Nikos Mavrogiannopoulos
c2a519572b sec-mod: move variable in the ifdef block it is used at
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-11 06:33:37 +01:00
Nikos Mavrogiannopoulos
8b0b1e6067 tlslib: added support for gnutls 3.6.3 (unreleased)
That adds support for GNUTLS_PRIVKEY_INFO_PK_ALGO_BITS which is
necessary for RSA-PSS private keys.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-10 19:19:07 +01:00
Nikos Mavrogiannopoulos
a56d1b7900 README.md: better presentation of badges [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-10 18:01:38 +01:00
Nikos Mavrogiannopoulos
71f7b81b28 .travis.yml: removed; ocserv cannot be built in ubuntu14.04
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-10 17:59:06 +01:00