From 853b5ec8bc8f718992733224b86cff2c66ef5909 Mon Sep 17 00:00:00 2001 From: Sukru Senli Date: Tue, 28 Oct 2025 15:15:27 +0100 Subject: [PATCH] rename mosquitto-auth-shadow to mosquitto-auth-plugin (cherry picked from commit ba5e332b0df59910e045551ff6943e72acad8fbf) --- .../Config.in | 2 +- .../Makefile | 14 +++++++------- .../etc/uci-defaults/14_set-shadow-permissions | 0 .../src/Makefile | 4 ++-- .../src/mosquitto_auth_plugin.c | 0 5 files changed, 10 insertions(+), 10 deletions(-) rename {mosquitto-auth-shadow => mosquitto-auth-plugin}/Config.in (77%) rename {mosquitto-auth-shadow => mosquitto-auth-plugin}/Makefile (76%) rename {mosquitto-auth-shadow => mosquitto-auth-plugin}/files/etc/uci-defaults/14_set-shadow-permissions (100%) rename {mosquitto-auth-shadow => mosquitto-auth-plugin}/src/Makefile (85%) rename mosquitto-auth-shadow/src/mosquitto_auth_shadow.c => mosquitto-auth-plugin/src/mosquitto_auth_plugin.c (100%) diff --git a/mosquitto-auth-shadow/Config.in b/mosquitto-auth-plugin/Config.in similarity index 77% rename from mosquitto-auth-shadow/Config.in rename to mosquitto-auth-plugin/Config.in index c82ff37af..5f8a4f0e3 100644 --- a/mosquitto-auth-shadow/Config.in +++ b/mosquitto-auth-plugin/Config.in @@ -1,4 +1,4 @@ -if PACKAGE_mosquitto-auth-shadow +if PACKAGE_mosquitto-auth-plugin config MOSQUITTO_AUTH_PAM_SUPPORT bool "Enable support of Linux PAM module for Authentication" diff --git a/mosquitto-auth-shadow/Makefile b/mosquitto-auth-plugin/Makefile similarity index 76% rename from mosquitto-auth-shadow/Makefile rename to mosquitto-auth-plugin/Makefile index 98d1c95a2..1273fda1c 100644 --- a/mosquitto-auth-shadow/Makefile +++ b/mosquitto-auth-plugin/Makefile @@ -13,7 +13,7 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=mosquitto-auth-shadow +PKG_NAME:=mosquitto-auth-plugin PKG_VERSION:=1.1.0 PKG_MAINTAINER:=Erik Karlsson @@ -24,7 +24,7 @@ PKG_CONFIG_DEPENDS:=CONFIG_MOSQUITTO_AUTH_PAM_SUPPORT include $(INCLUDE_DIR)/package.mk -define Package/mosquitto-auth-shadow +define Package/mosquitto-auth-plugin SECTION:=net CATEGORY:=Network TITLE:=mosquitto - /etc/shadow authentication plugin @@ -32,12 +32,12 @@ define Package/mosquitto-auth-shadow USERID:=mosquitto=200:mosquitto=200 mosquitto=200:shadow=11 endef -define Package/mosquitto-auth-shadow/description +define Package/mosquitto-auth-plugin/description Plugin for the mosquitto MQTT message broker that authenticates users using /etc/shadow endef -define Package/mosquitto-auth-shadow/config +define Package/mosquitto-auth-plugin/config source "$(SOURCE)/Config.in" endef @@ -45,10 +45,10 @@ ifeq ($(CONFIG_MOSQUITTO_AUTH_PAM_SUPPORT),y) TARGET_CFLAGS+=-DENABLE_PAM_SUPPORT endif -define Package/mosquitto-auth-shadow/install +define Package/mosquitto-auth-plugin/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto_auth_shadow.so $(1)/usr/lib/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto_auth_plugin.so $(1)/usr/lib/ $(CP) ./files/* $(1)/ endef -$(eval $(call BuildPackage,mosquitto-auth-shadow)) +$(eval $(call BuildPackage,mosquitto-auth-plugin)) diff --git a/mosquitto-auth-shadow/files/etc/uci-defaults/14_set-shadow-permissions b/mosquitto-auth-plugin/files/etc/uci-defaults/14_set-shadow-permissions similarity index 100% rename from mosquitto-auth-shadow/files/etc/uci-defaults/14_set-shadow-permissions rename to mosquitto-auth-plugin/files/etc/uci-defaults/14_set-shadow-permissions diff --git a/mosquitto-auth-shadow/src/Makefile b/mosquitto-auth-plugin/src/Makefile similarity index 85% rename from mosquitto-auth-shadow/src/Makefile rename to mosquitto-auth-plugin/src/Makefile index 3e5e20ab3..600b7453b 100644 --- a/mosquitto-auth-shadow/src/Makefile +++ b/mosquitto-auth-plugin/src/Makefile @@ -11,14 +11,14 @@ # Erik Karlsson - initial implementation # -TARGETS = mosquitto_auth_shadow.so +TARGETS = mosquitto_auth_plugin.so all: $(TARGETS) %.pic.o: %.c $(CC) $(CFLAGS) -Wall -Werror -fPIC -c -o $@ $< -mosquitto_auth_shadow.so: mosquitto_auth_shadow.pic.o +mosquitto_auth_plugin.so: mosquitto_auth_plugin.pic.o $(CC) $(LDFLAGS) -shared -o $@ $^ $(if $(filter -DENABLE_PAM_SUPPORT,$(CFLAGS)),-lpam) clean: diff --git a/mosquitto-auth-shadow/src/mosquitto_auth_shadow.c b/mosquitto-auth-plugin/src/mosquitto_auth_plugin.c similarity index 100% rename from mosquitto-auth-shadow/src/mosquitto_auth_shadow.c rename to mosquitto-auth-plugin/src/mosquitto_auth_plugin.c