treewide: install configs with INSTALL_CONF (0600)
authorJosef Schlehofer <[email protected]>
Mon, 16 Jun 2025 20:40:05 +0000 (22:40 +0200)
committerJosef Schlehofer <[email protected]>
Mon, 10 Nov 2025 09:38:36 +0000 (10:38 +0100)
Use INSTALL_CONF instead of INSTALL_DATA to install configuration
 files under /etc with correct permissions.

This improves security by ensuring config files are not world-readable.
INSTALL_DATA sets mode 0644, while INSTALL_CONF sets mode 0600.

Signed-off-by: Josef Schlehofer <[email protected]>
batmand/Makefile
bmx7/Makefile
luci-app-olsrd2/Makefile
naywatch/Makefile
olsrd/Makefile
opennds/Makefile
vis/Makefile

index 4db95a5e0261dab1a4b797f79852f8176bc9efb4..90eba50d46aaebd43a26468d8c71437cd8874205 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batmand
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.open-mesh.org/batmand.git
@@ -47,7 +47,7 @@ define Package/batmand/install
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/batmand $(1)/usr/sbin/
        $(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d
-       $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config
+       $(INSTALL_CONF) ./files/etc/config/batmand $(1)/etc/config
 endef
 
 define Package/batmand/conffiles
index b1634cccb9a43283d68e390ff51921b76eba490f..b560d520e60d5ec3499e0b02a07d6483978c5ce5 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bmx7
 PKG_VERSION:=2024.06.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
@@ -116,7 +116,7 @@ define Package/bmx7-uci-config/install
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/lib/bmx7_uci_config/bmx7_config.so \
                $(1)/usr/lib/bmx7_config.so
        $(INSTALL_BIN) ./files/etc/init.d/bmx7 $(1)/etc/init.d/bmx7
-       $(INSTALL_DATA) ./files/etc/config/bmx7 $(1)/etc/config/bmx7
+       $(INSTALL_CONF) ./files/etc/config/bmx7 $(1)/etc/config/bmx7
 endef
 
 define Package/bmx7-iwinfo/install
index a14543ecf24281d1400b2a4c8323d06422d1af70..ab9cb2e2c344717d70a4f4e1b1ec16615a7e2d85 100644 (file)
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-olsrd2
 PKG_VERSION:=0.2.6
-PKG_RELEASE:=16
+PKG_RELEASE:=17
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
@@ -41,7 +41,7 @@ define Package/$(PKG_NAME)/install
        $(INSTALL_DATA) ./htdocs/cgi-bin-olsrd2-neigh.html $(1)/www
        $(INSTALL_DATA) ./htdocs/luci-static/resources/view/olsrd2/* $(1)/www/luci-static/resources/view/olsrd2
        $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_DATA) ./root/etc/config/* $(1)/etc/config
+       $(INSTALL_CONF) ./root/etc/config/* $(1)/etc/config
        $(INSTALL_DIR) $(1)/usr/share/ucitrack
        $(INSTALL_DATA) ./root/usr/share/ucitrack/luci-app-olsrd2.json $(1)/usr/share/ucitrack
        $(INSTALL_DIR) $(1)/usr/libexec/rpcd
index c0e18673acc10bbc1c797e881d61397d159a07b2..bc741097669fa44bd875d3c7b3c793d987c30ade 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=naywatch
 PKG_VERSION:=1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_MAINTAINER:=Nick Hainke <[email protected]>
 PKG_LICENSE:=GPL-2.0-only
@@ -44,7 +44,7 @@ define Package/naywatch/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) ./files/naywatch.sh $(1)/usr/bin/naywatch
        $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_DATA) ./files/naywatch.config $(1)/etc/config/naywatch
+       $(INSTALL_CONF) ./files/naywatch.config $(1)/etc/config/naywatch
 endef
 
 $(eval $(call BuildPackage,naywatch))
index a938bf58f4d99b6a81cac92c718f9f72aac3aca5..09a1abd0cc8057862942ccd020e4dfc787f0de5e 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=olsrd
 PKG_SOURCE_DATE:=2024-06-09
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/OLSR/olsrd.git
@@ -192,8 +192,8 @@ define Package/olsrd/install
        $(INSTALL_DIR) $(1)/lib/functions
        $(INSTALL_DATA) ./files/olsrd.sh $(1)/lib/functions/olsrd.sh
        $(INSTALL_DIR) $(1)/etc/config
-       $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd
-       $(INSTALL_DATA) ./files/olsrd6.config $(1)/etc/config/olsrd6
+       $(INSTALL_CONF) ./files/olsrd.config $(1)/etc/config/olsrd
+       $(INSTALL_CONF) ./files/olsrd6.config $(1)/etc/config/olsrd6
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/init.d
index bc2a339bf76ac910d74494ca38cab81245dc0309..edda12e0f864f8b66f1dc81bce0775f3ce055ea4 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opennds
 PKG_VERSION:=10.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/opennds/opennds/tar.gz/v$(PKG_VERSION)?
@@ -53,7 +53,7 @@ define Package/opennds/install
        $(INSTALL_DIR) $(1)/usr/lib/opennds
        $(CP) $(PKG_BUILD_DIR)/resources/splash.css $(1)/etc/opennds/htdocs/
        $(CP) $(PKG_BUILD_DIR)/resources/splash.jpg $(1)/etc/opennds/htdocs/images/
-       $(CP) $(PKG_BUILD_DIR)/linux_openwrt/opennds/files/etc/config/opennds $(1)/etc/config/
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/linux_openwrt/opennds/files/etc/config/opennds $(1)/etc/config/
        $(CP) $(PKG_BUILD_DIR)/linux_openwrt/opennds/files/etc/config/opennds $(1)/etc/opennds/config.uci
        $(CP) $(PKG_BUILD_DIR)/linux_openwrt/opennds/files/etc/init.d/opennds $(1)/etc/init.d/
        $(CP) $(PKG_BUILD_DIR)/linux_openwrt/opennds/files/etc/uci-defaults/40_opennds $(1)/etc/uci-defaults/
index 3cf9dfbd72680bd939e58c0e3746fdef0177a9fc..ff1d608cc29a753980bfd717c915771a8b758586 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=vis
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2013-04-07
@@ -46,7 +46,7 @@ define Package/vis/install
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/vis $(1)/usr/sbin/
        $(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d
-       $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config
+       $(INSTALL_CONF) ./files/etc/config/vis $(1)/etc/config
 endef
 
 define Package/vis/conffiles