From fea25f520ff053fee5b190b2a01c771844110eb0 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 20 Sep 2018 14:00:55 +0100 Subject: [PATCH 01/17] Add missing posts. --- .../08/updated-debian-repository-backend.md | 26 ++++++ www/posts/2018/08/version-151-released.md | 87 +++++++++++++++++++ www/posts/2018/09/version-152-released.md | 40 +++++++++ 3 files changed, 153 insertions(+) create mode 100644 www/posts/2018/08/updated-debian-repository-backend.md create mode 100644 www/posts/2018/08/version-151-released.md create mode 100644 www/posts/2018/09/version-152-released.md diff --git a/www/posts/2018/08/updated-debian-repository-backend.md b/www/posts/2018/08/updated-debian-repository-backend.md new file mode 100644 index 00000000..093dfa85 --- /dev/null +++ b/www/posts/2018/08/updated-debian-repository-backend.md @@ -0,0 +1,26 @@ + + +The backend software for administering the Debian repository at +https://repo.mosquitto.org/ has been migrated from `reprepro` to `aptly`. This +has the benefit of allowing multiple versions of a package to remain in the +repository. + +For mosquitto, this now means that old versions of the Debian packages will +remain available even after newer versions are published, and so you can depend +on a particular version. The recommendation is always to use the latest version +of course. + +This change should be transparent to all current users, but there is the +possibility that something is different between the two repository tools. If +you do find a problem, please let us know. + +The repository now has builds for versions 1.4.15 and 1.5. diff --git a/www/posts/2018/08/version-151-released.md b/www/posts/2018/08/version-151-released.md new file mode 100644 index 00000000..cb81505a --- /dev/null +++ b/www/posts/2018/08/version-151-released.md @@ -0,0 +1,87 @@ + + +This is a bugfix release. + +# Packaging changes + +* The snap package now has support for websockets included. +* The Windows packages have changed. + - Support for Windows XP was dropped in Mosquitto 1.5, so the need for the + Cygwin build has gone, and this has been dropped. + - There are now 64-bit and 32-bit native packages. + - Websockets support is included. + - Threading support is not included in libmosquitto to simplify installation, + alternative solutions are being looked into for the future. + - The only external dependency is now OpenSSL. + +# Version 1.5.1 changes + +## Broker +- Fix plugin cleanup function not being called on exit of the broker. Closes + [#900]. +- Print more OpenSSL errors when loading certificates/keys fail. +- Use `AF_UNSPEC` etc. instead of `PF_UNSPEC` to comply with POSIX. Closes + [#863]. +- Remove use of `AI_ADDRCONFIG`, which means the broker can be used on systems + where only the loopback interface is defined. Closes [#869], Closes [#901]. +- Fix IPv6 addresses not being able to be used as bridge addresses. + Closes [#886]. +- All clients now time out if they exceed their keepalive\*1.5, rather than + just reach it. This was inconsistent in two places. +- Fix segfault on startup if bridge CA certificates could not be read. + Closes [#851]. +- Fix problem opening listeners on Pi caused by unsigned char being default. + Found via [#849]. +- ACL patterns that do not contain either `%c` or `%u` now produce a warning in + the log. Closes [#209]. +- Fix bridge publishing failing when `per_listener_settings` was true. Closes + [#860]. +- Fix `use_identity_as_username true` not working. Closes [#833]. +- Fix UNSUBACK messages not being logged. Closes [#903]. +- Fix possible endian issue when reading the `memory_limit` option. +- Fix building for libwebsockets < 1.6. +- Fix accessor functions for username and client id when used in plugin auth + check. + +## Library +- Fix some places where return codes were incorrect, including to the + `on_disconnect()` callback. This has resulted in two new error codes, + `MOSQ_ERR_KEEPALIVE` and `MOSQ_ERR_LOOKUP`. +- Fix connection problems when `mosquitto_loop_start()` was called before + `mosquitto_connect_async()`. Closes [#848]. + +## Clients +- When compiled using `WITH_TLS=no`, the default port was incorrectly being set + to -1. This has been fixed. +- Fix compiling on Mac OS X <10.12. Closes `#813` and `#240`. + +## Build +- Fixes for building on NetBSD. Closes `#258`. +- Fixes for building on FreeBSD. +- Add support for compiling with static libwebsockets library. + + +[#209]: https://github.com/eclipse/mosquitto/issues/209 +[#240]: https://github.com/eclipse/mosquitto/issues/240 +[#258]: https://github.com/eclipse/mosquitto/issues/258 +[#813]: https://github.com/eclipse/mosquitto/issues/813 +[#833]: https://github.com/eclipse/mosquitto/issues/833 +[#848]: https://github.com/eclipse/mosquitto/issues/848 +[#849]: https://github.com/eclipse/mosquitto/issues/849 +[#851]: https://github.com/eclipse/mosquitto/issues/851 +[#860]: https://github.com/eclipse/mosquitto/issues/860 +[#863]: https://github.com/eclipse/mosquitto/issues/863 +[#869]: https://github.com/eclipse/mosquitto/issues/869 +[#886]: https://github.com/eclipse/mosquitto/issues/886 +[#900]: https://github.com/eclipse/mosquitto/issues/900 +[#901]: https://github.com/eclipse/mosquitto/issues/901 +[#903]: https://github.com/eclipse/mosquitto/issues/903 diff --git a/www/posts/2018/09/version-152-released.md b/www/posts/2018/09/version-152-released.md new file mode 100644 index 00000000..f1f4924e --- /dev/null +++ b/www/posts/2018/09/version-152-released.md @@ -0,0 +1,40 @@ + + +This is a bugfix release. + +# Version 1.5.2 changes + +## Broker +- Fix build when using `WITH_ADNS=yes`. +- Fix incorrect call to setsockopt() for `TCP_NODELAY`. Closes [#941]. +- Fix excessive CPU usage when the number of sockets exceeds the system limit. + Closes [#948]. +- Fix for bridge connections when using `WITH_ADNS=yes`. +- Fix `round_robin false` behaviour. Closes [#481]. +- Fix segfault on HUP when bridges and security options are configured. + Closes [#965]. + +## Library +- Fix situation where username and password is used with SOCKS5 proxy. Closes + [#927]. +- Fix SOCKS5 behaviour when passing IP addresses. Closes [#927]. + +## Build +- Make it easier to build without bundled uthash.h using `WITH_BUNDLED_DEPS=no`. +- Fix build with OPENSSL_NO_ENGINE. Closes [#932]. + +[#481]: https://github.com/eclipse/mosquitto/issues/481 +[#927]: https://github.com/eclipse/mosquitto/issues/927 +[#932]: https://github.com/eclipse/mosquitto/issues/932 +[#941]: https://github.com/eclipse/mosquitto/issues/941 +[#948]: https://github.com/eclipse/mosquitto/issues/948 +[#965]: https://github.com/eclipse/mosquitto/issues/965 From d1da5ab782020f6516313c76956bb0254f5458a2 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 20 Sep 2018 15:25:28 +0100 Subject: [PATCH 02/17] Add fixed CVE information. --- www/pages/security.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/www/pages/security.md b/www/pages/security.md index e25f3686..466c7a52 100644 --- a/www/pages/security.md +++ b/www/pages/security.md @@ -19,6 +19,13 @@ follow the steps on [Eclipse Security] page to report it. Listed with most recent first. Further information on security related issues can be found in the [security category]. +* April 2018: [CVE-2017-7655] affecting versions **1.0** to **1.4.15** + inclusive, fixed in **1.5**. +* April 2018: [CVE-2017-7654] affecting versions **1.0** to **1.4.15** + inclusive, fixed in **1.5**. + [security-advisory-cve-2017-7653-cve-2017-7654]. +* April 2018: [CVE-2017-7653] affecting versions **1.0** to **1.4.15** + inclusive, fixed in **1.5**. * February 2018: [CVE-2017-7651] affecting versions **0.15** to **1.4.14** inclusive, fixed in **1.4.15**. More details at [security-advisory-cve-2017-7651-cve-2017-7652]. @@ -34,11 +41,16 @@ can be found in the [security category]. [security-advisory-cve-2017-7651-cve-2017-7652]: /2018/02/security-advisory-cve-2017-7651-cve-2017-7652/ -[CVE-2017-7651]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7651 -[CVE-2017-7652]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7652 -[Eclipse Security]: https://www.eclipse.org/security/ -[CVE-2017-7650]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7650 [security-advisory-cve-2017-7650]: /2017/05/security-advisory-cve-2017-7650/ -[CVE-2017-9868]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9868 [security-advisory-cve-2017-9868]: /2017/06/security-advisory-cve-2017-9868/ + +[Eclipse Security]: https://www.eclipse.org/security/ [security category]: /blog/categories/security/ + +[CVE-2017-9868]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9868 +[CVE-2017-7655]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7652 +[CVE-2017-7654]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7652 +[CVE-2017-7653]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7652 +[CVE-2017-7652]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7652 +[CVE-2017-7651]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7651 +[CVE-2017-7650]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7650 From f7474d348225bf086f6b9c69b18d6413aa6ffca6 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 20 Sep 2018 15:02:15 +0100 Subject: [PATCH 03/17] Revert "Remove some test that was always true" This reverts commit 6fc7cadb63477a438f56745872a2046ed7026fc4. --- src/subs.c | 67 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/src/subs.c b/src/subs.c index 0716fe19..5953055c 100644 --- a/src/subs.c +++ b/src/subs.c @@ -459,7 +459,15 @@ int sub__add(struct mosquitto_db *db, struct mosquitto *context, const char *sub if(sub__topic_tokenise(sub, &tokens)) return 1; HASH_FIND(hh, *root, UHPA_ACCESS_TOPIC(tokens), tokens->topic_len, subhier); - assert(subhier); + if(!subhier){ + subhier = sub__add_hier_entry(NULL, root, UHPA_ACCESS_TOPIC(tokens), tokens->topic_len); + if(!subhier){ + sub__topic_tokens_free(tokens); + log__printf(NULL, MOSQ_LOG_ERR, "Error: Out of memory."); + return MOSQ_ERR_NOMEM; + } + + } rc = sub__add_recurse(db, context, qos, subhier, tokens); sub__topic_tokens_free(tokens); @@ -481,8 +489,9 @@ int sub__remove(struct mosquitto_db *db, struct mosquitto *context, const char * if(sub__topic_tokenise(sub, &tokens)) return 1; HASH_FIND(hh, root, UHPA_ACCESS_TOPIC(tokens), tokens->topic_len, subhier); - assert(subhier); - rc = sub__remove_recurse(db, context, subhier, tokens); + if(subhier){ + rc = sub__remove_recurse(db, context, subhier, tokens); + } sub__topic_tokens_free(tokens); @@ -507,14 +516,15 @@ int sub__messages_queue(struct mosquitto_db *db, const char *source_id, const ch (*stored)->ref_count++; HASH_FIND(hh, db->subs, UHPA_ACCESS_TOPIC(tokens), tokens->topic_len, subhier); - assert(subhier); - if(retain){ - /* We have a message that needs to be retained, so ensure that the subscription - * tree for its topic exists. - */ - sub__add_recurse(db, NULL, 0, subhier, tokens); + if(subhier){ + if(retain){ + /* We have a message that needs to be retained, so ensure that the subscription + * tree for its topic exists. + */ + sub__add_recurse(db, NULL, 0, subhier, tokens); + } + sub__search(db, subhier, tokens, source_id, topic, qos, retain, *stored, true); } - sub__search(db, subhier, tokens, source_id, topic, qos, retain, *stored, true); sub__topic_tokens_free(tokens); /* Remove our reference and free if needed. */ @@ -611,23 +621,25 @@ void sub__tree_print(struct mosquitto__subhier *root, int level) struct mosquitto__subleaf *leaf; HASH_ITER(hh, root, branch, branch_tmp){ - for(i=0; i<(level+2)*2; i++){ - printf(" "); - } - printf("%s", UHPA_ACCESS_TOPIC(branch)); - leaf = branch->subs; - while(leaf){ - if(leaf->context){ - printf(" (%s, %d)", leaf->context->id, leaf->qos); - }else{ - printf(" (%s, %d)", "", leaf->qos); + if(level > -1){ + for(i=0; i<(level+2)*2; i++){ + printf(" "); } - leaf = leaf->next; - } - if(branch->retained){ - printf(" (r)"); + printf("%s", UHPA_ACCESS_TOPIC(branch)); + leaf = branch->subs; + while(leaf){ + if(leaf->context){ + printf(" (%s, %d)", leaf->context->id, leaf->qos); + }else{ + printf(" (%s, %d)", "", leaf->qos); + } + leaf = leaf->next; + } + if(branch->retained){ + printf(" (r)"); + } + printf("\n"); } - printf("\n"); sub__tree_print(branch->children, level+1); } @@ -715,9 +727,10 @@ int sub__retain_queue(struct mosquitto_db *db, struct mosquitto *context, const if(sub__topic_tokenise(sub, &tokens)) return 1; HASH_FIND(hh, db->subs, UHPA_ACCESS_TOPIC(tokens), tokens->topic_len, subhier); - assert(subhier); - retain__search(db, subhier, tokens, context, sub, sub_qos, 0); + if(subhier){ + retain__search(db, subhier, tokens, context, sub, sub_qos, 0); + } while(tokens){ tail = tokens->next; UHPA_FREE_TOPIC(tokens); From 59bd07627dc1285b270d7e12617d39174980c897 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 20 Sep 2018 16:12:00 +0100 Subject: [PATCH 04/17] Various build improvements to help packaging. --- ChangeLog.txt | 3 +++ config.h | 31 ++++++++++++++----------------- config.mk | 8 +++++--- lib/Makefile | 27 +++++++++++++-------------- lib/cpp/Makefile | 28 ++++++++++++++-------------- 5 files changed, 49 insertions(+), 48 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 9230ca5f..04a965f5 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,9 @@ Broker: - Elevate log level to warning for situation when socket limit is hit. - Remove requirement to use `user root` in snap package config files. +Build: +- Various fixes to ease building. + 1.5.2 - 20180919 ================ diff --git a/config.h b/config.h index 76070192..5e76e899 100644 --- a/config.h +++ b/config.h @@ -1,10 +1,19 @@ #ifndef CONFIG_H /* ============================================================ - * Control compile time options. - * ============================================================ - * - * Compile time options have moved to config.mk. - */ + * Platform options + * ============================================================ */ + +#ifdef __APPLE__ +# define __DARWIN_C_SOURCE +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__SYMBIAN32__) || defined(__QNX__) +# define _XOPEN_SOURCE 700 +# define __BSD_VISIBLE 1 +# define HAVE_NETINET_IN_H +#else +# define _XOPEN_SOURCE 700 +# define _DEFAULT_SOURCE 1 +# define _POSIX_C_SOURCE 200809L +#endif /* ============================================================ @@ -27,16 +36,4 @@ #define uthash_malloc(sz) mosquitto__malloc(sz) #define uthash_free(ptr,sz) mosquitto__free(ptr) -#ifdef __APPLE__ -# define __DARWIN_C_SOURCE -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__SYMBIAN32__) || defined(__QNX__) -# define _XOPEN_SOURCE 700 -# define __BSD_VISIBLE 1 -# define HAVE_NETINET_IN_H -#else -# define _XOPEN_SOURCE 700 -# define _DEFAULT_SOURCE 1 -# define _POSIX_C_SOURCE 200809L -#endif - #endif diff --git a/config.mk b/config.mk index 3e877ccf..96052346 100644 --- a/config.mk +++ b/config.mk @@ -275,9 +275,11 @@ ifeq ($(WITH_WEBSOCKETS),static) endif INSTALL?=install -prefix=/usr/local -mandir=${prefix}/share/man -localedir=${prefix}/share/locale +prefix?=/usr/local +incdir?=${prefix}/include +libdir?=${prefix}/lib${LIB_SUFFIX} +localedir?=${prefix}/share/locale +mandir?=${prefix}/share/man STRIP?=strip ifeq ($(WITH_STRIP),yes) diff --git a/lib/Makefile b/lib/Makefile index 3a293a8a..b768c81b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -48,25 +48,24 @@ all : ${ALL_DEPS} $(MAKE) -C cpp install : all - $(INSTALL) -d "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/" - $(INSTALL) ${STRIP_OPTS} libmosquitto.so.${SOVERSION} "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}" - ln -sf libmosquitto.so.${SOVERSION} "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so" + $(INSTALL) -d "${DESTDIR}${libdir}/" + $(INSTALL) ${STRIP_OPTS} libmosquitto.so.${SOVERSION} "${DESTDIR}${libdir}/libmosquitto.so.${SOVERSION}" + ln -sf libmosquitto.so.${SOVERSION} "${DESTDIR}${libdir}/libmosquitto.so" ifeq ($(WITH_STATIC_LIBRARIES),yes) - $(INSTALL) libmosquitto.a "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.a" - ${CROSS_COMPILE}${STRIP} -g --strip-unneeded "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.a" + $(INSTALL) ${STRIP_OPTS} libmosquitto.a "${DESTDIR}${libdir}/libmosquitto.a" endif - $(INSTALL) -d "${DESTDIR}${prefix}/include/" - $(INSTALL) mosquitto.h "${DESTDIR}${prefix}/include/mosquitto.h" - $(INSTALL) -d "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/pkgconfig" - $(INSTALL) -m644 ../libmosquitto.pc.in "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/pkgconfig/libmosquitto.pc" - sed -i -e "s#@CMAKE_INSTALL_PREFIX@#$(prefix)#" -e "s#@VERSION@#$(VERSION)#" "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/pkgconfig/libmosquitto.pc" + $(INSTALL) -d "${DESTDIR}${incdir}/" + $(INSTALL) mosquitto.h "${DESTDIR}${incdir}/mosquitto.h" + $(INSTALL) -d "${DESTDIR}${libdir}/pkgconfig" + $(INSTALL) -m644 ../libmosquitto.pc.in "${DESTDIR}${libdir}/pkgconfig/libmosquitto.pc" + sed -i -e "s#@CMAKE_INSTALL_PREFIX@#${prefix}#" -e "s#@VERSION@#${VERSION}#" "${DESTDIR}${libdir}/pkgconfig/libmosquitto.pc" $(MAKE) -C cpp install uninstall : - -rm -f "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so.${SOVERSION}" - -rm -f "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.so" - -rm -f "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquitto.a" - -rm -f "${DESTDIR}${prefix}/include/mosquitto.h" + -rm -f "${DESTDIR}${libdir}/libmosquitto.so.${SOVERSION}" + -rm -f "${DESTDIR}${libdir}/libmosquitto.so" + -rm -f "${DESTDIR}${libdir}/libmosquitto.a" + -rm -f "${DESTDIR}${incdir}/mosquitto.h" reallyclean : clean diff --git a/lib/cpp/Makefile b/lib/cpp/Makefile index a6684757..87d6e057 100644 --- a/lib/cpp/Makefile +++ b/lib/cpp/Makefile @@ -15,24 +15,24 @@ endif all : ${ALL_DEPS} install : all - $(INSTALL) -d "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/" - $(INSTALL) ${STRIP_OPTS} libmosquittopp.so.${SOVERSION} "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION}" - ln -sf libmosquittopp.so.${SOVERSION} "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so" + $(INSTALL) -d "${DESTDIR}${libdir}/" + $(INSTALL) ${STRIP_OPTS} libmosquittopp.so.${SOVERSION} "${DESTDIR}${libdir}/libmosquittopp.so.${SOVERSION}" + ln -sf libmosquittopp.so.${SOVERSION} "${DESTDIR}${libdir}/libmosquittopp.so" ifeq ($(WITH_STATIC_LIBRARIES),yes) - $(INSTALL) libmosquittopp.a "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.a" - ${CROSS_COMPILE}${STRIP} -g --strip-unneeded "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.a" + $(INSTALL) libmosquittopp.a "${DESTDIR}${libdir}/libmosquittopp.a" + ${CROSS_COMPILE}${STRIP} -g --strip-unneeded "${DESTDIR}${libdir}/libmosquittopp.a" endif - $(INSTALL) -d "${DESTDIR}${prefix}/include/" - $(INSTALL) mosquittopp.h "${DESTDIR}${prefix}/include/mosquittopp.h" - $(INSTALL) -d "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/pkgconfig" - $(INSTALL) -m644 ../../libmosquittopp.pc.in "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/pkgconfig/libmosquittopp.pc" - sed -i -e "s#@CMAKE_INSTALL_PREFIX@#$(prefix)#" -e "s#@VERSION@#$(VERSION)#" "${DESTDIR}$(prefix)/lib${LIB_SUFFIX}/pkgconfig/libmosquittopp.pc" + $(INSTALL) -d "${DESTDIR}${incdir}/" + $(INSTALL) mosquittopp.h "${DESTDIR}${incdir}/mosquittopp.h" + $(INSTALL) -d "${DESTDIR}${libdir}/pkgconfig/" + $(INSTALL) -m644 ../../libmosquittopp.pc.in "${DESTDIR}${libdir}/pkgconfig/libmosquittopp.pc" + sed -i -e "s#@CMAKE_INSTALL_PREFIX@#${prefix}#" -e "s#@VERSION@#${VERSION}#" "${DESTDIR}${libdir}/pkgconfig/libmosquittopp.pc" uninstall : - -rm -f "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so.${SOVERSION}" - -rm -f "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.so" - -rm -f "${DESTDIR}${prefix}/lib${LIB_SUFFIX}/libmosquittopp.a" - -rm -f "${DESTDIR}${prefix}/include/mosquittopp.h" + -rm -f "${DESTDIR}${libdir}/libmosquittopp.so.${SOVERSION}" + -rm -f "${DESTDIR}${libdir}/libmosquittopp.so" + -rm -f "${DESTDIR}${libdir}/libmosquittopp.a" + -rm -f "${DESTDIR}${incdir}/mosquittopp.h" clean : -rm -f *.o libmosquittopp.so.${SOVERSION} libmosquittopp.a From 9df05e93c045f2004b287079312e2acfeb69914c Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Sep 2018 09:25:56 +0100 Subject: [PATCH 05/17] Add test for $test publishing bug. --- test/broker/03-publish-dollar.py | 40 ++++++++++++++++++++++++++++++++ test/broker/Makefile | 1 + test/broker/ptest.py | 1 + 3 files changed, 42 insertions(+) create mode 100755 test/broker/03-publish-dollar.py diff --git a/test/broker/03-publish-dollar.py b/test/broker/03-publish-dollar.py new file mode 100755 index 00000000..4b2d3787 --- /dev/null +++ b/test/broker/03-publish-dollar.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +# Test whether a PUBLISH to a topic starting with $ succeeds + +import inspect, os, sys +# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder +cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],".."))) +if cmd_subfolder not in sys.path: + sys.path.insert(0, cmd_subfolder) + +import mosq_test + +rc = 1 +mid = 19 +keepalive = 60 +connect_packet = mosq_test.gen_connect("pub-dollar-test", keepalive=keepalive) +connack_packet = mosq_test.gen_connack(rc=0) + +publish_packet = mosq_test.gen_publish("$test/test", qos=1, mid=mid, payload="message") +puback_packet = mosq_test.gen_puback(mid) + +port = mosq_test.get_port() +broker = mosq_test.start_broker(filename=os.path.basename(__file__), port=port) + +try: + sock = mosq_test.do_client_connect(connect_packet, connack_packet, port=port) + mosq_test.do_send_receive(sock, publish_packet, puback_packet, "puback") + + rc = 0 + + sock.close() +finally: + broker.terminate() + broker.wait() + (stdo, stde) = broker.communicate() + if rc: + print(stde) + +exit(rc) + diff --git a/test/broker/Makefile b/test/broker/Makefile index 70da8799..0b4fee08 100644 --- a/test/broker/Makefile +++ b/test/broker/Makefile @@ -62,6 +62,7 @@ endif ./03-pattern-matching.py #./03-publish-qos1-queued-bytes.py ./03-publish-invalid-utf8.py + ./03-publish-dollar.py 04 : ./04-retain-qos0.py diff --git a/test/broker/ptest.py b/test/broker/ptest.py index dab515a7..27b0df6d 100755 --- a/test/broker/ptest.py +++ b/test/broker/ptest.py @@ -44,6 +44,7 @@ tests = [ (1, './03-pattern-matching.py'), #(1, './03-publish-qos1-queued-bytes.py'), (1, './03-publish-invalid-utf8.py'), + (1, './03-publish-dollar.py'), (1, './04-retain-qos0.py'), (1, './04-retain-qos0-fresh.py'), From 7b1892caefb14e2abcde6648bcf02558c3112a53 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Sep 2018 11:39:58 +0100 Subject: [PATCH 06/17] 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. --- ChangeLog.txt | 2 ++ src/bridge.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 04a965f5..3f217388 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -4,6 +4,8 @@ Broker: - Elevate log level to warning for situation when socket limit is hit. - Remove requirement to use `user root` in snap package config files. +- Fix retained messages not sent by bridges on outgoing topics at the first + connection. Closes #701. Build: - Various fixes to ease building. diff --git a/src/bridge.c b/src/bridge.c index 7f98d399..a3f2ed7d 100644 --- a/src/bridge.c +++ b/src/bridge.c @@ -145,6 +145,9 @@ int bridge__connect_step1(struct mosquitto_db *db, struct mosquitto *context) if(context->bridge->topics[i].direction == bd_out || context->bridge->topics[i].direction == bd_both){ log__printf(NULL, MOSQ_LOG_DEBUG, "Bridge %s doing local SUBSCRIBE on topic %s", context->id, context->bridge->topics[i].local_topic); if(sub__add(db, context, context->bridge->topics[i].local_topic, context->bridge->topics[i].qos, &db->subs)) return 1; + sub__retain_queue(db, context, + context->bridge->topics[i].local_topic, + context->bridge->topics[i].qos); } } @@ -308,6 +311,9 @@ int bridge__connect(struct mosquitto_db *db, struct mosquitto *context) if(context->bridge->topics[i].direction == bd_out || context->bridge->topics[i].direction == bd_both){ log__printf(NULL, MOSQ_LOG_DEBUG, "Bridge %s doing local SUBSCRIBE on topic %s", context->id, context->bridge->topics[i].local_topic); if(sub__add(db, context, context->bridge->topics[i].local_topic, context->bridge->topics[i].qos, &db->subs)) return 1; + sub__retain_queue(db, context, + context->bridge->topics[i].local_topic, + context->bridge->topics[i].qos); } } From 008d424a3318b0493868de143d817d800304a73e Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Sep 2018 12:54:22 +0100 Subject: [PATCH 07/17] Minor documentation fix. Closes #520. --- ChangeLog.txt | 1 + man/mosquitto.conf.5.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 3f217388..45c1a1dd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,7 @@ Broker: - Remove requirement to use `user root` in snap package config files. - Fix retained messages not sent by bridges on outgoing topics at the first connection. Closes #701. +- Minor documentation fixes. Closes #520. Build: - Various fixes to ease building. diff --git a/man/mosquitto.conf.5.xml b/man/mosquitto.conf.5.xml index 3d171e99..e5901c77 100644 --- a/man/mosquitto.conf.5.xml +++ b/man/mosquitto.conf.5.xml @@ -763,7 +763,7 @@ client connected to a listener with mount point example can only see messages that are published in the topic hierarchy - example and above. + example and below. Not reloaded on reload signal. From f9c9f3d396da95b3bf7375826126bd9102379603 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Sep 2018 13:52:14 +0100 Subject: [PATCH 08/17] Fix incorrect hash usage with duplicate clients. Fix duplicate clients being added to by_id hash before the old client was removed. Closes #645. --- ChangeLog.txt | 2 ++ lib/mosquitto_internal.h | 2 ++ src/context.c | 4 ++++ src/loop.c | 5 +++++ 4 files changed, 13 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 45c1a1dd..bf7e0fb2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,8 @@ Broker: - Fix retained messages not sent by bridges on outgoing topics at the first connection. Closes #701. - Minor documentation fixes. Closes #520. +- Fix duplicate clients being added to by_id hash before the old client was + removed. Closes #645. Build: - Various fixes to ease building. diff --git a/lib/mosquitto_internal.h b/lib/mosquitto_internal.h index de82ec3d..c6b3d6e5 100644 --- a/lib/mosquitto_internal.h +++ b/lib/mosquitto_internal.h @@ -208,6 +208,8 @@ struct mosquitto { #endif bool clean_session; #ifdef WITH_BROKER + char *old_id; /* for when a duplicate client connects, but we still want to + know what the id was */ bool is_dropping; bool is_bridge; struct mosquitto__bridge *bridge; diff --git a/src/context.c b/src/context.c index 495693e9..1d3ae163 100644 --- a/src/context.c +++ b/src/context.c @@ -161,6 +161,10 @@ void context__cleanup(struct mosquitto_db *db, struct mosquitto *context, bool d mosquitto__free(context->id); context->id = NULL; } + if(context->old_id){ + mosquitto__free(context->old_id); + context->old_id = NULL; + } packet__cleanup(&(context->in_packet)); if(context->current_out_packet){ packet__cleanup(context->current_out_packet); diff --git a/src/loop.c b/src/loop.c index 8df41760..97147209 100644 --- a/src/loop.c +++ b/src/loop.c @@ -638,12 +638,17 @@ void do_disconnect(struct mosquitto_db *db, struct mosquitto *context) context->sock = INVALID_SOCKET; context->pollfd_index = -1; } + HASH_DELETE(hh_id, db->contexts_by_id, context); + context->old_id = context->id; + context->id = NULL; }else #endif { if(db->config->connection_messages == true){ if(context->id){ id = context->id; + }else if(context->old_id){ + id = context->old_id; }else{ id = ""; } From d9fc9cd0aea0a7d5ab7fecc6e6bde3163443f19d Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Sep 2018 14:32:43 +0100 Subject: [PATCH 09/17] Add allow_zero_length_clientid, auto_id_prefix documentation. Closes #600. --- ChangeLog.txt | 2 +- man/mosquitto.conf.5.xml | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index bf7e0fb2..18f21359 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,7 +6,7 @@ Broker: - Remove requirement to use `user root` in snap package config files. - Fix retained messages not sent by bridges on outgoing topics at the first connection. Closes #701. -- Minor documentation fixes. Closes #520. +- Documentation fixes. Closes #520, #600. - Fix duplicate clients being added to by_id hash before the old client was removed. Closes #645. diff --git a/man/mosquitto.conf.5.xml b/man/mosquitto.conf.5.xml index e5901c77..a6bf0c99 100644 --- a/man/mosquitto.conf.5.xml +++ b/man/mosquitto.conf.5.xml @@ -195,6 +195,17 @@ Reloaded on reload signal. + + [ true | false ] + + MQTT 3.1.1 allows clients to connect with a zero + length client id and have the broker generate a client + id for them. Use this option to allow/disallow this + behaviour. Defaults to true. + See also the option. + Reloaded on reload signal. + + value @@ -244,6 +255,17 @@ Not currently reloaded on reload signal. + + prefix + + If is + true, this option allows you + to set a string that will be prefixed to the + automatically generated client ids to aid visibility in + logs. Defaults to no prefix. + Reloaded on reload signal. + + seconds From 588d39efdc9ca92926b372481be9f81ee98cba6a Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Sep 2018 16:14:57 +0100 Subject: [PATCH 10/17] Fix Windows version not starting if include_dir did not contain any files. Closes #566. Thanks to marleau. --- ChangeLog.txt | 2 ++ src/conf.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 18f21359..6651a0fe 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -9,6 +9,8 @@ Broker: - Documentation fixes. Closes #520, #600. - Fix duplicate clients being added to by_id hash before the old client was removed. Closes #645. +- Fix Windows version not starting if include_dir did not contain any files. + Closes #566. Build: - Various fixes to ease building. diff --git a/src/conf.c b/src/conf.c index 27a7bacd..367868e5 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1208,8 +1208,8 @@ int config__read_file_core(struct mosquitto__config *config, bool reload, struct snprintf(dirpath, MAX_PATH, "%s\\*.conf", token); fh = FindFirstFile(dirpath, &find_data); if(fh == INVALID_HANDLE_VALUE){ - log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to open include_dir '%s'.", token); - return 1; + /* No files found */ + continue; } do{ From c78003cacfe62cc9a70a5df6485f7aaa04ac4cdb Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 25 Sep 2018 16:26:02 +0100 Subject: [PATCH 11/17] Bump version number, add CVE details. --- CMakeLists.txt | 2 +- ChangeLog.txt | 7 ++++++- config.mk | 2 +- installer/mosquitto.nsi | 2 +- installer/mosquitto64.nsi | 2 +- lib/mosquitto.h | 2 +- set-version.sh | 2 +- snap/snapcraft.yaml | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01d0aaf3..d9a86362 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ project(mosquitto) cmake_minimum_required(VERSION 2.8) # Only for version 3 and up. cmake_policy(SET CMP0042 NEW) -set (VERSION 1.5.2) +set (VERSION 1.5.3) add_definitions (-DCMAKE -DVERSION=\"${VERSION}\") diff --git a/ChangeLog.txt b/ChangeLog.txt index 6651a0fe..18c5514d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,11 @@ -1.5.3 - 201810xx +1.5.3 - 20180925 ================ +Security: +- Fix CVE-2018-12543. If a message is sent to Mosquitto with a topic that + begins with $, but is not $SYS, then an assert that should be unreachable is + triggered and Mosquitto will exit. + Broker: - Elevate log level to warning for situation when socket limit is hit. - Remove requirement to use `user root` in snap package config files. diff --git a/config.mk b/config.mk index 96052346..46ffb6db 100644 --- a/config.mk +++ b/config.mk @@ -102,7 +102,7 @@ WITH_BUNDLED_DEPS:=yes # Also bump lib/mosquitto.h, CMakeLists.txt, # installer/mosquitto.nsi, installer/mosquitto64.nsi -VERSION=1.5.2 +VERSION=1.5.3 # Client library SO version. Bump if incompatible API/ABI changes are made. SOVERSION=1 diff --git a/installer/mosquitto.nsi b/installer/mosquitto.nsi index 3774a511..b97f6f3a 100644 --- a/installer/mosquitto.nsi +++ b/installer/mosquitto.nsi @@ -9,7 +9,7 @@ !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' Name "Eclipse Mosquitto" -!define VERSION 1.5.2 +!define VERSION 1.5.3 OutFile "mosquitto-${VERSION}-install-windows-x86.exe" InstallDir "$PROGRAMFILES\mosquitto" diff --git a/installer/mosquitto64.nsi b/installer/mosquitto64.nsi index 44b2d9c6..59acea1a 100644 --- a/installer/mosquitto64.nsi +++ b/installer/mosquitto64.nsi @@ -9,7 +9,7 @@ !define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' Name "Eclipse Mosquitto" -!define VERSION 1.5.2 +!define VERSION 1.5.3 OutFile "mosquitto-${VERSION}-install-windows-x64.exe" !include "x64.nsh" diff --git a/lib/mosquitto.h b/lib/mosquitto.h index 100ea1a6..3d15666d 100644 --- a/lib/mosquitto.h +++ b/lib/mosquitto.h @@ -47,7 +47,7 @@ extern "C" { #define LIBMOSQUITTO_MAJOR 1 #define LIBMOSQUITTO_MINOR 5 -#define LIBMOSQUITTO_REVISION 2 +#define LIBMOSQUITTO_REVISION 3 /* LIBMOSQUITTO_VERSION_NUMBER looks like 1002001 for e.g. version 1.2.1. */ #define LIBMOSQUITTO_VERSION_NUMBER (LIBMOSQUITTO_MAJOR*1000000+LIBMOSQUITTO_MINOR*1000+LIBMOSQUITTO_REVISION) diff --git a/set-version.sh b/set-version.sh index d504a0bf..522dfa1d 100755 --- a/set-version.sh +++ b/set-version.sh @@ -2,7 +2,7 @@ MAJOR=1 MINOR=5 -REVISION=2 +REVISION=3 sed -i "s/^VERSION=.*/VERSION=${MAJOR}.${MINOR}.${REVISION}/" config.mk diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fa941d80..c7569010 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: mosquitto -version: 1.5.2 +version: 1.5.3 summary: Eclipse Mosquitto MQTT broker description: This is a message broker that supports version 3.1 and 3.1.1 of the MQTT protocol. From 46b943b07711398b0accc0c186fe37bd10242a5a Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 27 Sep 2018 10:48:03 +0100 Subject: [PATCH 12/17] Add website post and update downloads/security. --- www/pages/download.md | 10 ++-- www/pages/security.md | 4 ++ .../09/security-advisory-cve-2018-12543.md | 59 +++++++++++++++++++ 3 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 www/posts/2018/09/security-advisory-cve-2018-12543.md diff --git a/www/pages/download.md b/www/pages/download.md index 1adf994f..51c1b90c 100644 --- a/www/pages/download.md +++ b/www/pages/download.md @@ -11,8 +11,8 @@ # Source -* [mosquitto-1.5.2.tar.gz](http://mosquitto.org/files/source/mosquitto-1.5.2.tar.gz) (319kB) ([GPG signature](http://mosquitto.org/files/source/mosquitto-1.5.1.tar.gz.asc)) -* [mosquitto-1.5.2.tar.gz](http://www.eclipse.org/downloads/download.php?file=/mosquitto/source/mosquitto-1.5.2.tar.gz) (via Eclipse) +* [mosquitto-1.5.3.tar.gz](http://mosquitto.org/files/source/mosquitto-1.5.3.tar.gz) (319kB) ([GPG signature](http://mosquitto.org/files/source/mosquitto-1.5.3.tar.gz.asc)) +* [mosquitto-1.5.3.tar.gz](http://www.eclipse.org/downloads/download.php?file=/mosquitto/source/mosquitto-1.5.3.tar.gz) (via Eclipse) * [Git source code repository](https://github.com/eclipse/mosquitto) (github.com) Older downloads are available at [http://mosquitto.org/files/](../files/) @@ -25,10 +25,8 @@ distributions. ## Windows -* [mosquitto-1.5.2-install-windows-x64.exe](http://www.eclipse.org/downloads/download.php?file=/mosquitto/binary/win64/mosquitto-1.5.2-install-windows-x64.exe) (~360 kB) (64-bit build, Windows Vista and up, built with Visual Studio Community 2017) -* [mosquitto-1.5.2-install-windows-x32.exe](http://www.eclipse.org/downloads/download.php?file=/mosquitto/binary/win32/mosquitto-1.5.2-install-windows-x86.exe) (~360 kB) (32-bit build, Windows Vista and up, built with Visual Studio Community 2017) - -You will also need to install Win64 OpenSSL v1.1.0 Light or Win32OpenSSL v1.1.0 Light from [slproweb.com](http://slproweb.com/products/Win32OpenSSL.html) +* [mosquitto-1.5.3-install-windows-x64.exe](http://www.eclipse.org/downloads/download.php?file=/mosquitto/binary/win64/mosquitto-1.5.3-install-windows-x64.exe) (~360 kB) (64-bit build, Windows Vista and up, built with Visual Studio Community 2017) +* [mosquitto-1.5.3-install-windows-x32.exe](http://www.eclipse.org/downloads/download.php?file=/mosquitto/binary/win32/mosquitto-1.5.3-install-windows-x86.exe) (~360 kB) (32-bit build, Windows Vista and up, built with Visual Studio Community 2017) See also readme-windows.txt after installing. diff --git a/www/pages/security.md b/www/pages/security.md index 466c7a52..c31eb300 100644 --- a/www/pages/security.md +++ b/www/pages/security.md @@ -19,6 +19,8 @@ follow the steps on [Eclipse Security] page to report it. Listed with most recent first. Further information on security related issues can be found in the [security category]. +* September 2018: [CVE-2018-12543] affecting versions **1.5** to **1.5.2** + inclusive, fixed in **1.5.3**. * April 2018: [CVE-2017-7655] affecting versions **1.0** to **1.4.15** inclusive, fixed in **1.5**. * April 2018: [CVE-2017-7654] affecting versions **1.0** to **1.4.15** @@ -40,6 +42,7 @@ can be found in the [security category]. [security-advisory-cve-2017-7650]. +[security-advisory-cve-2018-12543]: /2018/09/security-advisory-cve-2018-12543/ [security-advisory-cve-2017-7651-cve-2017-7652]: /2018/02/security-advisory-cve-2017-7651-cve-2017-7652/ [security-advisory-cve-2017-7650]: /2017/05/security-advisory-cve-2017-7650/ [security-advisory-cve-2017-9868]: /2017/06/security-advisory-cve-2017-9868/ @@ -47,6 +50,7 @@ can be found in the [security category]. [Eclipse Security]: https://www.eclipse.org/security/ [security category]: /blog/categories/security/ +[CVE-2018-12543]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12543 [CVE-2017-9868]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9868 [CVE-2017-7655]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7652 [CVE-2017-7654]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7652 diff --git a/www/posts/2018/09/security-advisory-cve-2018-12543.md b/www/posts/2018/09/security-advisory-cve-2018-12543.md new file mode 100644 index 00000000..0e33b4ef --- /dev/null +++ b/www/posts/2018/09/security-advisory-cve-2018-12543.md @@ -0,0 +1,59 @@ + + +Mosquitto 1.5.3 has been released to address a security vulnerability. It also +includes other bug fixes. + +# CVE-2018-12543 + +A vulnerability exists in Mosquitto versions 1.5 to 1.5.2 inclusive, known as +[CVE-2018-12543]. + +If a message received by the broker has a topic that begins with `$`, but that +does not begin `$SYS`, an assert is triggered that should otherwise not be +accessible, causing Mosquitto to exit. + +The issue is fixed in Mosquitto 1.5.3. Patches for older versions are +available at + +The fix addresses the problem by reverting a commit that intended to remove +some unused checks, but also stopped part of the topic hierarchy being created. + +# Version 1.5.3 Changes + +The complete list of fixes addressed in version 1.5.3 is: + +## Security + +* Fix [CVE-2018-12543]. If a message is sent to Mosquitto with a topic that + begins with `$`, but is not `$SYS`, then an assert that should be unreachable + is triggered and Mosquitto will exit. + +## Broker +* Elevate log level to warning for situation when socket limit is hit. +* Remove requirement to use `user root` in snap package config files. +* Fix retained messages not sent by bridges on outgoing topics at the first + connection. Closes [#701]. +* Documentation fixes. Closes [#520], [#600]. +* Fix duplicate clients being added to by_id hash before the old client was + removed. Closes [#645]. +* Fix Windows version not starting if `include_dir` did not contain any files. + Closes [#566]. + +## Build +* Various fixes to ease building. + +[CVE-2018-12543]: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12543 +[#520]: https://github.com/eclipse/mosquitto/issues/520 +[#566]: https://github.com/eclipse/mosquitto/issues/566 +[#600]: https://github.com/eclipse/mosquitto/issues/600 +[#645]: https://github.com/eclipse/mosquitto/issues/645 +[#701]: https://github.com/eclipse/mosquitto/issues/701 From 5898cc9aee351872446cf66d166d69d697b1a853 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Date: Fri, 28 Sep 2018 21:17:47 +0530 Subject: [PATCH 13/17] update links for signing ECA, fix indentation Signed-off-by: Vinod Kumar --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8680acd1..550c13b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,9 +32,9 @@ Foundation IP policy. Please read the [Eclipse Foundation policy on accepting contributions via Git](http://wiki.eclipse.org/Development_Resources/Contributing_via_Git). 1. Sign the [Eclipse ECA](http://www.eclipse.org/legal/ECA.php) - 1. Register for an Eclipse Foundation User ID. You can register [here](https://dev.eclipse.org/site_login/createaccount.php). - 2. Log into the [Projects Portal](https://projects.eclipse.org/), and click on the '[Eclipse ECA](https://projects.eclipse.org/user/sign/eca)' link. -2. Go to your [account settings](https://dev.eclipse.org/site_login/myaccount.php#open_tab_accountsettings) and add your GitHub username to your account. + 1. Register for an Eclipse Foundation User ID. You can register [here](https://accounts.eclipse.org/user/register). + 2. Log into the [Accounts Portal](https://accounts.eclipse.org/), and click on the '[Eclipse Contributor Agreement](https://accounts.eclipse.org/user/eca)' link. +2. Go to your [account settings](https://accounts.eclipse.org/user/edit) and add your GitHub username to your account. 3. Make sure that you _sign-off_ your Git commits in the following format: ``` Signed-off-by: John Smith ``` This is usually at the bottom of the commit message. You can automate this by adding the '-s' flag when you make the commits. e.g. ```git commit -s -m "Adding a cool feature"``` 4. Ensure that the email address that you make your commits with is the same one you used to sign up to the Eclipse Foundation website with. From 3be1badef0a4bf5bbdc55fc24b881f5296a16342 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 2 Oct 2018 23:54:24 +0100 Subject: [PATCH 14/17] Include mosquitto_passwd in snap. --- snap/snapcraft.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index c7569010..3f36dcb4 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -26,6 +26,9 @@ apps: command: usr/bin/mosquitto_sub plugs: [network] + passwd: + command: usr/bin/mosquitto_passwd + parts: script: From 1690f760e408cfa454388fe028f7be7c4703b958 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 2 Oct 2018 23:56:19 +0100 Subject: [PATCH 15/17] Add header files to snap. --- snap/snapcraft.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 3f36dcb4..5f59fcfa 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -70,6 +70,9 @@ parts: - lib/*-linux-gnu/libcrypto.so* - lib/*-linux-gnu/libssl.so* - lib/*-linux-gnu/libuuid.so* + - usr/include/mosquitto.h + - usr/include/mosquitto_broker.h + - usr/include/mosquitto_plugin.h lws: plugin: cmake From f6c19b773a245da1265c846ee74a46496412040c Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 2 Oct 2018 23:58:11 +0100 Subject: [PATCH 16/17] Bump snap version. --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5f59fcfa..e5bb7125 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: mosquitto -version: 1.5.3 +version: 1.5.3-1 summary: Eclipse Mosquitto MQTT broker description: This is a message broker that supports version 3.1 and 3.1.1 of the MQTT protocol. From 07d59d20e25b228bb3500ad93a6bd2fb167b752d Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 3 Oct 2018 08:11:46 +0100 Subject: [PATCH 17/17] Add missing line. --- snap/snapcraft.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e5bb7125..f3a6d1cf 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -66,6 +66,7 @@ parts: - usr/sbin/mosquitto - usr/bin/mosquitto_pub - usr/bin/mosquitto_sub + - usr/bin/mosquitto_passwd - usr/lib/libmosquitto.so* - lib/*-linux-gnu/libcrypto.so* - lib/*-linux-gnu/libssl.so*