Commit Graph
13 Commits
Author SHA1 Message Date
Dimitri Papadopoulos OrfanosandNikos Mavrogiannopoulos c0b282576e Fix new Coverity Scan defect
This adds checks in memory allocation, to address the following issue reported by coverity:
** CID 645850:       Null pointer dereferences  (FORWARD_NULL) /tests/ban-ips.c: 84           in main()

Signed-off-by: default avatarDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2026-05-01 19:26:45 +00:00
Nikos Mavrogiannopoulos 139ff827d9 config: restructure per-vhost configuration for clarity and maintainability
Introduce a protobuf-generated ReloadableConfig (cfg.proto) to hold all
fields that reload on SIGHUP, and separate them from static_cfg_st, which
holds fields that require a server restart.  Named vhosts inherit from the
default vhost via a pack/unpack round-trip. Adding a new config field
only requires editing cfg.proto.  Struct and accessor names (ReloadableConfig,
static_cfg_st, GETRCONFIG, GETSCONFIG) now reflect each field's lifetime.
A new unit test covers the full inheritance path.

Resolves: #705

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-04-22 20:29:15 +02:00
Nikos Mavrogiannopoulos b25a1e7d81 tests: check for IPv6 handling issue
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-04-02 23:04:29 +02:00
Grigory Trenin b080d7dd2b Rename min-reauth-time to ban-time (#676)
Signed-off-by: Grigory Trenin <grigory.trenin@gmail.com>
2026-01-23 05:44:05 -05:00
Grigory Trenin 8636464880 tests: replace strcpy() with strlcpy()
- Replaced strcpy() with strlcpy() in test files
- Added linking to libcommon.a (and its dependency libnettle)
  as not all systems provide strlcpy()
- Centralized syslog_open variable by moving it from multiple definitions
  in main.c, worker.c, and test files into log.c. This avoids duplication
  and resolves a linking conflict with libcommon.a

Signed-off-by: Grigory Trenin <grigory.trenin@gmail.com>
2026-01-07 15:46:16 -05:00
Nikos Mavrogiannopoulos 78c65b5adf Updated code to follow with kernel coding style
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2024-12-01 17:01:05 +01:00
Nikos Mavrogiannopoulos f0067ae0ea Cleanup of the logging subsystem; allow logging to stderr only
Separated the logging logically from any remaining debugging
features. Introduced command line option for logging to stderr
only (for systemd and containers). The default log level is set
to (2) info.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-12-15 13:04:40 +01:00
Dimitri Papadopoulos d6d5680249 Bad function definition - int main() should be int main(void)
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2023-06-04 14:33:59 +02:00
Dimitri Papadopoulos f28669bf60 Remove spaces
* Remove trailing spaces at end-of-line
* Remove blank lines at end-of-file

Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2022-11-28 11:22:33 +01:00
Nikos Mavrogiannopoulos ba6921ed9a Introduced the notion of virtual hosts
This provides virtualized server configurations which take
effect after client connection when client hello is received.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-03-06 20:42:31 +01:00
Nikos Mavrogiannopoulos 45c2fb55c8 tests: avoid source dependencies from other dirs in Makefile
That causes compilation errors under certain cirquimstances.
2015-11-19 14:35:16 +01:00
Nikos Mavrogiannopoulos 1782dcb264 tests: ensure there are no leaks in ban-ips 2015-11-10 13:49:43 +01:00
Nikos Mavrogiannopoulos d2dd7f124f tests: added unit test for IPv4 and IPv6 address banning 2015-11-10 13:49:36 +01:00