Compare commits

...

336 Commits

Author SHA1 Message Date
Roger A. Light 1ca9e5984b Only create /run/mosquitto at runtime.
Per policy, packages shouldn't contain directories in /run. This means
/run/mosquitto should be created at boot time. Closes #983429.
5 years ago
Roger A. Light ec4fbf5ff7 Remove debian-config.patch
This is already handled with debian/mosquitto.conf
5 years ago
Roger A. Light 4beaaa8bc2 Version 2.0.8. 5 years ago
Roger A. Light 9f91044407 Update for 2.0.7. 5 years ago
Roger A. Light 4649322a6e Merge branch 'master' into debian 5 years ago
Roger A. Light 2ae17cd350 Package version 2.0.5. 5 years ago
Roger A. Light 2dc534a4d3 Merge branch 'master' into debian 5 years ago
Roger A. Light 07964b578a Version 2.0.0
-----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEoNbuodyuSaY1o7Lwd5si37PnF7cFAl/ILckRHHJvZ2VyQGF0
 Y2hvby5vcmcACgkQd5si37PnF7f4lg/6A4qXMsULWP32bS1MXvO+X63fbCi2jWmy
 2WXbHCJ9VnsH/7P0bBpiVuK+dKu4vIHBFAMByeH5zF2rfGTQCQZ0haKcArROYLLv
 ZIMebcXPLck7w2airRuCHjuECiggBbIhqTOEipj/esyv1zrBFVPL6Y1z8c7WD3QO
 7tz2ZwAeQdkadO39kGyqaT2xRpIbQsHQvV0G4iU99PDwzjHpXl/dDfgpndTEEf2P
 Ncp/NampeGiaGfBEFpsO5O6w7ohFy+A9xarMMJCEXEJuwPPJ/yX20tlP49xvSUJB
 sUYzSq12tsOYotKiTwrtokmDCQ+o2hpGJYP+TvI2ITIa9Zwg1BFi3fW/WjFNrQHA
 c6cZHbITVwOWArw8CS8rGaXT7Hzfjt8VteKnbvk/LavEdsGTSkpZtTKKUZeJDRz4
 iS60ur4Y3WAAU/FsiEGwhytgQG8ma+ByegIIyOIyhKBWBsrRisRIL7b//LfK+ut6
 njXug3gQsfMe59UuUXXf5EO5zdzvGyQQz7SNejdO829gfSScMBXLBSpjIpnC9Jdc
 2TmO0PAzG+fkPMnKeAdmGh4fhr/cBGFD4w6Yb+P7rhZ8M/huEYlBYuLpHQfen3KA
 1ZIeBvQTh0xzZsYwmHm148YqCFhgb1OFDdEHkIe6IkKRp+/pA6lvXQWRw04Gx0Vt
 7r3JtUuSFBk=
 =sFrr
 -----END PGP SIGNATURE-----

Merge tag 'v2.0.0' into debian

Version 2.0.0
5 years ago
Roger A. Light 2e35eba87f New upstream release. 5 years ago
Roger A. Light e08b929989 Merge branch 'master' into debian 5 years ago
Roger A. Light 0ab1940c9c Update for 1.6.9.
Revert change adding support for SRV.
Remove patches applied upstream.
6 years ago
Roger A. Light 3cc03850cb Merge branch 'master' into debian 6 years ago
Gianfranco Costamagna 1628d7da06 Merge latest fixes on Debian packaging
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
6 years ago
Roger A. Light c5a984db81 Update to 1.6.8. 6 years ago
Roger A. Light d6d1f94e4f Merge branch 'master'
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	client/pub_client.c
	client/pub_shared.c
	config.mk
	docker/1.6/Dockerfile
	docker/local/Dockerfile
	installer/mosquitto.nsi
	installer/mosquitto64.nsi
	lib/connect.c
	lib/handle_ping.c
	lib/handle_pubackcomp.c
	lib/handle_publish.c
	lib/handle_suback.c
	lib/loop.c
	lib/mosquitto.h
	lib/packet_mosq.c
	lib/util_mosq.c
	man/libmosquitto.3.xml
	set-version.sh
	snap/snapcraft.yaml
	src/context.c
	src/handle_auth.c
	src/handle_disconnect.c
	src/loop.c
	src/net.c
	src/security_default.c
	src/session_expiry.c
	src/subs.c
	www/pages/download.md
	www/pages/security.md
	www/posts/2019/09/version-1-6-6-released.md
6 years ago
Roger A. Light 616b85838f Don't use killall in logrotate script.
Closes: #940229 (Debian)
6 years ago
Roger A. Light 0c64f4406f Update for 1.6.6 6 years ago
Roger A. Light 8cfb3856c9 Bump version, update www and changelog. 6 years ago
Roger A. Light fdda46faa0 Hopeful fix for travis. 6 years ago
Roger A. Light 08229d5a93 Extra test for issue 1401. 6 years ago
Roger A. Light 814875bbe9 mosquitto_passwd returns 1 on an error condition
When attempting to update a user that does not exist.

Closes #1414. Thanks to kdgde.
6 years ago
Roger A. Light 1a1ffde16b Restrict topic hierarchy to 200 levels to prevent possible stack overflow.
Closes #1412. Thanks to Ryan Shaw.
6 years ago
Roger A. Light f0ba81c375 Update Docker for 1.6.5. 6 years ago
Roger A. Light 2c68b5ee52 Install mqtt_protocol.h 6 years ago
Roger A. Light 282cd0afda Fix for old libwebsockets versions. 6 years ago
Roger A. Light 1f7d5e6acb Bump version numbers, add release info. 6 years ago
Roger A. Light 2e067d1700 Refuse to compile with lws 3.2.0. 6 years ago
Roger A. Light b056bfcea5 Fix for websockets regression. 6 years ago
Roger A. Light 278130a2e9 Possible fix for #1385. 6 years ago
Roger A. Light 63db2d7961 Fix build WITH_TLS=no 6 years ago
Roger A. Light dadd94e7c1 Fix repeated "Error in poll" messages on Windows.
This occurs when only websockets listeners are defined.

Closes #1391. Thanks to stopak.
6 years ago
Roger A. Light ed8964de56 Fix CRL file not being reloaded on HUP.
Closes #35.
6 years ago
Roger A. Light b0e7e5fd77 Fix 11-message-expiry test when running under valgrind 6 years ago
Roger A. Light e88f58055d Updated SSL test files, plus a new empty crl file. 6 years ago
Roger A. Light 40c1a97c25 Fix missing locks on `mosq->state`.
Closes #1374. Thanks to Jeff Trull.
6 years ago
Heiko Bornholdt 76d0b327a9 Add missing EXPOSE instruction to all Dockerfiles
Signed-off-by: Heiko Bornholdt <bornholdt@informatik.uni-hamburg.de>
6 years ago
Matt Woelfel f118230b49 Fix usage of tls_engine and tls_keyform.
The current implementation does not properly forward the engine
parameters to OpenSSL causing OpenSSL to incorrectly attempt to open the
engine key uri as a file.

Sponsored-by: Trimble, Inc.
Signed-off-by: Matt Woelfel <matt@woelfware.com>
6 years ago
Roger A. Light 855772ec06 Fix websockets 3.2 causing slow connection on non-websockets listeners
Closes #1406. Thanks to pbrenna.
6 years ago
Roger A. Light c3c737eda7 alpine doesn't use glibc, so no memory tracking
Closes #1404. Thanks to Lichard Torman.
6 years ago
Roger A. Light 6f3e7b9ceb Further fix for #1401. 6 years ago
Roger A. Light 0cf3fc376e Ignore SSL artifacts. 6 years ago
Roger A. Light 8407c6d146 Fix Will not being sent if will delay greater than session expiry.
Closes #1401. Thanks to Will Lisac.
6 years ago
Roger A. Light 0415208a8a Improve error messages in some situations when clients disconnect.
Reduces the number of "Socket error on client X, disconnecting"
messages.
6 years ago
Roger A. Light e06b726564 Fix leak introduced in previous commit. 6 years ago
Roger A. Light 985366fe5d Fix clients using `use_identity_as_*` being disconnected on SIGHUP.
Closes #1402. Thanks to twegener-embertec.
6 years ago
Roger A. Light cf7ac452b8 Fix reconnect backoff where connections are dropped
Closes #737. Thanks to chelliwell.
6 years ago
Roger A. Light 982758a76e Fix bridges potentially not connecting on Windows.
Closes #478.
6 years ago
Roger A. Light 0e4d89c0a3 Guard ssize_t definition on Windows.
Closes #522. Thanks to trinytron.
6 years ago
Roger A. Light ee505336e0 Improve message_size_limit and various max_* option docs.
Closes #448.
6 years ago
Roger A. Light ea6753fe05 max_packet_size applies to 3.1.1 and 3.1 clients as well 6 years ago
Roger A. Light a87e244bb0 Improve details on global/per listener options in the mosquitto.conf man page.
Closes #274.
6 years ago
Roger A. Light 0a8d5d6db0 Fix slow websockets performance when sending large messages.
Closes #1390. Thanks to aalibasic.
6 years ago
Roger A. Light 701c1a9069 Fix support for libwebsockets 3.x. 6 years ago
YangHau 6a49b4ff38 Remove useless if statement
If statement for detecting if a pointer is NULL
is totally unnecessary.

Signed-off-by: YangHau <vulxj0j8j8@gmail.com>
6 years ago
Dan Langille a65e5137f9 $HOME/.config/mosquitto_sub or pub?
Should $HOME/.config/mosquitto_sub be $HOME/.config/mosquitto_pub? It seems to be that way based on my testing.

I think this is a copy/paste error.
6 years ago
Roger A. Light b5193c84d2 Don't error trying to cleanup missing persistence file. 6 years ago
Roger A. Light 04cf0cdf2d Fix WITH_STATIC_LIBRARIES using CMake on Windows
Closes #1369. Thanks to TimmvonderMehden
6 years ago
Roger A. Light a415d415c5 Fix v5 DISCONNECT packets with remaining length == 2.
These were being treated as a protocol error.

Closes #1367. Thanks to Frank Pagliughi.
6 years ago
Roger A. Light a8492b740c Fix missing function warnings on NetBSD.
Thanks to Greg Troxel.
6 years ago
Roger A. Light c5b25376bc Update Docker image to 1.6.4. 6 years ago
Roger A. Light 98a1e51d95 Bump version number, add release post. 6 years ago
Roger A. Light 0040a79a40 Windows fix 6 years ago
Roger A. Light d19cbb825c Fix properties not being sent on QoS>0 PUBLISH messages. 6 years ago
Roger A. Light c27a878e53 Fix memory leak when setting v5 properties in mosquitto_connect_v5() 6 years ago
YangHau 3d25b20eba feat: Remove unecessary if statement
free() would take no action if the arguement is a NULL pointer.
Therefore, the if statement is totally unnecessary.
See ISO-IEC 9899

Signed-off-by: YangHau <vulxj0j8j8@gmail.com>
6 years ago
Roger A. Light 06024700ba Clients: improve error msgs when connecting v3.x broker with v5 client
Closes #1344. Thanks to HowJMay.
6 years ago
Roger A. Light c0601b06a6 Fix location of readme-windows.txt
Closes #1361. Thanks to Duck Development.
6 years ago
Roger A. Light abad21a345 Fix link in CONTRIBUTING.md.
Closes #1362. Thanks to Furkan Aksoy.
6 years ago
Jonas Helgemo dfae3fce2e docs: Fix typo on man-page for mosquitto.conf
- man-page has a typo in the 'bridge_capath' section under SSL/TLS support

Signed-off-by: Jonas Helgemo <jhel@pm.me>
6 years ago
Roger A. Light 8743f2fd00 Fix incoming msgs not being removed when there are no subs
Fix incoming messages not being removed for a client if the topic being
published to does not have any subscribers.

Closes #1322. Thanks to Yannic Schröder.
6 years ago
Roger A. Light e98f121422 Index update. 6 years ago
Roger A. Light 0c0d8b8342 Fix incomgin QoS 2 with max_inflight_messages set to 1.
Closes #1332. Thanks to xmas79.
6 years ago
Roger A. Light 36532fa411 Fix mosquitto_string_option(, MOSQ_OPT_TLS_KEYFORM, ) return value
`mosquitto_string_option(mosq, MOSQ_OPT_TLS_KEYFORM, ...)` was incorrectly
returning `MOSQ_ERR_INVAL` with valid input. This has been fixed.

Closes #1360. Thanks to Michael Dombrowski.
6 years ago
Roger A. Light 4d4c5dd5a2 Make behaviour of `mosquitto_connect[_async]()` consistent.
`mosquitto_connect_async()` is now consistent with `mosquitto_connect()`
when connecting to a non-existent server.

Closes #1345. Thanks to Mohammad Reza.
6 years ago
Roger A. Light c3f4ee94a2 Set *name to NULL on failure. 6 years ago
Roger A. Light b5880f5e9a Set sock to invalid after closing. 6 years ago
Roger A. Light a37941647e Pedantic test fixes from failgrind. 6 years ago
Roger A. Light 0e9b3dff5b Don't define _GNU_SOURCE where already defined. Closes #1357. 6 years ago
Lucas Ramage ea2ae03378 Fix typos for READMEs in Docker directory (#1340)
* Fix typo
6 years ago
Roger A. Light a4d422108e Fix error codes not being returned when mosquitto_pub exits.
Closes #1354. Thanks to Ben Barbour.
6 years ago
Roger A. Light 3f82546b4a Fix MQTT v5 sub opts being set for v3 subs.
Closes #1353. Thanks to Ben Barbour.
6 years ago
YangHau 203c0ab6d0 Remove redundant initialization in clients
the `memset(&cfg, 0, sizeof(struct mosq_config));` already exsits in
`client_config_load()`'s `init_config()` function call.
So calling it in main function is totally unnecessary.

Signed-off-by: YangHau <vulxj0j8j8@gmail.com>
6 years ago
Roger Light 8c1d380b4e Allow other apps access to log file on Windows.
This change means that users with the appropriate security permissions
can open the log file for reading at the same time that it is being
written.

Closes #515.
6 years ago
Roger A. Light 8abcfafa29 Fix persistent clients being incorrectly expired on Raspberry Pis.
Closes #1272. Thanks to BowenMarmot and addendumE.
6 years ago
Roger A. Light ecfd90702e Update Docker to 1.6.3 6 years ago
Roger A. Light 784647cf3d Bump release date. 6 years ago
Roger A. Light ad2d0fe0d5 Update changelog 6 years ago
Matevz Mihalic f4832d8ef1 Fix plugin psk_key_get for v4
Signed-off-by: Matevz Mihalic <matevz.mihalic@gmail.com>
6 years ago
Roger A. Light 46720b6b2a Add ca-certificates to snap for easier TLS use. 6 years ago
Roger A. Light 563a623b41 Bump version and web pages. 6 years ago
Roger A. Light 86dca50798 Fix build for WITH_SOCKS=no. 6 years ago
Roger A. Light 6d8f9781a8 Fix `mosquitto_pub -l` not handling zero length input.
Closes #1302. Thanks to Marcus Watkins.
6 years ago
Roger A. Light e4cd0cfcf5 Remove obsolete `store_clean_interval` from documentation. 6 years ago
Roger A. Light cadf96e13f Fix incorrect shared subscription topic of '$shared.' 6 years ago
Roger A. Light 2a25356bb5 CLIENT_LDFLAGS now uses LDFLAGS.
Closes #1294. Thanks to Lucas Ramage.
6 years ago
Roger A. Light dc7e4170ee Remove old man page references.
Thanks to Karl Palsson.

Closes #1266.
6 years ago
Roger A. Light 30ff022c08 Fix MQTT v5 clients not being able to specify a password without a username.
Thanks to Erik Moqvist.

Closes #1274.
6 years ago
Roger A. Light 2e3763fc60 Improve documentation around the upgrading of persistence files.
Thanks to jsaak.

Closes #1276.
6 years ago
Roger A. Light 7e1e933bcc Fix typo causing build error on Windows when building without TLS support.
Thanks to TimmvonderMehden.

Closes #1264.
6 years ago
Roger A. Light 3b5979db2b Fix mosquitto_pub exiting with error code 0 when an error occurred.
Thanks to janniswarnat.

Closes #1285.
6 years ago
Roger A. Light 554502cb5f Stop some error messages being printed even when `--quiet` was used.
Thanks to Rob de Jonge.

Closes #1284.
6 years ago
Daniel d'Andrada 73fc501711 pthread_cancel() is not available on Android
Thus mosquitto_loop_start() and mosquitto_loop_stop()
won't be available there (and mosquitto_connect_async()
as a consequence).

Signed-off-by: Daniel d'Andrada <daniel.dandrada@esrlabs.com>
6 years ago
Daniel d'Andrada 9b711fc345 Fix #include guard in config.h
Signed-off-by: Daniel d'Andrada <daniel.dandrada@esrlabs.com>
6 years ago
Roger A. Light 01a6fcdd8c Disable tests for cmake. 6 years ago
Roger A. Light c6a4160def Fix incoming/outgoing quota problems for QoS>0. 6 years ago
Roger A. Light d3ed92ce14 Further attempt 6 years ago
Roger A. Light 299956e777 Attempt to fix 11-message-expiry for travis. 6 years ago
Roger A. Light 8153eb9f0d Fix `mosquitto_pub -l` not handling network failures.
Closes #1152. Thanks to Dustin Sallings.
6 years ago
Roger A. Light a4243ee919 Fix double free on exit in mosquitto_pub.
Closes #1280. Thanks to Lucky Saini.
6 years ago
Roger A. Light 79bbc5d610 Suppress confusing "unknown PUBREL" message. 6 years ago
Roger A. Light df270e3b20 Fix MQTT v5 overlapping subscription behaviour.
Clients now receive message from all matching subscriptions rather than
the first one encountered, which ensures the maximum QoS requirement is
met.
6 years ago
Roger A. Light 0545614f80 Fix zero length client ids being rejected for MQTT v5 clients.
This was happening when clean start was set to true.
6 years ago
Roger A. Light bb7e6534e3 Fix incorrect shared subscription topic of '$shared.' 6 years ago
Roger A. Light 1ddc0c9188 CLIENT_LDFLAGS now uses LDFLAGS.
Closes #1294. Thanks to Lucas Ramage.
6 years ago
Roger A. Light e87ac5a79c Disable TLS renegotiation.
Client initiated renegotiation is considered to be a potential attack
vector against servers.

Closes #1257. Thanks to Daniele Sluijters.
6 years ago
Roger A. Light ee26690a09 Add SECURITY.md. 6 years ago
Roger A. Light 556eec42a9 Only add to disused if session expiry is 0. 6 years ago
Roger A. Light 3f81f874de Fix persistent Websockets clients not receiving messages.
This occurs after they reconnect, having sent DISCONNECT
on a previous session.

Closes #1227. Thanks to usernametaken.
6 years ago
Roger A. Light 32fa6ea17d Fix test compilation. 6 years ago
Roger A. Light 4660254072 Colour internal logs for visibility. 6 years ago
Roger A. Light fce996ae63 Add 'extern "C"' on public headers.
mosquitto_broker.h and mosquitto_plugin.h

Thanks to Wolfgang Petroschka.

Closes #1290.
6 years ago
Roger A. Light 7c3c422803 Mention mosquitto_broker.h in mosquitto_plugin.h. 6 years ago
Roger A. Light 732cb1c45e Consistent ref counting inc and dec functions. 6 years ago
Roger A. Light ebbdb27b0a Remove old man page references.
Thanks to Karl Palsson.

Closes #1266.
6 years ago
Roger A. Light 959e785c2f Fix MQTT v5 clients not being able to specify a password without a username.
Thanks to Erik Moqvist.

Closes #1274.
6 years ago
Roger A. Light 2b794993d7 Improve documentation around the upgrading of persistence files.
Thanks to jsaak.

Closes #1276.
6 years ago
Roger A. Light e680b3dbf2 Fix typo causing build error on Windows when building without TLS support.
Thanks to TimmvonderMehden.

Closes #1264.
6 years ago
Roger A. Light c39d6294b5 Fixes for bug #1273
* Fix Will message for a persistent client incorrectly being sent when the client reconnects after a clean disconnect.
* Fix Will message for a persistent client not being sent on disconnect.
* Fix mosquitto_pub not using the `-c` option.

Thanks to Yannic Schröder.

Closes #1273.
6 years ago
Roger A. Light 77afc86412 Fix mosquitto_pub exiting with error code 0 when an error occurred.
Thanks to janniswarnat.

Closes #1285.
6 years ago
Roger A. Light 5b6a806e26 Stop some error messages being printed even when `--quiet` was used.
Thanks to Rob de Jonge.

Closes #1284.
6 years ago
Roger A. Light b8abcba74d Fix compilation problem related to getrandom() on non-glibc systems. 6 years ago
Roger A. Light f169e523e1 Fix use of getrandom() for Linux and WITH_TLS=no. 6 years ago
Roger A. Light 2e29ed2c8d Fix default max_topic_alias listener config not being used.
This was not being copied to the in-use listener when compiled without
TLS support.
6 years ago
Roger A. Light ff187d0d5b Simplify ping checking in tests. 6 years ago
Roger A. Light 7c4947fcf7 Update changelog, improve warning message from last commit. 6 years ago
Till Zimmermann 863c0ee3ab Fixed Segmentation Fault / NULLptr dereference
Signed-off-by: Till Zimmermann <tzimmermann@uni-osnabrueck.de>
6 years ago
Roger A. Light d61c1118de Fix detection of incoming v3.1/v3.1.1 bridges.
Closes #1263. Thanks to vrst37.
6 years ago
Karl Palsson d296bde1f6 ssl: support openssl with ENGINE support disabled.
Alternatively, just drop support for this config.

Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson 2e9ad5fe4a lib: fix missing openssl/ui.h include.
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Roger A. Light 25e1095099 Make target for building a docker image based on working dir files. 6 years ago
Christian von Arnim 742f0adf58 Fix password input when MAX_BUFFER_LEN is not 1024 in mosquitto_passwd.c
Signed-off-by: Christian von Arnim <christian.vonarnim@gmail.com>
6 years ago
Roger A. Light 141626251d Update dockerfile for 1.6.2. 6 years ago
Roger A. Light 0bd40a0193 Bump version numbers, update webpage. 6 years ago
Roger A. Light fe3b73a7f0 Windows build fixes. 6 years ago
Roger A. Light ee962ceda3 Fix $SYS/broker/version being incorrectly expired after 60 seconds.
Close #1245. Thanks to Christoph Krey.
6 years ago
Roger A. Light 895e209c41 Fix broker originated messages not being sent.
This occurred when `check_retain_source` was set to true.

Closes #1245. Thanks to Christoph Krey.
6 years ago
Roger A. Light 77813949e7 Test for Will property usage. 6 years ago
Roger A. Light 9459269a6f Fix Will message not allowing user-property properties. 6 years ago
Roger A. Light 127b6a3d91 Fix -L url parsing.
Closes #1248. Thanks to Andrew J Freyer.
6 years ago
Roger A. Light ccded567a5 Fix crash after client has been unable to connect to a broker
This is part of the cleanup routine when the client is already exiting.

Closes #1246. Thanks to Christoph Krey.
6 years ago
Roger A. Light f41cca8152 Fix access after free when v5 client with Will message disconnects.
The Will message has as its first property one of content-type,
correlation-data, payload-format-indicator, or response-topic.

Closes #1244. Thanks to Christoph Krey.
6 years ago
Roger A. Light 4e72cae004 Fix build for WITH_TLS=no.
Closes #1250. Thanks to bmparr.
6 years ago
Roger A. Light c99f46ac2b Update Docker image for 1.6.1. 6 years ago
Roger A. Light 93b598d8e7 Bump version number, update webpage. 6 years ago
Roger A. Light 5bda2db5c4 Use CMAKE_INSTALL_* variables when installing in CMake.
Closes #1049. Thanks to Greg Troxel.
6 years ago
Roger A. Light 9664a6b251 Don't call ldconfig in CMake scripts.
Closes #1048. Thanks to Greg Troxel.
6 years ago
Roger A. Light e381581a49 Document notifications better. Closes #1188. 6 years ago
Roger A. Light 86ba51a33c Build fixes around CFLAGS et al.
- Split CFLAGS and CPPFLAGS, and LDFLAGS and LDADD/LIBADD.
- test/unit now respects CPPFLAGS and LDFLAGS.

Closes #1232. Thanks to Greg Troxel.
6 years ago
Roger A. Light f6289e2443 Document bundled dependencies and how to disable.
Closes #1231. Thanks to Greg Troxel.
6 years ago
Roger A. Light b3ba0a7901 Add `make check` and document testing procedure.
Also support test target in cmake.
6 years ago
Roger A. Light d413801c26 Fix rr description. 6 years ago
Roger A. Light ee20d7c634 Order options in example mosquitto.conf. 6 years ago
Roger A. Light 793cb9f649 Document `memory_limit` option. 6 years ago
Roger A. Light a4b5ea05e3 Remove incorrect and unused memory limiting code. 6 years ago
Roger A. Light a50e13a131 Website update
New eclipse logo
Stickers no longer available due to Moo API going.
Fix manpage generation.
Add rr manpage
Update version support on index.
6 years ago
Roger A. Light f22a137938 Fix compilation on musl C systems due to missing sys/time.h header.
Thanks to maxice8.
6 years ago
Ken Restivo 2a1cbaf34a Fix comment 6 years ago
Roger Light 4558f036d2 Merge remote-tracking branch 'origin/master' into debian 6 years ago
Roger A. Light 84cea3005d Bump packaging to 1.6.4. 6 years ago
Roger A. Light c118fb64a0 Add --retry 30 to mosquitto.init 7 years ago
Roger A. Light 2eeb01ce8c Update Debian official packaging for 1.5.8. 7 years ago
Roger A. Light 2c954b8f03 Merge tag 'v1.5.8' into debian 7 years ago
Roger A. Light 46c673664f Update Debian official packaging for 1.5.7. 7 years ago
Roger A. Light 580fb8bd63 Merge tag 'v1.5.7'
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	config.mk
	installer/mosquitto.nsi
	installer/mosquitto64.nsi
	lib/mosquitto.h
	set-version.sh
	snap/snapcraft.yaml
	src/persist.c
7 years ago
Roger A. Light a8c0e5a255 Update Debian official packaging for 1.5.6. 7 years ago
Roger A. Light b5b9f0f6b6 Merge tag 'v1.5.6' into debian 7 years ago
Roger A. Light 570a373134 Merge branch 'fixes' 7 years ago
Roger A. Light 240e87c823 Update CVE details and bump version number. 7 years ago
Roger A. Light dd1246f2f6 Fix some unused variable warnings. 7 years ago
Roger A. Light 51159ff19e Fix cmake client build with TLS. 7 years ago
Roger A. Light afbeff3369 Fix socks build when using cmake. 7 years ago
Roger A. Light 50011b1842 Log message for disconnecting a client with invalid UTF-8 topic.
Closes #1144. Thanks to Kris Mattheus.
7 years ago
Roger A. Light d81b7e2b84 Fixed durable clients being unable to receive messages when offline.
This occurred when per_listener_settings was set to true.

Closes #1081. Thanks to dwin-wangjt.
7 years ago
Roger A. Light 9751cccf0d Windows: Fix possible crash when client disconnects.
Closes #1137. Thanks to Kris Mattheus.
7 years ago
Roger A. Light 0beeee189e Fix Will not being sent for Websockets clients.
Closes #1143. Thanks to salcedo.
7 years ago
Roger A. Light 927c2aafe8 Allow broker to always restart on Windows when using `log_dest file`.
Closes #1080. Thanks to lcouz.
7 years ago
Roger A. Light 5df00f66b4 Fix spaces not being allowed in the bridge remote_username option.
Closes #1131. Thanks to beville.
7 years ago
Roger A. Light 3854993d33 Man page can now be built on any system.
Closes #1139. Huge thanks to Chris Mayo.
7 years ago
Roger A. Light 276c1a62e0 Improve documentation of use_identity_as_username.
Closes #1134. Thanks to Adrian P.
7 years ago
Roger Light cbd5306aec Fix and tests for CVE-2018-12546. 7 years ago
Roger A. Light 5820b9e4e7 Fix and tests for security bug #541870. 7 years ago
Roger A. Light 3559b66ade Fix and tests for security bug #543401. 7 years ago
Steven Lawrance cecf8f838f Include sys/socket.h for AF_INET definition
Without this, mosquitto doesn't build on FreeBSD with websockets enabled

Signed-off-by: Steven Lawrance <stl@koffein.net>
7 years ago
Roger Light 9dd8d1e054 Handle mismatched handshakes properly.
For example, a QoS1 PUBLISH with QoS2 reply.
7 years ago
Roger A. Light d085216d71 Make table more consistent with preceding documentation. 7 years ago
Roger A. Light 18a37ce4bc Improve bridge remapping documentation. 7 years ago
Roger A. Light 01cc4dd696 Update changelog for previous PR.
Thanks to Matthias Stone.
7 years ago
Matthias Stone 4ddf00dec3 Don't clear SSL context when TLS connection is closed.
Previous behaviour would clear the external SSL_CTX provided by
MOSQ_OPT_SSL_CTX. This required the user to reset the SSL_CTX every
disconnect, and trust that they were not leaking references.

Recreating the SSL context for every connection is not necessary, and the
SSL context is freed in mosquitto_destroy, which is sufficient.

Signed-off-by: Matthias Stone <matthias@bellstone.ca>
7 years ago
Roger A. Light f49aeffd8c Fix TLS connections not working over SOCKS.
Thanks to Mark Oeltjenbruns.
7 years ago
Roger A. Light b2e63f49f7 Update changelog 7 years ago
Vinod Kumar 80d77983d3 ignore inline comments while parsing optional config params
Signed-off-by: Vinod Kumar <kumar003vinod@gmail.com>
7 years ago
Roger A. Light e7e69eadb7 Fix compilation when openssl deprecated APIs are not available.
Closes #1094. Thanks to Rosen Penev.
7 years ago
Roger A. Light 8fce26134b Fix comparison of boolean values in CMake build.
Closes #1101. Thanks to Mojca Miklavec and Andrew L. Moore.
7 years ago
Roger A. Light ddb64c15f3 Merge branch 'master' into fixes 7 years ago
Maksym Ruchko 75bbc31130 Fixed threaded enum lost in merges
Change was part of the original commit e8185ddaa7
"[166] Don't cancel external threads."
and then lost during code reorganizing and subsequent merge,
commits 970ba58da6 81cb7ab547

Signed-off-by: Maksym Ruchko <mruchko@advantech-bb.com>
7 years ago
Roger A. Light 6ccc7f1e35 Update for 1.5.5. 7 years ago
Roger A. Light d36e47a8a6 Merge branch 'master' into debian 7 years ago
Roger A. Light 9a2219af97 Add pkg-config dep and attribute patch. 7 years ago
Roger A. Light 04f8ee7660 Fix missing "shell". 7 years ago
Roger A. Light 54b685ef66 Fix #877346. 7 years ago
Roger A. Light 06695cf21c Merge branch 'master' into debian 7 years ago
Roger A. Light 735c965333 Fix #914593 7 years ago
Roger A. Light 73228b160e Fix #914525. 7 years ago
Roger A. Light dd7da0203b Add mosquitto.init back in advice of DD. 7 years ago
Roger A. Light 5243bb5830 Add upstream/metadata. 7 years ago
Roger A. Light 4550623a0a Minor lintian fixes. 7 years ago
Roger A. Light 18c69bbc75 Bump dh compat to 11. 7 years ago
Roger A. Light a68ddfc935 Extensive debian package update to 1.5.4. 7 years ago
Roger A. Light 54322a3df5 Bump version number, add CVE details. 7 years ago
Roger A. Light 84a356e25e Fix Windows version not starting if include_dir did not contain any files.
Closes #566.

Thanks to marleau.
7 years ago
Roger A. Light 23e336290f Add allow_zero_length_clientid, auto_id_prefix documentation.
Closes #600.
7 years ago
Roger A. Light 443d34a973 Fix incorrect hash usage with duplicate clients.
Fix duplicate clients being added to by_id hash before the old client
was removed.

Closes #645.
7 years ago
Roger A. Light c978fd50fe Minor documentation fix. Closes #520. 7 years ago
Roger A. Light 0e95612fe5 Fix retained msgs not sent by bridges.
This occurred when a bridge connected for the first time and so made a
local subscription for outgoing topics.

Closes #701.
7 years ago
Roger A. Light 016fcc2372 Add test for $test publishing bug. 7 years ago
Roger A. Light c0196547ae Various build improvements to help packaging. 7 years ago
Roger A. Light 7900c2c353 Revert "Remove some test that was always true"
This reverts commit 6fc7cadb63.
7 years ago
Roger A. Light 11c79db249 Better attempt at fixing mac travis. 7 years ago
Roger A. Light 26bbcf5586 Attempt to fix Mac build on travis. 7 years ago
Kurt Van Dijck eebd22a83c fix signal handler on win32
The signal handler thread on win32 did listen to 4 HANDLEs,
of which only 3 were initialized.
The result was 1 thread eating 100% cpu.
This commit reduces the HANDLE array storage.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
7 years ago
Roger A. Light 41c93565d5 Remove requirement to use `user root` in snap package config files. 7 years ago
Roger A. Light fee71d6df1 Elevate log level to warning for situation when socket limit is hit. 7 years ago
Roger A. Light c5b675fa63 Fix build on Windows. 7 years ago
Roger A. Light 36c4cecd48 Add fixed CVE information. 7 years ago
Roger A. Light e649d93191 Add missing posts. 7 years ago
Roger A. Light 20efb33267 Download page update. 7 years ago
Roger A. Light 404394fda7 Update website config. 7 years ago
Roger A. Light b5b25220c8 Add website. 7 years ago
Roger A. Light 1eff425949 Snap build fix.
https://forum.snapcraft.io/t/errors-when-building-via-launchpad/7448
7 years ago
Roger A. Light 41d9105397 Bump version number. 7 years ago
Roger A. Light 4fdcbad93f Fix segfault on HUP when bridges and security options are configured.
Closes #849. Closes #965. Thanks to Wolfgand Hottgenroth and Dustin Sallings.
7 years ago
Roger A. Light 906cca4f21 Fix "round_robin false" behaviour.
Closes #481.
7 years ago
Roger A. Light 921171286d Close spare sock at exit. 7 years ago
Roger A. Light b98fe5e28e Fix for bridge connections when using WITH_ADNS=yes. 7 years ago
Roger A. Light ff04f66423 Add link to tls asciicast.
Closes #968.
7 years ago
Michael Heimpold 7d4c2a0ff3 Install pkg-config files also for non-CMake builds
At the moment, pkg-config hint files are only installed when CMake is
used as build system. However, it is very convenient for programs using
libmosquitto to have these files always in place, so let's add it
here, too.

Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
7 years ago
Roger A. Light e88cabc306 Changelog entry for #932. 7 years ago
Fredrik Fornwall 46b824139f Fix build with OPENSSL_NO_ENGINE
Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
7 years ago
Roger A. Light e331c8a725 Update changelog and fixes to #927 PR. 7 years ago
yzhivik 434f34911e fix SOCKS5 username and password set
fix SOCKS5 request wrt IP4/IP6/FQDN

Signed-off-by: yzhivik <yuriy.zhyvytsya@gmail.com>
7 years ago
Roger A. Light 5610dd7af4 Better implementation of #948. 7 years ago
Roger A. Light 24bd31f2a0 Fix excessive CPU usage when the number of sockets exceeds the system limit.
Closes #948. Thanks to wiebeytec.
7 years ago
Roger A. Light b81b2287d7 Update expired test certs. 7 years ago
Roger A. Light 1605a4f294 Make it easier to build without bundled uthash.h.
Use "make WITH_BUNDLED_DEPS=no".
7 years ago
Roger A. Light ebdfe0e6f5 Fix incorrect call to setsockopt() for TCP_NODELAY.
Closes #941. Thanks to rfalke.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 135ff1dd2e Fix build when using WITH_ADNS=yes. 7 years ago
Roger A. Light be8b3b0fae Enable ADNS for the snap. 7 years ago
Roger A. Light b5832eb6b8 Add missing test. 7 years ago
Roger A. Light a6c52cf5af Add websockets support to snap. 7 years ago
Roger A. Light afbb0f6691 Bump version number.
Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 63bfcb224e Fix accessor functions for username and client id when used in plugin auth check. 7 years ago
Roger A. Light becbff406b Include snapcraft.yaml in snap. 7 years ago
Roger A. Light 5e365a2597 Documentation fixes. 7 years ago
Roger A. Light 63f98f3c55 Fix for building on Windows with static lws. 7 years ago
Roger A. Light 92d360e8a4 Installer and readme updates. 7 years ago
Roger A. Light 6fade4bc3d Revert incorrect change. 7 years ago
Roger A. Light fd19a6f0f0 Add support for compiling with static libwebsockets library. 7 years ago
Roger A. Light 0caae2a6ea Build fix for Windows. 7 years ago
Roger A. Light 4ee1dba1f9 Consistent use of config.h across the project. 7 years ago
Roger A. Light 9bbd2f7022 Return error in mosquitto_pub -l if compiled without threading. 7 years ago
Roger A. Light f7e304d9e1 Check for 918 7 years ago
Roger A. Light 2f47f31f29 Don't confuse expiring and duplicate clients. 7 years ago
Roger A. Light e91cb7a79d Fixes for CentOS 7. 7 years ago
Roger A. Light e74a09936d Fixes for building on FreeBSD. 7 years ago
Roger A. Light fd8002c3e3 Fix compiling on Mac OS X <10.12 due to clock_gettime()
Closes #813 and #240.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light f494a74015 Fix default port problem when compiling clients using WITH_TLS=no. 7 years ago
Roger A. Light 3baf63bedd Fix building for libwebsockets < 1.6. 7 years ago
Pierre Fersing e2f3a7f4c6 Remove some test that was always true
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
7 years ago
Roger A. Light f3e1268fc4 Fix minor typo. 7 years ago
Roger A. Light ecb3f4d4b0 Fix possible endian issue when reading the `memory_limit` option.
Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light ff28caae36 No need to calculate topic len twice. 7 years ago
Tatsuzo Osawa 2d759e8bf3 Fix subs memory issue #505
Signed-off-by: Tatsuzo Osawa <tatsuzo.osawa@gmail.com>
7 years ago
Roger A. Light 29513a27ba Fixes for building on NetBSD.
Closes #258.

Thanks to Daniel Ölschlegel.
7 years ago
Roger A. Light 02107c655e Remove incorrect comment. 7 years ago
Roger A. Light ffbdad93b4 Don't reject ACL patterns without %u or %c, just warn.
Using `pattern blah/#` is a legitimate method of getting a global ACL.
We shouldn't be changing behaviour in a fixes release.
7 years ago
Natanael Copa fb802d6b3d Flush stdout when asking for password.
Make sure the prompt is actaually printed by flushing stdout when asking
for passwords.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
7 years ago
Tobias Assarsson a8142c2d7a Add missing parameters to internal mosquitto_acl_check
Signed-off-by: Tobias Assarsson <tobias.assarsson@gmail.com>
7 years ago
Roger A. Light 2f1416089d Add test for issue in #828.
Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Rich Mattes 401d9493d2 Add documentation and networking dep to unit files
Updated the unit file examples to add a dependency on the
network-online.target systemd target to prevent mosquitto from
starting without network connectivity.

Added a documentation line to the unit files pointing to mosquitto
manpages.

Signed-off-by: Rich Mattes <richmattes@gmail.com>
7 years ago
Roger A. Light e64948979d Fix UNSUBACK messages not being logged.
Closes #903.

Thanks to Christoph Krey.
7 years ago
Roger A. Light f530ef93d1 Add test for issue 505. 7 years ago
Roger A. Light c79059b34e Fix `use_identity_as_username true` not working.
Closes #833.

Thanks to David Crook and Brice Waegeneire.

Bug: https://github.com/eclipse/mosquitto/issues/833

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
bricewge aa3503deb3 fix #833
Signed-off-by: Brice Waegeneire <brice.wge@gmail.com>
7 years ago
Roger A. Light 8ddb825f86 Better fix for #851.
Ensure all sockets that are closed are set to INVALID_SOCKET.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 329c031854 Update changelog.
Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 82a6969b74 Add new test to parallel test script.
Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Wolfgang Hottgenroth 73bbc60390 Move check whether context is a bridge in front of check whether a listener
exists for context. New test now passes.

Signed-off-by: Wolfgang Hottgenroth <wolfgang.hottgenroth@icloud.com>
7 years ago
Wolfgang Hottgenroth a509a3d041 Add test which currently fails.
Signed-off-by: Wolfgang Hottgenroth <wolfgang.hottgenroth@icloud.com>
7 years ago
Wolfgang Hottgenroth e8c711b81c Change test scripts according to hints in #507 (replace localhost by 127.0.0.1)
Signed-off-by: Wolfgang Hottgenroth <wolfgang.hottgenroth@icloud.com>
7 years ago
Roger A. Light 20fbed21e3 ACL patterns that do not contain either %c or %u are now rejected.
Closes #209.

Bug: https://github.com/eclipse/mosquitto/issues/209

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 9c53972f40 Fix connection problems when using mosquitto_connect_async().
The connection wouldn't always complete if mosquitto_loop_start() was
called before mosquitto_connect_async(). Closes #848.

Thanks to Ian Gough.

Bug: https://github.com/eclipse/mosquitto/issues/848

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Pierre Fersing f318bd383b Fix missing rename of mosquitto__socket_get_address
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
7 years ago
Roger A. Light 79a8c5a2e0 Fix problem on Pi caused by unsigned char being default.
Found via #849.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 0bd7cf86c6 Fix segfault on startup if bridge CA certificates could not be read.
Closes #851.

Thanks to chelliwell.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light ad40419b18 Fix some places where return codes were incorrect.
Closes #850.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 832e3deb71 All clients now time out if they exceed their keepalive*1.5
This was inconsistent before.

Partially addresses #865.
7 years ago
Roger A. Light 2dd7df6498 Fix IPv6 addresses not being able to be used as bridge addresses.
Closes #886.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light eb106907a6 Remove use of AI_ADDRCONFIG.
Closes #869, #901.

Thanks to Alex Richman.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light db2feac172 Disable queued bytes test pending a fix.
Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 2bb6ad41b9 Use AF_UNSPEC etc. instead of PF_UNSPEC to comply with POSIX.
Closes #863.

Thanks to denigmus and Patrick TJ McPhee.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 31c0dc4832 Simplify broker tests with helper function. 7 years ago
Roger A. Light 0ef81bf9b8 Disable queued bytes test temporarily. 7 years ago
Roger A. Light de4adcd20e Print more OpenSSL errors when loading certificates/keys fail.
Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Dave Miller d2f8db2d4c Fix for issue #874
With special acknowledgement to sxsing (his github login) for his
help in development and testing of this fix.

NOTE: Pull-request is against master as the fixes branch has not
been updated with the v1.5 file src/handle_connect.c

Signed-off-by: Dave Miller <dmiller@tibco.com>
7 years ago
Roger A. Light 24fb566168 Add test for issue #874. 7 years ago
Roger A. Light 9f8e2a1d0a [Broker] Fix auth plugin cleanup function not being called.
Closes #900.

Thanks to Julian Zhao.

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
Roger A. Light 65dfe291e2 Debian package 1.4.15. 7 years ago
Roger A. Light 7648a77806 Update to 1.4.15. 7 years ago
Roger A. Light 033624b4bb Merge branch 'master' into debian 7 years ago
Tifaifai Maupiti da88f47567 CONFIG parameter
Signed-off-by: Tifaifai Maupiti <tifaifai.maupiti@gmail.com>
8 years ago
Roger A. Light dfceaf8bac Add config patch back in to series. 8 years ago
Roger A. Light 6f8c4af6ea Bump standards version 4.1.3. 8 years ago
Roger A. Light 3fa8db2fe0 Remove upstart file. 8 years ago
Roger A. Light 0971f1e034 Fix missing colon. 8 years ago
Roger A. Light 860dba1e38 Document upstream changes that affect debian bugs. 8 years ago
Roger A. Light 18ed7e9884 Fix line too long lintian warning. 8 years ago
Roger A. Light 1f20e06fea Fix lintian error for build-dep on dh-systemd. 8 years ago
Roger A. Light ae2ccfce48 Update for 1.4.14. 8 years ago
Roger A. Light d3bcb355f6 Merge branch 'master' into debian 8 years ago
Roger A. Light eab93e7d3d Update to 1.4.12 8 years ago
Roger A. Light a0916bdd67 Merge branch 'master' into debian 8 years ago
Roger A. Light 4356a59ee6 Update Vcs-* links in debian/control. 9 years ago
Roger A. Light 92a1a8e13e Bump standards version and dh compat level. 9 years ago
Roger A. Light f9ba091e84 Update for v1.4.10. 9 years ago
Roger A. Light 739290bc63 Version 1.4.10.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCgAGBQJXs40KAAoJEJhyuOTvgfyHqYIQAKcIP+N9NbC5u5PFDxtugqhL
 kd/sN9Nj9Sz3+vdQQcQ+jDUH7ysrERNSHyOEb7O9TOpG5lUJij+AlFAWcWHd1Rko
 m13Zf66IChf6OhF15MdbX/f4ZNsqJGaVleSYcC/adYAnUOQIynFTCJeXIGHxTfbh
 4tId1/QvmNzld+5gKPdM7BhT4O1U0am33wqXIvqXye1lydN0cAN2b/wkb1A2/kLz
 unjTFxdSyp+KzzW0FruTjLdQjmJt1rCmDiRuqTVyzCjYRLQTTAI42fG41faG7YT4
 7oyk4fsDywohJQjXKZVOV/+q5A02sUFWIEYhe/yNa0LIhx89poGmQCoTJ9/LiWLl
 dnDgsxj4K0GUP9Ci/shrkjmnDZ1AG7mPY9DhcF1ttlvsLF31p2EjpyvmJL3n945p
 yXm/PCf/QvY5WnDEdVCNn0ZxXoBVxvCgQnzbp6ITOX8OmKsA8RX6vpPrM4fHLhvE
 fSklC73boiRuKDWmDu/xSWpMigcuOnMbGzCZzs5uR7ZTRbZOdB3jhc9QEp7ujQ42
 Jz3iQ34Addu58E/rM7TFQuyw/ziyc1pG+nHtntjXCjw+iYtfVz0ikvjERG2XQ4Ay
 fT+jIuOoupMNlrOkqxs3ff4x1vEIiKytj2lG1x22uONs+OLn4xzoeB+tVTx/8Qam
 jaGrTKHXhymRH58RCyd4
 =yQbu
 -----END PGP SIGNATURE-----

Merge tag 'v1.4.10' into debian

Version 1.4.10.
9 years ago
Roger A. Light 7d2a301e26 Branch for debian packaging. 10 years ago

@ -0,0 +1 @@
Place your SSL/TLS Certificate Authority certificates in this directory.

@ -0,0 +1,3 @@
Place your SSL/TLS server keys and certificates in this directory.
This directory should only be readable by the mosquitto user.

@ -0,0 +1,2 @@
Any files placed in this directory that have a .conf ending will be loaded as
config files by the broker. Use this to make your local config.

@ -0,0 +1,7 @@
Apparmor Profile
----------------
If your system uses AppArmor, please note that the shipped enforcing profile
works with the default installation, and changes in your configuration may
require changes to the installed apparmor profile. Please see
https://wiki.ubuntu.com/DebuggingApparmor before filing a bug against this
software.

459
debian/changelog vendored

@ -0,0 +1,459 @@
mosquitto (2.0.8-2) unstable; urgency=medium
* Remove debian-config.patch, this is already handled with
debian/mosquitto.conf
* Per policy, packages shouldn't contain directories in /run. This means
/run/mosquitto should be created at boot time. Closes #983429.
-- Roger A. Light <roger@atchoo.org> Sun, 28 Feb 2021 23:22:57 +0000
mosquitto (2.0.8-1) unstable; urgency=medium
* New upstream release.
-- Roger A. Light <roger@atchoo.org> Thu, 25 Feb 2021 18:56:57 +0000
mosquitto (2.0.7-3) unstable; urgency=medium
* Change all paths `/var/run` to `/run` to avoid installing through a
symlink.
-- Roger A. Light <roger@atchoo.org> Tue, 09 Feb 2021 09:31:09 +0000
mosquitto (2.0.7-2) unstable; urgency=medium
* Add new xsltproc and docbook-xsl dependencies needed to build manpages.
-- Gianfranco Costamagna <locutusofborg@debian.org> Mon, 08 Feb 2021 21:55:11 +0100
mosquitto (2.0.7-1) unstable; urgency=medium
* New upstream release.
* License has changed from EPL-1.0 OR EDL-1.0 to EPL-2.0 OR EDL-1.0.
* New dependency, libcjson
* Remove install-protocol.patch, this has been fixed upstreamed.
* pid file moved to /var/run/mosquitto/mosquitto.pid because mosquitto is no
longer root when it tries to create that file.
-- Roger A. Light <roger@atchoo.org> Thu, 4 Feb 2021 23:27:31 +0000
mosquitto (1.6.12-1) unstable; urgency=medium
* New upstream release.
-- Roger A. Light <roger@atchoo.org> Wed, 19 Aug 2020 15:24:26 +0100
mosquitto (1.6.11-1) unstable; urgency=medium
* New upstream release.
-- Roger A. Light <roger@atchoo.org> Tue, 11 Aug 2020 16:53:20 +0100
mosquitto (1.6.9-1) unstable; urgency=medium
* New upstream release.
* Revert change enabling SRV functionality, it is disabled by default
upstream and of little benefit to any end user, but adds reasonable
complexity to the code.
* Remove patches 1568, 1569, 1570 - applied upstream.
-- Roger A. Light <roger@atchoo.org> Tue, 03 Mar 2020 15:16:15 +0000
mosquitto (1.6.8-2) unstable; urgency=medium
* Also install mqtt_protocol.h in libmosquitto-dev package.
(Closes: #951116)
-- Gianfranco Costamagna <locutusofborg@debian.org> Sat, 15 Feb 2020 19:51:49 +0100
mosquitto (1.6.8-1) unstable; urgency=medium
* Upload to unstable
-- Gianfranco Costamagna <locutusofborg@debian.org> Sat, 08 Feb 2020 09:35:50 +0100
mosquitto (1.6.8-1~exp3) experimental; urgency=medium
* Tweak patch 1570 to fix a build failure with non-libc libraries
-- Gianfranco Costamagna <locutusofborg@debian.org> Sat, 25 Jan 2020 10:47:39 +0100
mosquitto (1.6.8-1~exp2) experimental; urgency=medium
* Add libcares-dev dependency, to enable SRV functionality
* Bump std-version to 4.5.0, no changes required
* Simplify rules file, avoding the systemd hack in configure script
* Rename patches with the upstream PR number on github.
-- Gianfranco Costamagna <locutusofborg@debian.org> Fri, 24 Jan 2020 14:19:46 +0100
mosquitto (1.6.8-1~exp1) experimental; urgency=medium
* New upstream version 1.6.8 (Closes: #949585)
* Also install examples into etc directory
* Install missing mosquitto_broker.h header file
* Add mosquitto_rr to tools
* Install manpages into debian/*.manpages files
* Fix installation of libraries in case soname is added to the so file
* Bump std-version to 4.4.1, no changes required
* Require uthash at least 2.1.0, previously the embedded version was used during build process
* Bump compat level to 12
* Switch build system to cmake
* Do not override dh_auto_test anymore
-- Gianfranco Costamagna <locutusofborg@debian.org> Wed, 22 Jan 2020 12:23:22 +0100
mosquitto (1.6.7-1) unstable; urgency=medium
* New upstream release.
-- Roger A. Light <roger@atchoo.org> Wed, 25 Sep 2019 13:31:51 +0100
mosquitto (1.6.6-1) unstable; urgency=high
* SECURITY UPDATE: If an MQTT v5 client connects to Mosquitto, sets a last
will and testament, sets a will delay interval, sets a session expiry
interval, and the will delay interval is set longer than the session
expiry interval, then a use after free error occurs, which has the
potential to cause a crash in some situations.
- CVE awaiting assignment
* SECURITY UPDATE: If a malicious MQTT client sends a SUBSCRIBE packet
containing a topic that consists of approximately 65400 or more '/'
characters, i.e. the topic hierarchy separator, then a stack overflow will
occur.
- CVE awaiting assignment
* New upstream release.
* Remove bug-1367.patch.
* Don't use killall in mosquitto.logrotate. Closes: #940229.
-- Roger A. Light <roger@atchoo.org> Tue, 17 Sep 2019 18:41:36 +0100
mosquitto (1.6.4-1) unstable; urgency=medium
* New upstream release.
* Bump standards version to 4.4.0, no changes needed.
* bug-1367.patch: fix bug with v5 DISCONNECT packets with remaining_length =
2 being treated as a protocol error. Fixed upstream for 1.6.5 or 1.7.
* Added override_dh_makeshlibs for catching symbol errors.
* Add --retry to init file as per
https://github.com/eclipse/mosquitto/issues/1117
-- Roger A. Light <roger@atchoo.org> Thu, 01 Aug 2019 22:51:08 +0100
mosquitto (1.5.7-1) unstable; urgency=medium
* New upstream release.
* Remove fix-step3.patch, fixed upstream.
* bug-1162.patch: fix bug with clients being disconnected in some situations
when ACLs are in use.
-- Roger A. Light <roger@atchoo.org> Mon, 18 Feb 2019 09:28:40 +0000
mosquitto (1.5.6-1) unstable; urgency=medium
* SECURITY UPDATE: If Mosquitto is configured to use a password file for
authentication, any malformed data in the password file will be treated as
valid. This typically means that the malformed data becomes a username and
no password. If this occurs, clients can circumvent authentication and get
access to the broker by using the malformed username. In particular, a blank
line will be treated as a valid empty username. Other security measures are
unaffected. Users who have only used the mosquitto_passwd utility to create
and modify their password files are unaffected by this vulnerability.
- debian/patches/mosquitto-1.4.x-cve-2018-12551.patch: this fix introduces
more stringent parsing tests on the password file data.
- CVE-2018-12551
* SECURITY UPDATE: If an ACL file is empty, or has only blank lines or
comments, then mosquitto treats the ACL file as not being defined, which
means that no topic access is denied. Although denying access to all
topics is not a useful configuration, this behaviour is unexpected and
could lead to access being incorrectly granted in some circumstances.
- debian/patches/mosquitto-1.4.x-cve-2018-12550.patch: this fix ensures
that if an ACL file is defined but no rules are defined, then access will
be denied.
- CVE-2018-12550
* SECURITY UPDATE: If a client publishes a retained message to a topic that
they have access to, and then their access to that topic is revoked, the
retained message will still be delivered to future subscribers. This
behaviour may be undesirable in some applications, so a configuration
option `check_retain_source` has been introduced to enforce checking of
the retained message source on publish.
- debian/patches/mosquitto-1.4.8-cve-2018-12546.patch: this patch stores
the originator of the retained message, so security checking can be
carried out before re-publishing. The complexity of the patch is due to
the need to save this information across broker restarts.
- CVE-2018-12546
* New upstream release.
* Bump standards version to 4.3.0, no changes needed.
* fix-step3.patch: fix compilation error.
-- Roger A. Light <roger@atchoo.org> Thu, 07 Feb 2019 16:00:52 +0000
mosquitto (1.5.5-1.1) unstable; urgency=medium
* Non-maintainer upload.
* Only chown mosquitto.log if it exists. (Closes: #916558)
-- Andreas Henriksson <andreas@fatal.se> Sat, 22 Dec 2018 16:54:06 +0100
mosquitto (1.5.5-1) unstable; urgency=medium
* SECURITY UPDATE: If the option `per_listener_settings` was set to true,
and the default listener was in use, and the default listener specified an
`acl_file`, then the acl file was being ignored. This affects version 1.5
to 1.5.4 inclusive.
* New upstream release.
-- Roger A. Light <roger@atchoo.org> Tue, 11 Dec 2018 16:37:32 +0000
mosquitto (1.5.4-2) unstable; urgency=medium
* debian/patches/914525.patch : Use pkg-config to get systemd libs
(Closes: #914525)
- This is needed to allow compilation on non-Linux systems.
* Fix FTCBFS: Let dh_auto_build pass cross tools to make. Thanks to Helmut
Grohne. (Closes: #914593)
* Ensure log files are owned by mosquitto. (Closes: #877346)
-- Roger A. Light <roger@atchoo.org> Sun, 25 Nov 2018 13:52:16 +0000
mosquitto (1.5.4-1) unstable; urgency=medium
* New upstream release (Closes: #911104).
- Fixes CVE-2017-7654 (Closes: #911265)
- Fixes CVE-2017-7653 (Closes: #911266)
* Remove no longer needed patches. Some are integrated into upstream, others
have been replaced with changes in rules.
- async_dns.patch
- build-timestamp.patch
- disable-in-tree-uthash.patch
- enable-libwrap.patch
- enable-websockets.patch
- fix-prefix.patch
- hurd-errno.patch
- libdir.patch
- nostrip.patch
* Copyright fix - src/uthash.h -> src/deps/uthash.h
* Update symbols files with new additions.
* Remove debian/mosquitto.prerm
- Calls to invoke-rc.d to stop mosquitto will be inserted automagically by
debhelper.
* Stop removing the mosquitto user in postrm.
- This is not safe since there might still be logs (and other files?)
around owned by the uid, so we don't want it reused for a new user.
* Add build dependency on libsystemd-dev.
* Enable systemd build support.
* Ship the mosquitto.service file (with sd-notify support)
* Drop -dbg packages and do -dbgsym migration.
* libmosquito{,pp}-dev: ship libmosquitto{,pp}.pc respectively.
* Remove unused build dependency on python-all. (Closes: #901424).
* Bump standards version to 4.2.1, no changes needed.
* Bumped dh compat level to 11.
* Add upstream/metadata.
-- Roger A. Light <roger@atchoo.org> Thu, 08 Nov 2018 13:34:59 +0000
mosquitto (1.4.15-2) unstable; urgency=low
* Replace mentions of 'c_rehash' with 'openssl rehash'. (Closes: #895084).
-- Roger A. Light <roger@atchoo.org> Sat, 07 Apr 2018 11:16:43 +0100
mosquitto (1.4.15-1) unstable; urgency=high
* SECURITY UPDATE: If a SIGHUP is sent to the broker when there are no more
file descriptors, then opening the configuration file will fail and
security settings will be set back to their default values.
- debian/patches/mosquitto-1.4.10_cve-2017-7652.patch: When reloading
configuration, do this into a separate config struct. If nothing fails,
then copy the new config over the old config.
- CVE-2017-7652
* SECURITY UPDATE: Unauthenticated clients can cause excessive memory usage.
This has the potential to lead to an OOM situation and the broker being
killed by the system.
- debian/patches/mosquitto-1.4.10_cve-2017-7652.patch: Limit the maximum
size of CONNECT packet to a reasonable value, and add "memory_limit"
option to set the maximum memory the broker will use.
- CVE-2017-7651
* New upstream release.
* Remove upstart support, which had accidently been reinstated in 1.4.14-2.
* Bumped standards version to 4.1.3, no changes required.
* Fix global-files-wildcard-not-first-paragraph-in-dep5-copyright.
-- Roger A. Light <roger@atchoo.org> Wed, 28 Feb 2018 11:29:47 +0000
mosquitto (1.4.14-2) unstable; urgency=low
* Fix lintian error "build-depends-on-obsolete-package"
* Fix lintian warning "extended-description-line-too-long"
* The 1.4.14 release relaxes the restrictions on client ids, which means
that the mosquitto_pub/sub autogenerated ids are no longer a problem.
(closes: #870165).
-- Roger A. Light <roger@atchoo.org> Tue, 26 Dec 2017 22:03:57 +0000
mosquitto (1.4.14-1) unstable; urgency=medium
* SECURITY UPDATE: Persistence file is world readable, which may expose
sensitive data. Fixed by upstream release 1.4.13.
- CVE-2017-9868
* New upstream release.
* Remove upstart support.
* Bumped standards version to 4.1.2.
- Removed invoke-rc.d conditionals.
- Changed "extra" priorities to "optional".
* Build-Depends: Add dh-systemd, bump libwebsockets to >=2.0.
* no-man-clean.patch - don't clean man pages from source directory.
* async_dns.patch - enable bridge async DNS lookups.
-- Roger A. Light <roger@atchoo.org> Fri, 22 Dec 2017 07:14:19 +0000
mosquitto (1.4.12-1) experimental; urgency=low
* New upstream release.
-- Roger A. Light <roger@atchoo.org> Mon, 29 May 2017 14:56:32 +0100
mosquitto (1.4.10-3) unstable; urgency=high
* SECURITY UPDATE: Pattern ACL can be bypassed by using a username/client id
set to '+' or '#'.
- debian/patches/mosquitto-0.15_cve-2017-7650.patch: Reject send/receive
of messages to/from clients with a '+', '#' or '/' in their
username/client id.
- CVE-2017-7650
* New patch debian/patches/allow_ipv6_bridges.patch allows bridges to make
IPv6 connections when using TLS (closes: #857759).
-- Roger A. Light <roger@atchoo.org> Mon, 29 May 2017 13:43:29 +0100
mosquitto (1.4.10-2) unstable; urgency=medium
* Bumped standards version to 3.9.8. No changes needed.
* Bumped dh compat level to 10.
* Vcs-* links updated.
-- Roger A. Light <roger@atchoo.org> Thu, 03 Nov 2016 22:37:33 +0000
mosquitto (1.4.10-1) unstable; urgency=low
* New upstream release.
* Add support for openssl 1.1.0 (closes: #828442)
* Fix FTBFS on Hurd (closes: #824571)
-- Roger A. Light <roger@atchoo.org> Thu, 27 Oct 2016 14:01:40 +0100
mosquitto (1.4.8-1) unstable; urgency=high
* New upstream release.
* apparmor is now "suggests" instead of "depends".
-- Roger A. Light <roger@atchoo.org> Sun, 14 Feb 2016 15:06:55 +0000
mosquitto (1.4.7-1) unstable; urgency=low
* New upstream release. Includes support for libwebsockets 1.6.
* Add dependency link between libmosquittopp-dev and libmosquitto-dev
(closes: #805506).
* Dropped misc:Pre-Depends line for libmosquitto1. See #783898.
* libc-ares2 Depends is handled by shlib:Depends for libmosquitto1.
-- Roger A. Light <roger@atchoo.org> Mon, 21 Dec 2015 10:59:31 +0000
mosquitto (1.4.4-1) unstable; urgency=low
* New upstream release.
* Fix Vcs link.
* Note that libs & clients also support MQTT v3.1.1.
-- Roger A. Light <roger@atchoo.org> Mon, 21 Sep 2015 09:56:28 +0100
mosquitto (1.4.3-1) unstable; urgency=low
* New upstream release.
* New binary package mosquitto-dev.
* python3-mosquitto and python-mosquitto packages removed because the python
module is no longer part of upstream.
* Remove unused patches (pynomake.patch and disable-bad-test.patch)
* Added dependency on libwebsockets3, uuid. Note that the source package
will build (and actually prefers) using libwebsockets4 when it becomes
available. This adds the patch enable-websockets.patch.
* Upstream license has changed from BSD-3 to EPL-1.0 or EDL-1.0.
* Fix log directory permissions.
* Port to multiarch (closes: #763385) - adds libdir.patch
* Symbols update
* Patch refresh
* Add build-timestamp.patch to create reproducable builds.
* Add support for apparmor.
-- Roger A. Light <roger@atchoo.org> Wed, 19 Aug 2015 10:31:10 +0100
mosquitto (1.3.4-2) unstable; urgency=low
* Disable bad "fake ca" test.
-- Roger A. Light <roger@atchoo.org> Sat, 16 Aug 2014 10:52:12 +0100
mosquitto (1.3.4-1) unstable; urgency=medium
* New upstream release: http://mosquitto.org/2014/08/version-1-3-4-released/
(closes: #725014, #754787)
* Add dependency on libuuid, c-ares.
* Bumped standards version to 3.9.5. No changes needed.
* Example config files are now installed to
/usr/share/doc/mosquitto/examples/
* debian/copyright year updated.
* compiling.txt is no longer distributed.
* Updated debian/copyright with new dates.
-- Roger A. Light <roger@atchoo.org> Wed, 06 Aug 2014 00:43:39 +0100
mosquitto (1.2.1-1) unstable; urgency=low
* New upstream release: http://mosquitto.org/2013/09/version-1-2-1-released/
* Add Replaces/Break for libmosquitto-dev and libmosquittopp-dev
(closes: #720637, #720638).
-- Roger A. Light <roger@atchoo.org> Wed, 18 Sep 2013 21:36:01 +0100
mosquitto (1.2-1) unstable; urgency=low
* New upstream release: http://mosquitto.org/2013/08/version-1-2-released/
(closes: #685119).
* Bumped standards release to 3.9.4. No changes needed.
* Added mosquitto-dbg package for binary debug information.
* Added python3-mosquitto binary package.
* Use dh_python2 (and dh_python3) instead of python-support.
* mosquitto now logs to /var/log/mosquitto/ using logrotate.
* mosquitto local config should now be placed in /etc/mosquitto/conf.d/
-- Roger A. Light <roger@atchoo.org> Wed, 07 Aug 2013 23:26:19 +0100
mosquitto (0.15-1) unstable; urgency=low
* New upstream release: http://mosquitto.org/2012/02/version-0-15-released/
* Updated debian/copyright to latest DEP-5.
* Removed now unnecessary man-hyphen-minus.patch.
-- Roger A. Light <roger@atchoo.org> Sun, 05 Feb 2012 09:30:22 +0000
mosquitto (0.12-1) unstable; urgency=low
* New upstream release: http://mosquitto.org/2011/07/version-0-12-released/
-- Roger A. Light <roger@atchoo.org> Mon, 25 Jul 2011 22:24:52 +0100
mosquitto (0.11.3-1) unstable; urgency=low
* New upstream release: http://mosquitto.org/2011/07/version-0-11-3-released/
* Fix init script start action to create pidfile so stop works correctly.
(thanks to Mark Hindess, closes: #632589)
* Fix section for client libraries in debian/control.
* Remove disable-cmake.patch, this is handled in debian/rules now.
-- Roger A. Light <roger@atchoo.org> Wed, 6 July 2011 15:07:04 +0100
mosquitto (0.10-1) unstable; urgency=low
* Initial release. (Closes: #605319)
-- Roger A. Light <roger@atchoo.org> Sun, 1 May 2011 20:12:51 +0100

130
debian/control vendored

@ -0,0 +1,130 @@
Source: mosquitto
Section: net
Priority: optional
Maintainer: Roger A. Light <roger@atchoo.org>
Build-Depends: debhelper-compat (= 12),
cmake,
libcjson-dev,
libdlt-dev,
libssl-dev (>=1.0.0),
libsystemd-dev,
libwebsockets-dev,
libwrap0-dev,
pkg-config,
uthash-dev (>=2.1.0),
xsltproc,
docbook-xsl
Standards-Version: 4.5.0
Homepage: https://mosquitto.org/
Vcs-Git: https://github.com/eclipse/mosquitto
Vcs-Browser: https://github.com/eclipse/mosquitto/tree/debian
Package: mosquitto
Architecture: any
Multi-Arch: foreign
Depends: adduser (>= 3.10),
libcjson1,
libmosquitto1 (= ${binary:Version}),
lsb-base (>=4.1+Debian3),
${misc:Depends},
${shlibs:Depends}
Suggests: apparmor
Description: MQTT version 5.0/3.1.1/3.1 compatible message broker
This is a message broker that supports version 3.1 and 3.1.1 of the MQTT
protocol.
.
MQTT provides a method of carrying out messaging using a publish/subscribe
model. It is lightweight, both in terms of bandwidth usage and ease of
implementation. This makes it particularly useful at the edge of the network
where a sensor or other simple device may be implemented using an arduino for
example.
Package: mosquitto-dev
Section: devel
Architecture: all
Multi-Arch: foreign
Depends: mosquitto (<< ${source:Version}.1~),
mosquitto (>= ${source:Version}),
${misc:Depends}
Description: Development files for Mosquitto
Mosquitto is a message broker that supports the MQTT protocol.
.
This package contains the include files used if you wish to compile a package
which requires Mosquitto's source file headers.
Package: libmosquitto1
Section: libs
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: MQTT version 5.0/3.1.1/3.1 client library
This is a C library for implementing MQTT version 5.0/3.1.1/3.1 clients.
.
MQTT provides a method of carrying out messaging using a publish/subscribe
model. It is lightweight, both in terms of bandwidth usage and ease of
implementation. This makes it particularly useful at the edge of the network
where a sensor or other simple device may be implemented using an arduino for
example.
Package: libmosquitto-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libmosquitto1 (<< ${source:Version}.1~),
libmosquitto1 (>= ${source:Version}),
${misc:Depends}
Replaces: libmosquitto0-dev (<< 1.2-1~)
Breaks: libmosquitto0-dev (<< 1.2-1~)
Description: MQTT version 5.0/3.1.1/3.1 client library, development files
This is the header and man page for the libmosquitto1 C library, which is a
library for implementing MQTT version 5.0/3.1.1/3.1 clients. This package is
needed to do development with libmosquitto1.
Package: libmosquittopp1
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: libmosquitto1 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Description: MQTT version 5.0/3.1.1/3.1 client C++ library
This is a C++ library for implementing MQTT version 5.0/3.1.1/3.1 clients.
.
MQTT provides a method of carrying out messaging using a publish/subscribe
model. It is lightweight, both in terms of bandwidth usage and ease of
implementation. This makes it particularly useful at the edge of the network
where a sensor or other simple device may be implemented using an arduino for
example.
Package: libmosquittopp-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libmosquittopp1 (<< ${source:Version}.1~),
libmosquittopp1 (>= ${source:Version}),
libmosquitto-dev,
${misc:Depends}
Replaces: libmosquittopp0-dev (<< 1.2-1~)
Breaks: libmosquittopp0-dev (<< 1.2-1~)
Description: MQTT version 3.1 client C++ library, development files
This is the header and man page for the libmosquittopp1 C++ library, which is
a library for implementing MQTT version 3.1 clients. This package is needed to
do development with libmosquittopp1.
Package: mosquitto-clients
Architecture: any
Multi-Arch: foreign
Depends: libmosquitto1 (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Description: Mosquitto command line MQTT clients
This is two MQTT version 5.0/3.1.1/3.1 command line clients. mosquitto_pub can be
used to publish messages to a broker and mosquitto_sub can be used to
subscribe to a topic to receive messages.
.
MQTT provides a method of carrying out messaging using a publish/subscribe
model. It is lightweight, both in terms of bandwidth usage and ease of
implementation. This makes it particularly useful at the edge of the network
where a sensor or other simple device may be implemented using an arduino for
example.

341
debian/copyright vendored

@ -0,0 +1,341 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: mosquitto
Upstream-Contact: Roger A. Light <roger@atchoo.org>
Source: https://mosquitto.org/files/source/
Files: *
Copyright: 2009-2020 Roger A. Light <roger@atchoo.org>
License: EPL-2.0 or EDL-1.0
License: EDL-1.0
Eclipse Distribution License - v 1.0
.
Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
.
All rights reserved.
.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
Neither the name of the Eclipse Foundation, Inc. nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: EPL-2.0
Eclipse Public License - v 2.0
.
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
.
1. DEFINITIONS
.
"Contribution" means:
.
a) in the case of the initial Contributor, the initial content
Distributed under this Agreement, and
.
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from
and are Distributed by that particular Contributor. A Contribution
"originates" from a Contributor if it was added to the Program by
such Contributor itself or anyone acting on such Contributor's behalf.
Contributions do not include changes or additions to the Program that
are not Modified Works.
.
"Contributor" means any person or entity that Distributes the Program.
.
"Licensed Patents" mean patent claims licensable by a Contributor which
are necessarily infringed by the use or sale of its Contribution alone
or when combined with the Program.
.
"Program" means the Contributions Distributed in accordance with this
Agreement.
.
"Recipient" means anyone who receives the Program under this Agreement
or any Secondary License (as applicable), including Contributors.
.
"Derivative Works" shall mean any work, whether in Source Code or other
form, that is based on (or derived from) the Program and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship.
.
"Modified Works" shall mean any work in Source Code or other form that
results from an addition to, deletion from, or modification of the
contents of the Program, including, for purposes of clarity any new file
in Source Code form that contains any contents of the Program. Modified
Works shall not include works that contain only declarations,
interfaces, types, classes, structures, or files of the Program solely
in each case in order to link to, bind by name, or subclass the Program
or Modified Works thereof.
.
"Distribute" means the acts of a) distributing or b) making available
in any manner that enables the transfer of a copy.
.
"Source Code" means the form of a Program preferred for making
modifications, including but not limited to software source code,
documentation source, and configuration files.
.
"Secondary License" means either the GNU General Public License,
Version 2.0, or any later versions of that license, including any
exceptions or additional permissions as identified by the initial
Contributor.
.
2. GRANT OF RIGHTS
.
a) Subject to the terms of this Agreement, each Contributor hereby
grants Recipient a non-exclusive, worldwide, royalty-free copyright
license to reproduce, prepare Derivative Works of, publicly display,
publicly perform, Distribute and sublicense the Contribution of such
Contributor, if any, and such Derivative Works.
.
b) Subject to the terms of this Agreement, each Contributor hereby
grants Recipient a non-exclusive, worldwide, royalty-free patent
license under Licensed Patents to make, use, sell, offer to sell,
import and otherwise transfer the Contribution of such Contributor,
if any, in Source Code or other form. This patent license shall
apply to the combination of the Contribution and the Program if, at
the time the Contribution is added by the Contributor, such addition
of the Contribution causes such combination to be covered by the
Licensed Patents. The patent license shall not apply to any other
combinations which include the Contribution. No hardware per se is
licensed hereunder.
.
c) Recipient understands that although each Contributor grants the
licenses to its Contributions set forth herein, no assurances are
provided by any Contributor that the Program does not infringe the
patent or other intellectual property rights of any other entity.
Each Contributor disclaims any liability to Recipient for claims
brought by any other entity based on infringement of intellectual
property rights or otherwise. As a condition to exercising the
rights and licenses granted hereunder, each Recipient hereby
assumes sole responsibility to secure any other intellectual
property rights needed, if any. For example, if a third party
patent license is required to allow Recipient to Distribute the
Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
.
d) Each Contributor represents that to its knowledge it has
sufficient copyright rights in its Contribution, if any, to grant
the copyright license set forth in this Agreement.
.
e) Notwithstanding the terms of any Secondary License, no
Contributor makes additional grants to any Recipient (other than
those set forth in this Agreement) as a result of such Recipient's
receipt of the Program under the terms of a Secondary License
(if permitted under the terms of Section 3).
.
3. REQUIREMENTS
.
3.1 If a Contributor Distributes the Program in any form, then:
.
a) the Program must also be made available as Source Code, in
accordance with section 3.2, and the Contributor must accompany
the Program with a statement that the Source Code for the Program
is available under this Agreement, and informs Recipients how to
obtain it in a reasonable manner on or through a medium customarily
used for software exchange; and
.
b) the Contributor may Distribute the Program under a license
different than this Agreement, provided that such license:
i) effectively disclaims on behalf of all other Contributors all
warranties and conditions, express and implied, including
warranties or conditions of title and non-infringement, and
implied warranties or conditions of merchantability and fitness
for a particular purpose;
.
ii) effectively excludes on behalf of all other Contributors all
liability for damages, including direct, indirect, special,
incidental and consequential damages, such as lost profits;
.
iii) does not attempt to limit or alter the recipients' rights
in the Source Code under section 3.2; and
.
iv) requires any subsequent distribution of the Program by any
party to be under a license that satisfies the requirements
of this section 3.
.
3.2 When the Program is Distributed as Source Code:
.
a) it must be made available under this Agreement, or if the
Program (i) is combined with other material in a separate file or
files made available under a Secondary License, and (ii) the initial
Contributor attached to the Source Code the notice described in
Exhibit A of this Agreement, then the Program may be made available
under the terms of such Secondary Licenses, and
.
b) a copy of this Agreement must be included with each copy of
the Program.
.
3.3 Contributors may not remove or alter any copyright, patent,
trademark, attribution notices, disclaimers of warranty, or limitations
of liability ("notices") contained within the Program from any copy of
the Program which they Distribute, provided that Contributors may add
their own appropriate notices.
.
4. COMMERCIAL DISTRIBUTION
.
Commercial distributors of software may accept certain responsibilities
with respect to end users, business partners and the like. While this
license is intended to facilitate the commercial use of the Program,
the Contributor who includes the Program in a commercial product
offering should do so in a manner which does not create potential
liability for other Contributors. Therefore, if a Contributor includes
the Program in a commercial product offering, such Contributor
("Commercial Contributor") hereby agrees to defend and indemnify every
other Contributor ("Indemnified Contributor") against any losses,
damages and costs (collectively "Losses") arising from claims, lawsuits
and other legal actions brought by a third party against the Indemnified
Contributor to the extent caused by the acts or omissions of such
Commercial Contributor in connection with its distribution of the Program
in a commercial product offering. The obligations in this section do not
apply to any claims or Losses relating to any actual or alleged
intellectual property infringement. In order to qualify, an Indemnified
Contributor must: a) promptly notify the Commercial Contributor in
writing of such claim, and b) allow the Commercial Contributor to control,
and cooperate with the Commercial Contributor in, the defense and any
related settlement negotiations. The Indemnified Contributor may
participate in any such claim at its own expense.
.
For example, a Contributor might include the Program in a commercial
product offering, Product X. That Contributor is then a Commercial
Contributor. If that Commercial Contributor then makes performance
claims, or offers warranties related to Product X, those performance
claims and warranties are such Commercial Contributor's responsibility
alone. Under this section, the Commercial Contributor would have to
defend claims against the other Contributors related to those performance
claims and warranties, and if a court requires any other Contributor to
pay any damages as a result, the Commercial Contributor must pay
those damages.
.
5. NO WARRANTY
.
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. Each Recipient is solely responsible for determining the
appropriateness of using and distributing the Program and assumes all
risks associated with its exercise of rights under this Agreement,
including but not limited to the risks and costs of program errors,
compliance with applicable laws, damage to or loss of data, programs
or equipment, and unavailability or interruption of operations.
.
6. DISCLAIMER OF LIABILITY
.
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
.
7. GENERAL
.
If any provision of this Agreement is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of
the remainder of the terms of this Agreement, and without further
action by the parties hereto, such provision shall be reformed to the
minimum extent necessary to make such provision valid and enforceable.
.
If Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging that the
Program itself (excluding combinations of the Program with other software
or hardware) infringes such Recipient's patent(s), then such Recipient's
rights granted under Section 2(b) shall terminate as of the date such
litigation is filed.
.
All Recipient's rights under this Agreement shall terminate if it
fails to comply with any of the material terms or conditions of this
Agreement and does not cure such failure in a reasonable period of
time after becoming aware of such noncompliance. If all Recipient's
rights under this Agreement terminate, Recipient agrees to cease use
and distribution of the Program as soon as reasonably practicable.
However, Recipient's obligations under this Agreement and any licenses
granted by Recipient relating to the Program shall continue and survive.
.
Everyone is permitted to copy and distribute copies of this Agreement,
but in order to avoid inconsistency the Agreement is copyrighted and
may only be modified in the following manner. The Agreement Steward
reserves the right to publish new versions (including revisions) of
this Agreement from time to time. No one other than the Agreement
Steward has the right to modify this Agreement. The Eclipse Foundation
is the initial Agreement Steward. The Eclipse Foundation may assign the
responsibility to serve as the Agreement Steward to a suitable separate
entity. Each new version of the Agreement will be given a distinguishing
version number. The Program (including Contributions) may always be
Distributed subject to the version of the Agreement under which it was
received. In addition, after a new version of the Agreement is published,
Contributor may elect to Distribute the Program (including its
Contributions) under the new version.
.
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
receives no rights or licenses to the intellectual property of any
Contributor under this Agreement, whether expressly, by implication,
estoppel or otherwise. All rights in the Program not expressly granted
under this Agreement are reserved. Nothing in this Agreement is intended
to be enforceable by any entity that is not a Contributor or Recipient.
No third-party beneficiary rights are created under this Agreement.
.
Exhibit A - Form of Secondary Licenses Notice
.
"This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set forth
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
version(s), and exceptions or additional permissions here}."
.
Simply including a copy of this Agreement, including this Exhibit A
is not sufficient to license the Source Code under Secondary Licenses.
.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to
look for such a notice.
.
You may add additional accurate notices of copyright ownership.
Files: src/deps/uthash.h
Copyright: 2003-2013, Troy D. Hanson http://uthash.sourceforge.net
License: BSD-1-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@ -0,0 +1,4 @@
usr/include/mosquitto.h
usr/include/mqtt_protocol.h
usr/lib/*/libmosquitto.so
usr/lib/*/pkgconfig/libmosquitto.pc

@ -0,0 +1,3 @@
# xsltproc generated man pages have long lines but look ok. Patching the
# generated files to use hypenation results in very odd looking files.
libmosquitto-dev binary: manpage-has-errors-from-man

@ -0,0 +1 @@
usr/share/man/man3/libmosquitto.3

@ -0,0 +1 @@
usr/lib/*/libmosquitto.so.*

@ -0,0 +1,11 @@
libmosquitto.so.1 libmosquitto1 #MINVER#
(symver)MOSQ_1.0 1.0
(symver)MOSQ_1.1 1.1
(symver)MOSQ_1.2 1.2
(symver)MOSQ_1.3 1.3
(symver)MOSQ_1.4 1.4
(symver)MOSQ_1.5 1.5
(symver)MOSQ_1.6 1.6
(symver)MOSQ_1.6 1.6
(symver)MOSQ_1.6 1.6
(symver)MOSQ_1.7 2.0

@ -0,0 +1,3 @@
usr/include/mosquittopp.h
usr/lib/*/libmosquittopp.so
usr/lib/*/pkgconfig/libmosquittopp.pc

@ -0,0 +1 @@
usr/lib/*/libmosquittopp.so.*

@ -0,0 +1,63 @@
libmosquittopp.so.1 libmosquittopp1 #MINVER#
(c++)"mosqpp::subscribe_simple(mosquitto_message**, int, bool, char const*, int, char const*, int, char const*, int, bool, char const*, char const*, libmosquitto_will const*, libmosquitto_tls const*)@Base" 1.5
(c++)"mosqpp::subscribe_callback(int (*)(mosquitto*, void*, mosquitto_message const*), void*, char const*, int, char const*, int, char const*, int, bool, char const*, char const*, libmosquitto_will const*, libmosquitto_tls const*)@Base" 1.5
(c++)"mosqpp::lib_cleanup()@Base" 1.0
(c++)"mosqpp::lib_version(int*, int*, int*)@Base" 1.0
(c++)"mosqpp::mosquittopp::disconnect()@Base" 1.0
(c++)"mosqpp::mosquittopp::loop_start()@Base" 1.0
(c++)"mosqpp::mosquittopp::loop_write(int)@Base" 1.0
(c++)"mosqpp::mosquittopp::on_connect(int)@Base" 1.0
(c++)"mosqpp::mosquittopp::on_connect_with_flags(int, int)@Base" 1.5
(c++)"mosqpp::mosquittopp::on_message(mosquitto_message const*)@Base" 1.0
(c++)"mosqpp::mosquittopp::on_publish(int)@Base" 1.0
(c++)"mosqpp::mosquittopp::socks5_set(char const*, int, char const*, char const*)@Base" 1.4
(c++)"mosqpp::mosquittopp::want_write()@Base" 1.0
(c++)"mosqpp::mosquittopp::will_clear()@Base" 1.0
(c++)"mosqpp::mosquittopp::tls_psk_set(char const*, char const*, char const*)@Base" 1.0
(c++)"mosqpp::mosquittopp::unsubscribe(int*, char const*)@Base" 1.0
(c++)"mosqpp::mosquittopp::loop_forever(int, int)@Base" 1.1
(c++)"mosqpp::mosquittopp::on_subscribe(int, int, int const*)@Base" 1.0
(c++)"mosqpp::mosquittopp::reinitialise(char const*, bool)@Base" 1.0
(c++)"mosqpp::mosquittopp::threaded_set(bool)@Base" 1.4
(c++)"mosqpp::mosquittopp::tls_opts_set(int, char const*, char const*)@Base" 1.0
(c++)"mosqpp::mosquittopp::connect_async(char const*, int, int)@Base" 1.0
(c++)"mosqpp::mosquittopp::connect_async(char const*, int, int, char const*)@Base" 1.2
(c++)"mosqpp::mosquittopp::on_disconnect(int)@Base" 1.0
(c++)"mosqpp::mosquittopp::user_data_set(void*)@Base" 1.0
(c++)"mosqpp::mosquittopp::on_unsubscribe(int)@Base" 1.0
(c++)"mosqpp::mosquittopp::reconnect_async()@Base" 1.2
(c++)"mosqpp::mosquittopp::username_pw_set(char const*, char const*)@Base" 1.0
(c++)"mosqpp::mosquittopp::tls_insecure_set(bool)@Base" 1.2
(c++)"mosqpp::mosquittopp::message_retry_set(unsigned int)@Base" 1.0
(c++)"mosqpp::mosquittopp::reconnect_delay_set(unsigned int, unsigned int, bool)@Base" 1.2
(c++)"mosqpp::mosquittopp::max_inflight_messages_set(unsigned int)@Base" 1.2
(c++)"mosqpp::mosquittopp::loop(int, int)@Base" 1.0
(c++)"mosqpp::mosquittopp::on_log(int, char const*)@Base" 1.0
(c++)"mosqpp::mosquittopp::socket()@Base" 1.0
(c++)"mosqpp::mosquittopp::connect(char const*, int, int)@Base" 1.0
(c++)"mosqpp::mosquittopp::connect(char const*, int, int, char const*)@Base" 1.2
(c++)"mosqpp::mosquittopp::publish(int*, char const*, int, void const*, int, bool)@Base" 1.0
(c++)"mosqpp::mosquittopp::tls_set(char const*, char const*, char const*, char const*, int (*)(char*, int, int, void*))@Base" 1.0
(c++)"mosqpp::mosquittopp::on_error()@Base" 1.0
(c++)"mosqpp::mosquittopp::opts_set(mosq_opt_t, void*)@Base" 1.4
(c++)"mosqpp::mosquittopp::will_set(char const*, int, void const*, int, bool)@Base" 1.0
(c++)"mosqpp::mosquittopp::loop_misc()@Base" 1.0
(c++)"mosqpp::mosquittopp::loop_read(int)@Base" 1.0
(c++)"mosqpp::mosquittopp::loop_stop(bool)@Base" 1.0
(c++)"mosqpp::mosquittopp::reconnect()@Base" 1.0
(c++)"mosqpp::mosquittopp::subscribe(int*, char const*, int)@Base" 1.0
(c++)"mosqpp::mosquittopp::mosquittopp(char const*, bool)@Base" 1.0
(c++)"mosqpp::mosquittopp::mosquittopp(char const*, bool)@Base" 1.0
(c++)"mosqpp::mosquittopp::~mosquittopp()@Base" 1.0
(c++)"mosqpp::mosquittopp::~mosquittopp()@Base" 1.0
(c++)"mosqpp::mosquittopp::~mosquittopp()@Base" 1.0
(c++)"mosqpp::connack_string(int)@Base" 1.0
(c++)"mosqpp::topic_matches_sub(char const*, char const*, bool*)@Base" 1.0
(c++)"mosqpp::sub_topic_tokenise(char const*, char***, int*)@Base" 1.0
(c++)"mosqpp::sub_topic_tokens_free(char***, int)@Base" 1.0
(c++)"mosqpp::lib_init()@Base" 1.0
(c++)"mosqpp::validate_utf8(char const*, int)@Base" 1.5
(c++)"mosqpp::strerror(int)@Base" 1.0
(c++)"typeinfo for mosqpp::mosquittopp@Base" 1.0
(c++)"typeinfo name for mosqpp::mosquittopp@Base" 1.0
(c++)"vtable for mosqpp::mosquittopp@Base" 1.0

@ -0,0 +1,3 @@
usr/bin/mosquitto_pub
usr/bin/mosquitto_sub
usr/bin/mosquitto_rr

@ -0,0 +1,3 @@
# xsltproc generated man pages have long lines but look ok. Patching the
# generated files to use hypenation results in very odd looking files.
mosquitto-clients binary: manpage-has-errors-from-man

@ -0,0 +1,3 @@
usr/share/man/man1/mosquitto_pub.1
usr/share/man/man1/mosquitto_sub.1
usr/share/man/man1/mosquitto_rr.1

@ -0,0 +1,2 @@
usr/include/mosquitto_plugin.h
usr/include/mosquitto_broker.h

@ -0,0 +1,13 @@
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d

@ -0,0 +1,2 @@
var/lib/mosquitto
var/log/mosquitto

@ -0,0 +1,2 @@
README.md
README-letsencrypt.md

@ -0,0 +1,4 @@
mosquitto.conf
aclfile.example
pwfile.example
pskfile.example

@ -0,0 +1,140 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: mosquitto
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mosquitto MQTT v3.1 message broker
# Description:
# This is a message broker that supports version 3.1 of the MQ Telemetry
# Transport (MQTT) protocol.
#
# MQTT provides a method of carrying out messaging using a publish/subscribe
# model. It is lightweight, both in terms of bandwidth usage and ease of
# implementation. This makes it particularly useful at the edge of the network
# where a sensor or other simple device may be implemented using an arduino for
# example.
### END INIT INFO
set -e
PIDFILE=/run/mosquitto/mosquitto.pid
DAEMON=/usr/sbin/mosquitto
# /etc/init.d/mosquitto: start and stop the mosquitto MQTT message broker
test -x ${DAEMON} || exit 0
umask 022
. /lib/lsb/init-functions
# Are we running from init?
run_by_init() {
([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
}
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
case "$1" in
start)
if init_is_upstart; then
exit 1
fi
log_daemon_msg "Starting network daemon:" "mosquitto"
mkdir -m 740 -p /run/mosquitto
chown mosquitto: /run/mosquitto
if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c /etc/mosquitto/mosquitto.conf ; then
log_end_msg 0
else
log_end_msg 1
fi
;;
stop)
if init_is_upstart; then
exit 0
fi
log_daemon_msg "Stopping network daemon:" "mosquitto"
if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then
log_end_msg 0
rm -f ${PIDFILE}
else
log_end_msg 1
fi
;;
reload|force-reload)
if init_is_upstart; then
exit 1
fi
log_daemon_msg "Reloading network daemon configuration:" "mosquitto"
if start-stop-daemon --stop --signal HUP --quiet --oknodo --pidfile $PIDFILE; then
log_end_msg 0
else
log_end_msg 1
fi
;;
restart)
if init_is_upstart; then
exit 1
fi
log_daemon_msg "Restarting network daemon:" "mosquitto"
if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then
rm -f ${PIDFILE}
fi
if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c /etc/mosquitto/mosquitto.conf ; then
log_end_msg 0
else
log_end_msg 1
fi
;;
try-restart)
if init_is_upstart; then
exit 1
fi
log_daemon_msg "Restarting Mosquitto message broker" "mosquitto"
set +e
start-stop-daemon --stop --quiet --retry 30 --pidfile ${PIDFILE}
RET="$?"
set -e
case $RET in
0)
# old daemon stopped
rm -f ${PIDFILE}
if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c /etc/mosquitto/mosquitto.conf ; then
log_end_msg 0
else
log_end_msg 1
fi
;;
1)
# daemon not running
log_progress_msg "(not running)"
log_end_msg 0
;;
*)
# failed to stop
log_progress_msg "(failed to stop)"
log_end_msg 1
;;
esac
;;
status)
if init_is_upstart; then
exit 1
fi
status_of_proc -p ${PIDFILE} ${DAEMON} mosquitto && exit 0 || exit $?
;;
*)
log_action_msg "Usage: /etc/init.d/mosquitto {start|stop|reload|force-reload|restart|try-restart|status}"
exit 1
esac
exit 0

@ -0,0 +1,10 @@
etc/mosquitto/ca_certificates/README
etc/mosquitto/certs/README
etc/mosquitto/conf.d/README
etc/mosquitto/mosquitto.conf
etc/mosquitto/*.example
lib/systemd/system/mosquitto.service
usr/bin/mosquitto_passwd
usr/bin/mosquitto_ctrl
usr/lib/*/mosquitto_dynamic_security.so*
usr/sbin/mosquitto

@ -0,0 +1,14 @@
/var/log/mosquitto/mosquitto.log {
rotate 7
daily
compress
size 100k
nocreate
missingok
postrotate
if invoke-rc.d mosquitto status > /dev/null 2>&1; then \
invoke-rc.d mosquitto reload > /dev/null 2>&1; \
fi;
endscript
}

@ -0,0 +1,7 @@
usr/share/man/man1/mosquitto_ctrl.1
usr/share/man/man1/mosquitto_ctrl_dynsec.1
usr/share/man/man1/mosquitto_passwd.1
usr/share/man/man5/mosquitto.conf.5
usr/share/man/man7/mosquitto-tls.7
usr/share/man/man7/mqtt.7
usr/share/man/man8/mosquitto.8

@ -0,0 +1,47 @@
#!/bin/sh
# postinst script for mosquitto
#
# see: dh_installdeb(1)
set -e
setup_mosquitto_user() {
if ! getent group mosquitto >/dev/null; then
addgroup --quiet --system mosquitto
fi
if ! getent passwd mosquitto >/dev/null; then
adduser --quiet --system --no-create-home --ingroup mosquitto --home /var/lib/mosquitto --shell /usr/sbin/nologin mosquitto
fi
}
fix_permissions() {
chown mosquitto /var/lib/mosquitto
test ! -e /var/log/mosquitto || chown mosquitto /var/log/mosquitto
test ! -e /var/log/mosquitto/mosquitto.log || chown mosquitto /var/log/mosquitto/mosquitto.log
}
case "$1" in
configure)
setup_mosquitto_user
fix_permissions
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Reload AppArmor profile
APP_PROFILE="/etc/apparmor.d/usr.sbin.mosquitto"
if [ -f "$APP_PROFILE" ] && aa-status --enabled 2>/dev/null; then
apparmor_parser -r "$APP_PROFILE" || true
fi
#DEBHELPER#
exit 0

@ -0,0 +1,40 @@
#!/bin/sh
# postrm script for mosquitto
#
# see: dh_installdeb(1)
set -e
case "$1" in
purge)
rm -f /var/lib/mosquitto/mosquitto.db
if [ -d /var/lib/mosquitto ]; then
rmdir --ignore-fail-on-non-empty /var/lib/mosquitto
fi
rm -f /var/log/mosquitto/mosquitto.log*
if [ -d /var/log/mosquitto ]; then
rmdir --ignore-fail-on-non-empty /var/log/mosquitto
fi
rm -f /run/mosquitto/mosquitto.pid
if [ -d /run/mosquitto ]; then
rmdir --ignore-fail-on-non-empty /run/mosquitto
fi
APP_PROFILE="usr.sbin.mosquitto"
rm -f /etc/apparmor.d/disable/$APP_PROFILE >/dev/null 2>&1 || true
;;
remove|abort-install|abort-upgrade|disappear)
;;
upgrade|failed-upgrade)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

@ -0,0 +1,22 @@
Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571]
From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001
From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Date: Wed, 22 Jan 2020 12:39:49 +0100
Subject: [PATCH] Add dynamic symbols linking with cmake too
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
---
lib/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -94,6 +94,8 @@
OUTPUT_NAME mosquitto
VERSION ${VERSION}
SOVERSION 1
+ LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version
+ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version"
)
install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")

@ -0,0 +1 @@
1571.patch

37
debian/rules vendored

@ -0,0 +1,37 @@
#!/usr/bin/make -f
%:
dh $@ --buildsystem=cmake
override_dh_installchangelogs:
dh_installchangelogs ChangeLog.txt
ifeq ($(DEB_BUILD_ARCH_OS), linux)
SYSTEMD=ON
else
SYSTEMD=OFF
endif
override_dh_auto_configure:
dh_auto_configure -- -DWITH_BUNDLED_DEPS=OFF -DWITH_ADNS=ON -DUSE_LIBWRAP=ON -DWITH_WEBSOCKETS=ON -DWITH_DLT=ON -DWITH_SYSTEMD=${SYSTEMD}
override_dh_strip:
dh_strip -p mosquitto --dbgsym-migration='mosquitto-dbg (<< 1.5)' -Xlibmosquitto
dh_strip -p libmosquitto1 --dbgsym-migration='libmosquitto1-dbg (<< 1.5)' -Xlibmosquittopp -Xsbin/mosquitto
dh_strip -p libmosquittopp1 --dbgsym-migration='libmosquittopp1-dbg (<< 1.5)' -Xlibmosquitto.so -Xsbin/mosquitto
dh_strip --remaining-packages
override_dh_auto_install:
dh_auto_install
install -d debian/tmp/etc/mosquitto/conf.d/
install -m 644 debian/README-conf-d debian/tmp/etc/mosquitto/conf.d/README
install -d debian/tmp/etc/mosquitto/ca_certificates/
install -m 644 debian/README-ca_certificates debian/tmp/etc/mosquitto/ca_certificates/README
install -d debian/tmp/etc/mosquitto/certs/
install -m 644 debian/README-certs debian/tmp/etc/mosquitto/certs/README
install -m 644 debian/mosquitto.conf debian/tmp/etc/mosquitto/mosquitto.conf
install -d debian/tmp/lib/systemd/system/
install -m 644 ./service/systemd/mosquitto.service.notify debian/tmp/lib/systemd/system/mosquitto.service
override_dh_makeshlibs:
dh_makeshlibs -- -c4

@ -0,0 +1 @@
3.0 (quilt)

@ -0,0 +1,16 @@
Name: mosquitto
Bug-Database: https://github.com/eclipse/mosquitto/issues
Bug-Submit: https://github.com/eclipse/mosquitto/issues/new
Changelog: https://mosquitto.org/ChangeLog.txt
Contact: https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
Repository: https://github.com/eclipse/mosquitto
Security-Contact: https://www.eclipse.org/security/
Reference:
Author: Roger A. Light
Title: "Mosquitto: server and client implementation of the MQTT protocol"
Journal: The Journal of Open Source Software
Year: 2017
Volume: 2
Number: 13
DOI: http://dx.doi.org/10.21105/joss.00265
eprint: http://joss.theoj.org/papers/ebbbbf7c7a2f7e98e32ae41ee88a3bca

@ -0,0 +1,58 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBEoEgPwBEADeSeoLB59SoxrakvdK1WjGQZAbNXUgWhr9k0b08lpjwHhDFxZz
GalY/9IZ5C9WDzw8+DDvm7gD4vy1O5Q3peZ8qtQ1cD1H8MaM0Vzzz8fnXqWV2oww
sH7VH+ISKUZODCD76EG8JgUpWRO+TgfMylKWkuJC8BudSYUB5sdTyrcJ3n1PbbtJ
kZomIICIaoPR3VR5ySML4qe1as7PypxF3BnzgcmSKhByLNQcKyy35Lx86JnZvTm8
FUcCsp+FgSMCubrvF4nhyJppUAbGoohyiULmfJAVHI01XQcqmQKim02nN88HQgKU
6FDbvgPMvCSDH9wCAHghPrccYGfAhaWC9/lkVAXo5NnJC7JdXi/l/VlXhZUwsAqc
pQFj7nJHliZLalrNe9MDdnRnBw5jGx+iRQ6n5a/uNH/ykPbgQKMzWF0O3tAGmqEl
zfLd46bFr09QNzs2HfBNygUhyKYO8VSLfl+WEsLT1pcpmWQuGNUsrrF1hT/UtAr0
WTQw2pc2BQV1R/d7lGhAfB3VxtHjI2XIRHEPVJ2+r5bkc4GxVVw6l81AOhzUsoS9
Bv+3SnRc5c7guR4ck/CgElXCw/xy9BcqyXN0fQtiMRmL33zo2ZE4ZNJeFsmFERUz
E+fHNfJrBHnVVboE6p/TX8dzIEKbYYGllInQVSQcoAv+Qm2/a19WidUQ8QARAQAB
tCFSb2dlciBBLiBMaWdodCA8cm9nZXJAYXRjaG9vLm9yZz6JAjoEEwEIACQCGwMC
HgECF4AFCwkIBwMFFQoJCAsFFgIDAQAFAkoEomgCGQEACgkQd5si37PnF7egPw//
REmew0Fb45wCVFBJyLHL+0qKQX/B9okac9fud3rYtLTPmeB04OL+tMb3/tOTJbyC
F2rDLvjE1IrqMwedDAY/bMKSPJ1RQ5NRa0WjXGLxkVBOqJuE8E6qGOLrL6/DSu7v
zoq8xzcKxbWDRgizSTuKQ9QHEGqPE8RDOyYnkbyGHwshtOhGbhpBeX55gxnIfOPi
To04f+iF61MbomkXxdlylMnEjEqGuF09jKb4o2U2zhC/pe73ANGIApf9ZRHmUbt8
jduYgaffsj64FCw+qjTnf68ch+QjgDHFeCyO4BxeVOgYCDiafp7/CSk81K1DN+SF
n9Kjbcee4QGdIv2HmGTB576XBBbJ6bOgxYyuX1nw4m5a7cXKf0dpCimKQG/aUq2h
eGdD2KKs30bqPeaZRucFAZnrLxgfAvaj2eTEynJnSYoVB2ZNYs7qCe+oMtp8kkSl
za091I9rrBVFAEDGrRstJOOEtHJ8Qh4NT+yW/yKmpm7DyWYOJlR5ah+9G8njjlM8
sFHwWNdbbWgO6zPNC/VktiLc0aCeu101M3ay1+RexT2bq1pFBKU/4DGRdE4vVERY
gHejkDVP4xml8j1JA6Azk4ik4/mQ+tDyxQsJJz0edIlTVwH8X4dwLp91wJajpFQQ
VQN/tMkyGHnrrrcfsri44URvDwdlvOtsAxPeipniavuIRgQTEQgABgUCSgTUVQAK
CRC88Em0D7n+z8RfAJ9Ie7JMWStpeYck6Ay8IbQHyJLJCwCdEzfdkmpK4a1sIk32
fc/5ss3NtjuJAhwEEAECAAYFAkvd9U0ACgkQddvLEIxoAM4PVA/9FIyp7o/goX6G
If49jBrnUFZacWssL7Cs798PBy68hGbP10wZiKH5yc6ofuZOdEHzWVKvKuMja/Jo
6eQJtmXwmXAwV0grQ0e/LmadpswuojUA8tawch5xe/0f47FAmoGmNrL/yi8bpv2t
BV/DFKWSg1BAbHM3BoH0qLSwvdL0zOPCWWvX1pkANbWUueREjzc/xNnkwEUFsO2+
ol19YQmZe7rKpo5pa53DhPqvWuol2z5TXc8YbDNOP4T2rqpdwZjbYpHduttNIzK4
h8HsAp4QF3u2e2sbro3Uhx0uRp2d/7y3x6hflHK2U6t1yGA5uC5yYT1KaXkFZQTt
h2kPoEk9Bb1MImnPiqmQeW6g8r/msMq+d/DcOO0KjTkuqhsIN0Xx6W75toXhEjpl
j2pes8+6lSQnTznd9Kj5GeziWUdYhYmrpS/OJIDl0pKzJM0N6PnhBILMl8vbrpX8
Zsbn/ipk8xIb1ck8X1hjg92RJPwPOy204yzpgK1xXXch8wKPwTSn8QleEndwrGxp
BEbTrVaquYNy+lWuXs0RENJEy6EWnebhF3ycGV2vvXLOOlAVE3upgLvNugKhT9qG
Pxqr/r+FmCfSx05LpX3bUvz0OLmS6JhU/pnZGYrEa8pWY78Mbb3BMpIcwgYzPr+S
zbLaOpOy4PyGUOAIM+oEcKrSr458/nqJAhwEEAEIAAYFAkvfG7QACgkQYum3VLFy
NpIY5xAAlNai3YFtzxU7WjdITuVFrOSH2xJlWAzdbZ+7ijSuPzeBmHI+fYFxfkv2
76sh+A4K9QV1tdJn9cZAiH4cSuRdnCGdWFnPh+bAgsEjuLyt8U/OzvSOmbMT9g10
iYiuR+qZNEde/NHUOTUWvgQcwATb8sREx4bxgdrtB503DVs5WeOg8MpVJwp66xHt
zxCRWj/6urvnqkmicIDeR2nMc/D9yJWP90wxBeZoJGqiqcCeCWknQeBj7Qijr0Jt
Ys/If1g9fwj4vSXBctZb49xT/Kj/hwBnSWro8dQVz0iU1vxfGhxkRTQwXWfqiA6X
FJPYKLdvN4wU/3xP3jEy7rLyyQaIOcx9K7F/UUn/C7TOOq47PEXeLGPp4DR12pPC
urmWqcZQlB+GpVKP1W6c+1WGUmhRvOKx5KJBj8IdFcOG0Y0OK4+2xaEq4aZOPg+t
djoULu38AW2yzHW6vzE9toZXMRXtoPmbs5i+MCvOGp1HJkSnkVIdFS1Wnp1boQ3Z
C+eCF2tScI8Ulbj99LlodipomHeIxvo3DJcra9zV1KGGWCwU9hkLWugrcyWJPX1m
asdx2S7Y6dIurDV+M8PcNOY7nYbST2qwnnS7dGeQbV17RzNeeppfSwYCfwY9qmLZ
thkC1keFi/AoRIpIwGiQ/7RA9/4wdKIBMaTKuqlgNUgc9+QcXvyIRgQQEQIABgUC
S96lpwAKCRBhGkhEuMJTwdVYAJoD4voyORSCjlz32RPCMiE7ru4iJACeJweng6lC
jBrgT93OSCI/59FLKyKIRgQQEQIABgUCS+dHZwAKCRC6bhqXQ3UZAxAIAJ0VvKnK
qeGmZpNdJwK/6Kdzfd0K6wCgrX0vJPcp7ZFLQpHeCB0yt+O7zr6IRgQQEQIABgUC
S/ZX+gAKCRAgmbZMvxVJCw4NAJ4z1YF3InURoqE/ZBHWCPvICqtWewCg30QxvdLz
0nYf/elPCss1nZIWOa8=
=S/ue
-----END PGP PUBLIC KEY BLOCK-----

3
debian/watch vendored

@ -0,0 +1,3 @@
version=4
opts="pgpsigurlmangle=s/$/.asc/" \
https://mosquitto.org/files/source/mosquitto-(.*)\.tar\.gz

@ -15,8 +15,488 @@
</refnamediv>
<refsect1>
<title>Documentation</title>
<para>See <ulink url="https://mosquitto.org/api/"/></para>
<title>Description</title>
<para>This is an overview of how to use libmosquitto to create MQTT
aware client programs. There may be separate man pages on each of the
functions described here in the future.</para>
<para>This man page is woefully incomplete, please see the comments
in mosquitto.h for missing functions and a description of the
functions.</para>
</refsect1>
<refsect1>
<title>libmosquitto symbol names</title>
<para>All public functions in libmosquitto have the prefix
"mosquitto_". Any other functions defined in the source code are to be
treated as private functions and may change between any release. Do not
use these functions!</para>
</refsect1>
<refsect1>
<title>Functions</title>
<refsect2>
<title>Library version</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_lib_version</function></funcdef>
<paramdef>int *<parameter>major</parameter></paramdef>
<paramdef>int *<parameter>minor</parameter></paramdef>
<paramdef>int *<parameter>revision</parameter></paramdef>
</funcprototype></funcsynopsis>
<para>Obtain version information about the library. If any of
major, minor or revision are not NULL they will return the
corresponding version numbers. The return value is an integer
representation of the complete version number (e.g. 1009001 for 1.9.1)
that can be used for comparisons.</para>
</refsect2>
<refsect2>
<title>Library initialisation and cleanup</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_lib_init</function></funcdef>
<void/></funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_lib_cleanup</function></funcdef>
<void/></funcprototype></funcsynopsis>
<para>Call mosquitto_lib_init() before using any of the other
library functions and mosquitto_lib_cleanup() after finishing
with the library.</para>
</refsect2>
<refsect2>
<title>Client constructor/destructor</title>
<funcsynopsis><funcprototype><funcdef>struct mosquitto *<function>mosquitto_new</function></funcdef>
<paramdef>const char *<parameter>id</parameter></paramdef>
<paramdef>bool <parameter>clean_session</parameter></paramdef>
<paramdef>void *<parameter>userdata</parameter></paramdef>
</funcprototype></funcsynopsis>
<para>Create a new mosquitto client instance.</para>
<funcsynopsis><funcprototype><funcdef>void <function>mosquitto_destroy</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
<para>Use to free memory associated with a mosquitto client instance.</para>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_reinitialise</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>id</parameter></paramdef>
<paramdef>bool <parameter>clean_session</parameter></paramdef>
<paramdef>void *<parameter>userdata</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Authentication and encryption</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_username_pw_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>username</parameter></paramdef>
<paramdef>const char *<parameter>password</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_tls_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>cafile</parameter></paramdef>
<paramdef>const char *<parameter>capath</parameter></paramdef>
<paramdef>const char *<parameter>certfile</parameter></paramdef>
<paramdef>const char *<parameter>keyfile</parameter></paramdef>
<paramdef>int <parameter>(*pw_callback)(char *buf, int size, int rwflag, void *userdata)</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_tls_opts_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int <parameter>cert_reqs</parameter></paramdef>
<paramdef>const char *<parameter>tls_version</parameter></paramdef>
<paramdef>const char *<parameter>ciphers</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_tls_insecure_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>bool <parameter>value</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_tls_psk_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>psk</parameter></paramdef>
<paramdef>const char *<parameter>identity</parameter></paramdef>
<paramdef>const char *<parameter>ciphers</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Wills</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_will_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>topic</parameter></paramdef>
<paramdef>int <parameter>payloadlen</parameter></paramdef>
<paramdef>const void *<parameter>payload</parameter></paramdef>
<paramdef>int <parameter>qos</parameter></paramdef>
<paramdef>bool <parameter>retain</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_will_clear</function></funcdef>
<paramdef><parameter>struct mosquitto *mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Connect/disconnect</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_connect</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>host</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>int <parameter>keepalive</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_connect_bind</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>host</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>int <parameter>keepalive</parameter></paramdef>
<paramdef>const char *<parameter>bind_address</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_connect_async</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>host</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>int <parameter>keepalive</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_connect_bind_async</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>const char *<parameter>host</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>int <parameter>keepalive</parameter></paramdef>
<paramdef>const char *<parameter>bind_address</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_reconnect</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_reconnect_async</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_disconnect</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Publish</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_publish</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int *<parameter>mid</parameter></paramdef>
<paramdef>const char *<parameter>topic</parameter></paramdef>
<paramdef>int <parameter>payloadlen</parameter></paramdef>
<paramdef>const void *<parameter>payload</parameter></paramdef>
<paramdef>int <parameter>qos</parameter></paramdef>
<paramdef>bool <parameter>retain</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Subscribe/unsubscribe</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_subscribe</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int *<parameter>mid</parameter></paramdef>
<paramdef>const char *<parameter>sub</parameter></paramdef>
<paramdef>int <parameter>qos</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_unsubscribe</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int *<parameter>mid</parameter></paramdef>
<paramdef>const char *<parameter>sub</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Network loop</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_loop</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int <parameter>timeout</parameter></paramdef>
<paramdef>int <parameter>max_packets</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_loop_read</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int <parameter>max_packets</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_loop_write</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int <parameter>max_packets</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_loop_misc</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_loop_forever</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>int <parameter>timeout</parameter></paramdef>
<paramdef>int <parameter>max_packets</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_socket</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>bool <function>mosquitto_want_write</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Threaded network loop</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_loop_start</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_loop_stop</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>bool <parameter>force</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Misc client functions</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_max_inflight_messages_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>unsigned int <parameter>max_inflight_messages</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_reconnect_delay_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>unsigned int <parameter>reconnect_delay</parameter></paramdef>
<paramdef>unsigned int <parameter>reconnect_delay_max</parameter></paramdef>
<paramdef>bool <parameter>reconnect_exponential_backoff</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_user_data_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void *<parameter>userdata</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Callbacks</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_connect_callback_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void <parameter>(*on_connect)(struct mosquitto *, void *, int)</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_disconnect_callback_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void <parameter>(*on_disconnect)(struct mosquitto *, void *, int)</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_publish_callback_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void <parameter>(*on_publish)(struct mosquitto *, void *, int)</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_message_callback_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void <parameter>(*on_message)(struct mosquitto *, void *, const struct mosquitto_message *)</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_subscribe_callback_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void <parameter>(*on_subscribe)(struct mosquitto *, void *, int, int, const int *)</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_unsubscribe_callback_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void <parameter>(*on_unsubscribe)(struct mosquitto *, void *, int)</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_log_callback_set</function></funcdef>
<paramdef>struct mosquitto *<parameter>mosq</parameter></paramdef>
<paramdef>void <parameter>(*on_unsubscribe)(struct mosquitto *, void *, int, const char *)</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Utility functions</title>
<funcsynopsis><funcprototype><funcdef>const char *<function>mosquitto_connack_string</function></funcdef>
<paramdef>int <parameter>connack_code</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_message_copy</function></funcdef>
<paramdef>struct mosquitto_message *<parameter>dst</parameter></paramdef>
<paramdef>const struct mosquitto_message *<parameter>src</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_message_free</function></funcdef>
<paramdef>struct mosquitto_message **<parameter>message</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>const char *<function>mosquitto_strerror</function></funcdef>
<paramdef>int <parameter>mosq_errno</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_sub_topic_tokenise</function></funcdef>
<paramdef>const char *<parameter>subtopic</parameter></paramdef>
<paramdef>char ***<parameter>topics</parameter></paramdef>
<paramdef>int *<parameter>count</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_sub_topic_tokens_free</function></funcdef>
<paramdef>char ***<parameter>topics</parameter></paramdef>
<paramdef>int <parameter>count</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_topic_matches_sub</function></funcdef>
<paramdef>const char *<parameter>sub</parameter></paramdef>
<paramdef>const char *<parameter>topic</parameter></paramdef>
<paramdef>bool *<parameter>result</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
<refsect2>
<title>Helper functions</title>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_subscribe_simple</function></funcdef>
<paramdef>struct mosquitto_message **<parameter>message</parameter></paramdef>
<paramdef>int <parameter>msg_count</parameter></paramdef>
<paramdef>bool <parameter>want_retained</parameter></paramdef>
<paramdef>const char *<parameter>topic</parameter></paramdef>
<paramdef>int<parameter>qos</parameter></paramdef>
<paramdef>const char *<parameter>host</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>const char *<parameter>client_id</parameter></paramdef>
<paramdef>int <parameter>keepalive</parameter></paramdef>
<paramdef>bool <parameter>clean_session</parameter></paramdef>
<paramdef>const char *<parameter>username</parameter></paramdef>
<paramdef>const char *<parameter>password</parameter></paramdef>
<paramdef>const struct libmosquitto_will *<parameter>will</parameter></paramdef>
<paramdef>const struct libmosquitto_tls *<parameter>tls</parameter></paramdef>
</funcprototype></funcsynopsis>
<funcsynopsis><funcprototype><funcdef>int <function>mosquitto_subscribe_callback</function></funcdef>
<paramdef>int <parameter>(*callback)(struct mosquitto *, void *, const struct mosquitto_message *)</parameter></paramdef>
<paramdef>void *<parameter>userdata</parameter></paramdef>
<paramdef>const char *<parameter>topic</parameter></paramdef>
<paramdef>int <parameter>qos</parameter></paramdef>
<paramdef>const char *<parameter>host</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>const char *<parameter>client_id</parameter></paramdef>
<paramdef>int <parameter>keepalive</parameter></paramdef>
<paramdef>bool <parameter>clean_session</parameter></paramdef>
<paramdef>const char *<parameter>username</parameter></paramdef>
<paramdef>const char *<parameter>password</parameter></paramdef>
<paramdef>const struct libmosquitto_will *<parameter>will</parameter></paramdef>
<paramdef>const struct libmosquitto_tls *<parameter>tls</parameter></paramdef>
</funcprototype></funcsynopsis>
</refsect2>
</refsect1>
<refsect1>
<title>Examples</title>
<para><programlisting language="C">
#include &lt;stdio.h&gt;
#include &lt;mosquitto.h&gt;
void my_message_callback(struct mosquitto *mosq, void *userdata, const struct mosquitto_message *message)
{
if(message->payloadlen){
printf("%s %s\n", message->topic, message->payload);
}else{
printf("%s (null)\n", message->topic);
}
fflush(stdout);
}
void my_connect_callback(struct mosquitto *mosq, void *userdata, int result)
{
int i;
if(!result){
/* Subscribe to broker information topics on successful connect. */
mosquitto_subscribe(mosq, NULL, "$SYS/#", 2);
}else{
fprintf(stderr, "Connect failed\n");
}
}
void my_subscribe_callback(struct mosquitto *mosq, void *userdata, int mid, int qos_count, const int *granted_qos)
{
int i;
printf("Subscribed (mid: %d): %d", mid, granted_qos[0]);
for(i=1; i&lt;qos_count; i++){
printf(", %d", granted_qos[i]);
}
printf("\n");
}
void my_log_callback(struct mosquitto *mosq, void *userdata, int level, const char *str)
{
/* Pring all log messages regardless of level. */
printf("%s\n", str);
}
int main(int argc, char *argv[])
{
int i;
char *host = "localhost";
int port = 1883;
int keepalive = 60;
bool clean_session = true;
struct mosquitto *mosq = NULL;
mosquitto_lib_init();
mosq = mosquitto_new(NULL, clean_session, NULL);
if(!mosq){
fprintf(stderr, "Error: Out of memory.\n");
return 1;
}
mosquitto_log_callback_set(mosq, my_log_callback);
mosquitto_connect_callback_set(mosq, my_connect_callback);
mosquitto_message_callback_set(mosq, my_message_callback);
mosquitto_subscribe_callback_set(mosq, my_subscribe_callback);
if(mosquitto_connect(mosq, host, port, keepalive)){
fprintf(stderr, "Unable to connect.\n");
return 1;
}
mosquitto_loop_forever(mosq, -1, 1);
mosquitto_destroy(mosq);
mosquitto_lib_cleanup();
return 0;
}
</programlisting></para>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
<member>
<citerefentry>
<refentrytitle><link xlink:href="mosquitto-8.html">mosquitto</link></refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>
<citerefentry>
<refentrytitle><link xlink:href="mqtt-7.html">mqtt</link></refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
</member>
</simplelist>
</refsect1>
<refsect1>

Loading…
Cancel
Save