From bb61cd2deed58d4f689f202220ca8f932c73cd5a Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Mon, 19 Jun 2017 18:31:58 +0100 Subject: [PATCH] Fix merge error. --- src/conf.c | 2 +- src/security.c | 8 ++++---- src/security_default.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/conf.c b/src/conf.c index dfb9c982..2c34ac46 100644 --- a/src/conf.c +++ b/src/conf.c @@ -956,7 +956,7 @@ int config__read_file_core(struct mosquitto__config *config, bool reload, const /* Check for existing bridge name. */ for(i=0; ibridge_count; i++){ if(!strcmp(config->bridges[i].name, token)){ - _mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Duplicate bridge name \"%s\".", token); + log__printf(NULL, MOSQ_LOG_ERR, "Error: Duplicate bridge name \"%s\".", token); return MOSQ_ERR_INVAL; } } diff --git a/src/security.c b/src/security.c index 7b825812..a36560f9 100644 --- a/src/security.c +++ b/src/security.c @@ -353,7 +353,7 @@ int mosquitto_acl_check(struct mosquitto_db *db, struct mosquitto *context, cons int rc; int i; struct mosquitto_acl_msg msg; - char *username; + const char *username; if(!context->id){ return MOSQ_ERR_ACL_DENIED; @@ -371,7 +371,7 @@ int mosquitto_acl_check(struct mosquitto_db *db, struct mosquitto *context, cons memset(&msg, 0, sizeof(msg)); msg.topic = topic; - username = mosquito_client_username(context); + username = mosquitto_client_username(context); /* Check whether the client id or username contains a +, # or / and if * so deny access. * @@ -379,11 +379,11 @@ int mosquitto_acl_check(struct mosquitto_db *db, struct mosquitto *context, cons * plugins against possible pattern based attacks. */ if(username && strpbrk(username, "+#/")){ - _mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", username); + log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", username); return MOSQ_ERR_ACL_DENIED; } if(context->id && strpbrk(context->id, "+#/")){ - _mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id); + log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id); return MOSQ_ERR_ACL_DENIED; } diff --git a/src/security_default.c b/src/security_default.c index 86933a0d..dcb3f4ab 100644 --- a/src/security_default.c +++ b/src/security_default.c @@ -273,12 +273,12 @@ int mosquitto_acl_check_default(struct mosquitto_db *db, struct mosquitto *conte * publish or receive messages to its own place in the hierarchy). */ if(context->username && strpbrk(context->username, "+#/")){ - _mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", context->username); + log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous username \"%s\"", context->username); return MOSQ_ERR_ACL_DENIED; } if(context->id && strpbrk(context->id, "+#/")){ - _mosquitto_log_printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id); + log__printf(NULL, MOSQ_LOG_NOTICE, "ACL denying access to client with dangerous client id \"%s\"", context->id); return MOSQ_ERR_ACL_DENIED; } }