Commit Graph

2539 Commits

Author SHA1 Message Date
Roger A. Light
4f9fe4df4d dynsec: Rolelist as own file for consistency. 2020-11-18 11:54:13 +00:00
Roger A. Light
fe436cda95 dynsec: Fix potential grouplist leaks. 2020-11-18 11:46:23 +00:00
Roger A. Light
04d53e8919 ctrl: Give helpful message when initialising dynsec. 2020-11-18 11:46:23 +00:00
Roger A. Light
20bf6e706e dynsec: Fix role clientlists not being freed. 2020-11-18 11:46:23 +00:00
Roger A. Light
524510f4f6 Fix some plugin memory not being freed on exit. 2020-11-18 11:46:10 +00:00
Roger A. Light
67fbe5cc7e dynsec: Fix some keys being accessed even if they don't exist. 2020-11-18 09:34:28 +00:00
Roger A. Light
6b75dc601e Cope with missing username. 2020-11-17 19:22:08 +00:00
Roger A. Light
aa7176e3ad Fix mosquitto_ctrl_example shared object building on some platforms.
Closes #1895. Thanks to Franz.
2020-11-17 16:24:26 +00:00
Roger A. Light
63277aad0b dynsec: setClientId should cope with missing/empty client id. 2020-11-17 16:10:01 +00:00
Roger A. Light
eac0c3bac0 dynsec: modifyClient can now change clientid and password. 2020-11-17 16:07:54 +00:00
Roger A. Light
dbcf945518 dynsec: Kick clients after password changes. 2020-11-17 14:58:41 +00:00
Roger A. Light
b06c5cd88f dynsec: Add setClientId command. 2020-11-17 14:58:23 +00:00
Roger A. Light
f02c67fecf Fix file logging on Windows.
Closes #1880. Thanks to J1EXA, richl, and EnneiteZer.
2020-11-17 11:08:20 +00:00
Roger A. Light
47f4cb8159 Fix potential null dereference. 2020-11-17 11:00:24 +00:00
Roger A. Light
492bbba079 Point Windows users to older installers if needed. 2020-11-17 10:58:54 +00:00
Roger A. Light
8c6a7314b7 ctrl: Fix reporting when module not supported. 2020-11-17 10:56:55 +00:00
Roger A. Light
edd74cca59 Fix cmake build of mosquitto_ctrl. 2020-11-17 10:53:42 +00:00
Roger A. Light
91584a90a2 Fix dynsec plugin cmake build 2020-11-17 10:52:40 +00:00
Roger A. Light
5db9884bac Fix poll() build 2020-11-17 10:51:50 +00:00
Roger A. Light
7172867ff0 Ignore windows 64 bit build dir. 2020-11-17 10:21:58 +00:00
Roger A. Light
68f849f2af Fix slug 2020-11-13 22:11:08 +00:00
Roger A. Light
b3a0b999eb First draft of dynsec documentation. 2020-11-13 17:44:10 +00:00
Roger A. Light
c552401cbd Consistency in readme naming. 2020-11-12 22:08:38 +00:00
Roger A. Light
eee34613b4 Fix building of old tests. 2020-11-12 21:57:54 +00:00
Roger A. Light
e7a4e73cd8 Fix listener not being reassociated with client.
This occurred when reloading a persistence file and
`per_listener_settings true` is set and the client did not set a
username.

Closes #1891. Thanks to Mikkel Nepper-Christensen.
2020-11-12 17:36:49 +00:00
Roger A. Light
4e13bdec04 Add build support for jemalloc 2020-11-12 17:35:19 +00:00
Franz Auernigg
18a6d79ab8 Fix cmake if condition in lib/CMakeLists.txt
Signed-off-by: Franz Auernigg <f.auernigg@commend.com>
2020-11-11 09:42:40 +00:00
Franz Auernigg
73f1a1c892 Fix enclosing include brackets in cmake
Signed-off-by: Franz Auernigg <f.auernigg@commend.com>
2020-11-11 09:32:43 +00:00
Roger A. Light
c5fe1fc36b Dynsec: Fix loading of clients with no password. 2020-11-07 23:49:00 +00:00
Roger A. Light
4b3c76d97a mosquitto_ctrl: Allow optional client and password when creating a client. 2020-11-07 23:49:00 +00:00
Roger A. Light
a0c39b193b Fix description of -e and -t arguments in mosquitto_rr.
Closes #1881. Thanks to Arnav Singh.
2020-11-07 23:11:55 +00:00
Roger A. Light
90ce92144c Fix websockets build. 2020-11-06 18:23:55 +00:00
Roger A. Light
26e8cc3fb9 Fix connack props not being freed on error. 2020-11-06 18:12:12 +00:00
Roger A. Light
8de1216105 No need to call time() when logging. 2020-11-06 17:16:35 +00:00
Roger A. Light
b816d46508 Use db as a global var instead of passing to functions.
This allows a big swath of ifdefs to be removed. It also means savings as the db var is not passed around all of the time, and makes it easier to remove the final broker call to mosquitto_time() call in packet_mosq.c. In one test this reduced the calls to mosquitto_time() from 295k to 48k.
2020-11-06 17:16:23 +00:00
Roger A. Light
108b23ce6d Reduce use of mosquitto_time() and time(). 2020-11-06 14:20:39 +00:00
Roger A. Light
e6b8fc5bbd Fix oversize packet check in CONNECT. 2020-11-06 12:02:43 +00:00
Roger A. Light
3091d624ed Free plugin identifier. 2020-11-06 11:41:33 +00:00
Roger A. Light
c5ba597588 Fix use after free (unreleased) 2020-11-06 11:19:27 +00:00
Roger A. Light
255ae24a6d Fix basic dynsec tests. 2020-11-05 23:48:11 +00:00
Roger A. Light
c2651cf005 Remove deprecation warning on libmosquittopp. 2020-11-05 22:38:35 +00:00
Roger A. Light
693f6ad36e Only make keepalive checks every 5 seconds. 2020-11-05 21:43:23 +00:00
Roger A. Light
23d3c2641e Optimise epoll event to context/listener mapping. Allows quicker lookups. 2020-11-05 16:10:50 +00:00
Roger A. Light
95139cccff Dynsec: If priority is equal when ordering, use group/role name as well. 2020-11-05 12:23:53 +00:00
Roger A. Light
2a1df4ddb2 Breaking: Drop privileges after loading the configuration
This change means privileges are dropped before loading certificates, starting logging, creating the pid file etc. are carried out, so all of those actions must now be changed to ensure that the unprivileged user can carry them out.
2020-11-05 12:05:07 +00:00
Roger A. Light
c5fee09c24 Basic client disconnect event support for plugins. 2020-11-05 10:52:21 +00:00
Roger A. Light
4d6384c758 Build and conversion fixes for build variants. 2020-11-05 10:23:01 +00:00
Roger A. Light
4d9afc835b Fix missing functions in test. 2020-11-05 09:06:51 +00:00
Roger A. Light
e6dd08074d TLS certificates for the server are now reloaded on SIGHUP. 2020-11-04 22:57:10 +00:00
Roger A. Light
b2560f5e06 Move certificate loading to its own function. 2020-11-04 22:21:17 +00:00