Commit graph

160 commits

Author SHA1 Message Date
Roger A. Light
5ab7603811 Fix Coverity Scan 1486934 Unchecked return value 2022-03-24 10:17:15 +00:00
Roger A. Light
27b4a6aa33 Fix Coverity Scan 1487012 Resource leak 2022-03-24 09:06:33 +00:00
Roger A. Light
b3096982b5 Fix Coverity Scan 1486953 Use after free 2022-03-24 08:11:11 +00:00
Roger A. Light
07b7533b1e Fix Coverity Scan 1486947 Double free 2022-03-24 08:11:11 +00:00
Roger A. Light
c661f475b4 Coverity Scan fixes - Invalid type in argument to printf format specifier
1453805
1453806
1486939
1486954
1486955
1486956
1486960
2022-03-24 08:11:11 +00:00
Roger A. Light
7939633114 Optimise persist client msg clearing. 2022-03-18 11:08:18 +00:00
Roger A. Light
bf1d39746a dynsec: admin should have sys-observe role 2022-03-17 11:53:41 +00:00
Roger A. Light
0a4a029fbf Persist plugin: Simplify cases where we don't take a copy.
Some members of the persist plugin interface are only used to find a
client struct, for example. There is no need for the plugin to allocate
a new copy and the broker to free it in that case.
2022-03-16 22:18:45 +00:00
Roger A. Light
3122d3e2c5 Simplify some dynsec config functions. 2022-03-13 22:22:19 +00:00
Roger A. Light
5279a424b1 Dynsec: Kick clients in tick event rather than immediately
This means that PUBACK/PUBREC should be sent to clients that modify
their own roles.

Closes #2474. Thanks to Stefano Berlato.
2022-03-12 23:16:57 +00:00
Roger A. Light
0deaae286e NULL after freeing. 2022-03-09 01:33:23 +00:00
Roger A. Light
051fbadb99 Move some CONTROL code to plugin common. 2022-03-08 21:28:22 +00:00
Roger A. Light
cbb01193a0 Rename persist retain_add to retain_set 2022-03-01 20:55:56 +00:00
Roger A. Light
8d94fdc688 Minor housekeeping. 2022-03-01 13:51:20 +00:00
Roger A. Light
2d3b152a22 Rename of mosquitto_msg_store struct.
struct mosquitto_msg_store -> struct mosquitto_base_msg

This is the base message which client messages and retained messages
refer to. The base messages are still held in the message store.

This change comes about because the persistence interface exposes these
message types. Prior to this commit the different messages were "msg",
"client_msg", and "retain". After this commit there is "base_msg",
"client_msg", and and "retain_msg" in the persist interface.
2022-03-01 10:44:47 +00:00
Roger A. Light
d2f598b6f6 persist-sqlite: commit transactions once every 5 seconds 2022-03-01 10:44:47 +00:00
Roger A. Light
68c002bc55 Plugin event counter example plugin. 2022-02-28 22:46:39 +00:00
Roger A. Light
14d1c32f9d Update changelog. Style, whitespace and, linker fixes. 2022-02-24 15:52:06 +00:00
Norbert Heusser
e7e8b6e832 * Added list of connections to dynsec/getClient response
* Added new helper function mosquitto_apply_on_all_clients to broker
* Refactoring in dynamic-security plugin

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-02-21 16:27:26 +00:00
Roger A. Light
02d08b9889 wildcard-temp: Don't attempt to delete from an empty list. 2022-02-09 23:39:37 +00:00
Roger A. Light
a0f58f20c3 Update threaded builds.
Most specifically use -pthread instead of -lpthread.
2022-02-09 22:19:35 +00:00
Roger A. Light
ffb7661d86 Move shared code to common directory
This is currently limited to "utility" type functions and does not include code common to the library and broker that are protocol related.
2022-02-09 16:26:10 +00:00
Roger A. Light
5a3b42d4a4 Use path vars in Makefiles. 2022-02-09 14:44:09 +00:00
Roger A. Light
aae7c406fe wildcard-temp plugin: Fix use after free. 2022-02-08 09:17:09 +00:00
Roger A. Light
d3f0d28d65 Persist-sqlite: Default to "normal" synchronous mode. 2022-02-06 21:36:45 +00:00
Roger A. Light
374f547b64 Persist sqlite: Store client connection time. 2022-02-06 21:12:12 +00:00
Roger A. Light
bc1adfd46d CMake fixes.
Builtin websockets support.
Persist sqlite plugin build.
Broker cJSON support
Add wildcard-temp plugin.
2022-02-04 22:28:26 +00:00
Roger A. Light
6b32cf61b2 CMake build fixes, including sqlite support. 2022-02-04 14:53:19 +00:00
Roger A. Light
8d073771c3 Make some plugin code shared for future use. 2022-02-03 23:08:28 +00:00
Roger A. Light
d032c94d14 Remove global vars. 2022-02-03 21:50:20 +00:00
Roger A. Light
4adce6d0da Add anonymous group when generating dynsec config. 2022-02-02 22:02:11 +00:00
Roger A. Light
11c5cf039f Simplify memory use for dynsec. 2022-01-27 16:09:09 +00:00
Roger A. Light
34dc62be86 Document wildcard_temp plugin. 2022-01-11 10:21:43 +00:00
Roger A. Light
dc906c5221 Sqlite persistence plugin. 2022-01-09 23:54:09 +00:00
Roger A. Light
5b2e181c9f Example client lifetime and payload size stat plugins. 2021-12-27 22:56:21 +00:00
Roger A. Light
f43f136af8 Plugin for wildcard subscription blocking. 2021-12-22 12:15:39 +00:00
Roger A. Light
cd28187e5e Minor refactor to separate files. 2021-12-15 16:36:54 +00:00
Roger A. Light
17fd1929eb Move config load/save to own file. 2021-12-13 09:14:05 +00:00
Roger A. Light
2501a64035 Merge branch 'master' into develop 2021-11-23 12:53:50 +00:00
Roger A. Light
2976dffa71 Plugin template CMakeLists. 2021-11-16 16:17:31 +00:00
Roger A. Light
34b41a3b01 Dynsec: Add ability to deny wildcard subscriptions for a role 2021-11-10 11:20:25 +00:00
Konstantin Podsvirov
c4d51f0835 Fix DESTINATION for mosquitto_dynamic_security MODULE
On Windows MODULE will be installed as LIBRARY component
to `lib` folder that is not prefer for dynamic loaded modules
but can be found in RUNTIME DESTINATION (`bin` folder) too.

Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 17:11:09 +03:00
Roger Light
cd07f1136b Bump copyrights. 2021-11-03 22:10:06 +00:00
Roger A. Light
8ac11929cc Merge branch 'master' into develop 2021-10-27 17:19:33 +01:00
Roger A. Light
b9b065d2cc Compiler pedantry, and more checks in tests. 2021-10-14 11:39:46 +01:00
Roger A. Light
91e8344a3e Windows build fixes. 2021-10-13 14:39:09 +01:00
Roger A. Light
799cdead15 Experimental custom websockets support. 2021-10-06 15:32:45 +01:00
Roger A. Light
a1a190b482 Pointless whitespace tidy. 2021-10-05 15:20:37 +01:00
Roger A. Light
55d5d2e5f2 Fix for building when uthash not available. 2021-09-30 21:37:11 +01:00
Roger A. Light
2bfc7e7cc8 Do plugin callback unregistering automatically. 2021-09-30 12:42:13 +01:00