openssh: wrong permissions on /etc/ssh

For users to make use of system-wide settings, the /etc/ssh/
directory and its contents need to be world readable.

Fixes: #26608
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
Philip Prindeville
2025-06-07 12:16:34 -06:00
parent 5c7ac5c468
commit 023b7bf21f

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openssh PKG_NAME:=openssh
PKG_REALVERSION:=10.0p1 PKG_REALVERSION:=10.0p1
PKG_VERSION:=10.0_p1 PKG_VERSION:=10.0_p1
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_REALVERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_REALVERSION).tar.gz
PKG_SOURCE_URL:=https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ PKG_SOURCE_URL:=https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
@@ -211,12 +211,12 @@ define Build/Compile
endef endef
define Package/openssh-moduli/install define Package/openssh-moduli/install
install -d -m0700 $(1)/etc/ssh install -d -m0755 $(1)/etc/ssh
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/
endef endef
define Package/openssh-client/install define Package/openssh-client/install
install -d -m0700 $(1)/etc/ssh install -d -m0755 $(1)/etc/ssh
$(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/ $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/
$(INSTALL_DIR) $(1)/usr/libexec $(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/libexec/ssh-openssh $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/libexec/ssh-openssh
@@ -239,7 +239,7 @@ define Package/openssh-sk-helper/install
endef endef
define Package/openssh-server/install define Package/openssh-server/install
install -d -m0700 $(1)/etc/ssh $(1)/etc/ssh/sshd_config.d install -d -m0755 $(1)/etc/ssh $(1)/etc/ssh/sshd_config.d
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/
sed -r -i 's,^#(HostKey /etc/ssh/ssh_host_(rsa|ed25519)_key)$$$$,\1,' $(1)/etc/ssh/sshd_config sed -r -i 's,^#(HostKey /etc/ssh/ssh_host_(rsa|ed25519)_key)$$$$,\1,' $(1)/etc/ssh/sshd_config
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d