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
Roger A. Light
24462a816b
Tidy up headers.
2020-11-04 22:20:50 +00:00
Roger A. Light
aafb75b6bc
Ctrl: Fix use of ints in cJSON.
2020-11-04 13:58:40 +00:00
Roger A. Light
801e31efda
Dynsec: Validate user/group/role names as UTF-8.
2020-11-04 13:32:27 +00:00
Roger A. Light
7462fec1c8
Dynsec: Check ACLs are valid topic filters.
2020-11-04 12:20:14 +00:00
Roger A. Light
3486f0e546
Dynsec: Kick affected clients on role change.
2020-11-04 10:18:30 +00:00
Roger A. Light
9785896eea
Ctrl: Report errors on invalid args, don't try to connect.
2020-11-03 18:15:46 +00:00
Roger A. Light
bb840ed55b
Conversion fixes.
2020-11-03 10:09:18 +00:00
Roger A. Light
8e7e4a9d9a
Clients: Give warning if keepalive too low.
2020-11-03 09:51:28 +00:00
Roger A. Light
1191a42c2e
Fix more incorrect quota handling.
...
Must check QoS, and directions were wrong.
2020-11-02 23:14:21 +00:00
Roger A. Light
042c2733f2
Test and fix for message expiry not increasing send quota.
2020-11-02 23:09:18 +00:00
Arenoros
9c3a214a01
In android ndk doesn't exist librt and libpthread
...
Signed-off-by: Arenoros <arenoros@gmail.com>
2020-11-02 21:36:24 +00:00
raspopov
add355a78b
QNX has no pselect() either.
...
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
2020-11-02 21:33:09 +00:00
raspopov
aed4b945d9
Fixed QNX compilation. QNX 6.5 supports _XOPEN_SOURCE=600 or less.
...
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
2020-11-02 21:31:23 +00:00
Roger A. Light
92a1a02430
Tag local docker builds.
2020-11-02 13:05:59 +00:00
Roger A. Light
a3bff44a3e
Split mosquitto_ctrl manpages by module.
2020-11-01 23:49:40 +00:00
Roger A. Light
bb03b9c081
Let mosquitto_ctrl load external modules.
...
Also provide an example.
2020-11-01 22:59:39 +00:00
Roger A. Light
97385f522b
Ctrl: Client only deals with a payload string, not cJSON.
2020-11-01 22:11:32 +00:00
Roger A. Light
2e72d795a9
Fix timeout conversion error.
2020-10-30 21:31:13 +00:00
raspopov
0097a85ce0
Something bad happened with a "timeout" parameter of mosquitto_loop() function in 4f61f6c161
. Reverted.
...
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
2020-10-30 18:40:22 +00:00
Roger A. Light
866c395dcc
Dynsec: Add "disabled" property for getClient/listClients.
2020-10-30 12:35:34 +00:00
Roger A. Light
5b28fac61d
Dynsec: Kick clients on access changes
...
This works in the following circumstances:
* client is deleted
* client is modified
* client has role added
* client has role removed
* group is deleted
* group is modified
* group has role added
* group has role removed
* group has client added
* group has client removed
* anonymous group is changed
The following circumstances are not yet fixed:
* role is deleted
* role is modified
* role has ACL added
* role has ACL removed
2020-10-30 12:35:02 +00:00
Roger A. Light
30bf47b0d1
Fix printing of ints in dynsec json.
2020-10-29 23:51:32 +00:00
Roger A. Light
e95327789e
Note that zero length retained messages are never retained.
...
Closes #1871 . Thanks to James Kleeh.
2020-10-29 19:39:50 +00:00
Roger A. Light
66d16280d8
dynsec: Add enableClient disableClient commands.
2020-10-29 15:17:12 +00:00