From c9ed2708f644206c3d8f32b3384c514afcb2f323 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 4 Dec 2018 20:51:25 +0000 Subject: [PATCH] Don't reload auth_opt_ options on reload. This matches the behaviour of the other plugin options. Closes #1068. Thanks to Jason McFadyen. Bug: https://github.com/eclipse/mosquitto/issues/1068 --- ChangeLog.txt | 2 ++ src/conf.c | 1 + 2 files changed, 3 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index f79c5277f5..e80a1d40f2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -11,6 +11,8 @@ Broker: network is down. Closes #1062. - Fix outgoing retained messages not being sent by bridges on initial connection. Closes #1040. +- Don't reload auth_opt_ options on reload, to match the behaviour of the + other plugin options. Closes #1068. Library: - Fix reconnect delay backoff behaviour. Closes #1027. diff --git a/src/conf.c b/src/conf.c index c6bd897cb9..67e172b00a 100644 --- a/src/conf.c +++ b/src/conf.c @@ -818,6 +818,7 @@ int config__read_file_core(struct mosquitto__config *config, bool reload, struct conf__set_cur_security_options(config, cur_listener, &cur_security_options); if(conf__parse_bool(&token, "allow_zero_length_clientid", &cur_security_options->allow_zero_length_clientid, saveptr)) return MOSQ_ERR_INVAL; }else if(!strncmp(token, "auth_opt_", 9)){ + if(reload) continue; // Auth plugin not currently valid for reloading. if(!cur_auth_plugin_config){ log__printf(NULL, MOSQ_LOG_ERR, "Error: An auth_opt_ option exists in the config file without an auth_plugin."); return MOSQ_ERR_INVAL;