Commit Graph

55 Commits

Author SHA1 Message Date
Roger A. Light
791c63372b Fix cjson include paths. 2020-12-04 22:15:19 +00:00
Karl Palsson
58a06f3331 apps: mosquitto_ctrl: don't hard set paths
In a cross compile environment, these paths will be added elsewhere, and
in a local environment, they should already be covered by the system
compiler.  Simply drop them.

Signed-off-by: Karl Palsson <karlp@etactica.com>
2020-12-04 21:45:06 +00:00
Roger A. Light
6ad5f19aef CMake build fixes for Windows. 2020-12-03 14:02:17 +00:00
Roger A. Light
d6fe93aa51 ctrl: --force not supported. 2020-12-02 20:39:07 +00:00
Roger A. Light
26ffe1300a Various Windows build fixes. 2020-12-02 19:49:14 +00:00
Roger A. Light
550c54701e Fix cmake build when cjson not available. 2020-12-02 15:50:33 +00:00
Roger A. Light
d291effdcf Fix mosquitto_ctrl Makefile build yes/no based on deps. 2020-12-02 10:31:25 +00:00
Roger A. Light
3731535298 Add SPDX license identifiers. 2020-12-01 20:46:56 +00:00
Roger A. Light
757888b7f5 ctrl: Add warning if connecting without encryption. 2020-11-30 10:47:22 +00:00
Roger A. Light
584cf51ba7 Update to EPL-2.0 2020-11-25 17:34:21 +00:00
Roger A. Light
0713ad38b1 Silence Coverity Scan's concern over password_cmd derefencing.
This is a false positive, the conditions to trigger a NULL derefence
rely on argc changing value. However, this makes it impossible to go
wrong anyway.

Coverity Scan 1436868.
2020-11-25 11:04:58 +00:00
Roger A. Light
adfa9f1e21 Always zero terminate payloads (removes uhpa support) 2020-11-24 12:24:40 +00:00
Roger A. Light
0c6365726f Coverity Scan issues.
1436823
1436837
1436843
1432792
1436847
1436848
1436849
2020-11-24 10:06:28 +00:00
Roger A. Light
f83fcc8535 Fix Coverity Scan issues.
1436866
1436865
1436864
1436862
1436857
1436856
1436852
1436851
2020-11-24 00:47:30 +00:00
Roger A. Light
04d53e8919 ctrl: Give helpful message when initialising dynsec. 2020-11-18 11:46:23 +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
b06c5cd88f dynsec: Add setClientId command. 2020-11-17 14:58:23 +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
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
4b3c76d97a mosquitto_ctrl: Allow optional client and password when creating a client. 2020-11-07 23:49:00 +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
4d6384c758 Build and conversion fixes for build variants. 2020-11-05 10:23:01 +00:00
Roger A. Light
aafb75b6bc Ctrl: Fix use of ints in cJSON. 2020-11-04 13:58:40 +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
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
866c395dcc Dynsec: Add "disabled" property for getClient/listClients. 2020-10-30 12:35:34 +00:00
Roger A. Light
66d16280d8 dynsec: Add enableClient disableClient commands. 2020-10-29 15:17:12 +00:00
Roger A. Light
98815c5037 ctrl: Ask for passwords if not given.
Applies to login user, init, createClient, and setClientPassword.
2020-10-29 14:35:50 +00:00
Roger A. Light
99a544ac73 ctrl: Ask for login password if the user doesn't provide it. 2020-10-29 12:49:51 +00:00
Roger A. Light
1b3dc5e978 passwd: Move password getting code to own file for sharing. 2020-10-29 12:48:59 +00:00
Roger A. Light
df30b6c9d4 Dynsec: add getAnonymousGroup and getDefaultACLAccess commands 2020-10-29 11:38:34 +00:00
Roger A. Light
c9cb10a079 ctrl: get* output for dynsec. 2020-10-29 09:59:07 +00:00
Roger A. Light
4c427915a0 ctrl: Fix acltype names. 2020-10-28 16:18:08 +00:00
Roger A. Light
015eee6cb6 ctrl: Fix parameter order to match docs. 2020-10-28 16:17:51 +00:00
Roger A. Light
1e2ba03754 ctrl: Give dynsec init user more rights.
Subscribe and receive from $SYS/#
Subscribe and receive from #
2020-10-28 11:50:52 +00:00
Roger A. Light
1f0ae42917 ctrl: Fix incorrect dynsec commands. 2020-10-28 11:46:13 +00:00
Roger A. Light
a1ad4cfcc4 Dynsec: Rename ACL types for clarity.
publishBrokerToClient -> publishClientReceive
publishClientToBroker -> publishClientSend
2020-10-28 11:03:44 +00:00
Roger A. Light
004bd3c5cd Dynsec: Set default behaviour to be less restrictive.
Publish broker to client and unsubscribe are now allowed by default. With Publish client to broker and subscribe denied by default there is still no way a client can exchange messages, but it is now easier to administer.
2020-10-28 11:03:44 +00:00
Roger A. Light
fdff255916 New dynamic security plugin. 2020-10-27 00:54:55 +00:00
Roger A. Light
e82ee879d5 Merge branch 'fixes' into develop 2020-10-27 00:43:07 +00:00
Roger A. Light
cd3dda387a Fix mosquitto_passwd cmake build. 2020-10-21 14:06:29 +01:00
Roger A. Light
e69dedfc27 Make more portable. 2020-10-21 13:37:54 +01:00
Roger A. Light
6035d8015b Consistent naming. 2020-10-21 13:33:33 +01:00
Roger A. Light
1851a0e1b1 Add support for pbkdf2 hash iterations. 2020-10-21 13:19:32 +01:00
Roger A. Light
4f61f6c161 Fix conversion errors. 2020-10-17 01:23:08 +01:00
Roger A. Light
687ca36c07 Makefile build fixes for message-timestamp plugin. 2020-10-13 16:49:18 +01:00