From 159e12381fad71303a590c4c86e1b88e56829784 Mon Sep 17 00:00:00 2001 From: Huangbin Zhan Date: Tue, 2 Nov 2021 20:56:29 +0800 Subject: [PATCH] openssh: keep same permission for /etc/ssh Signed-off-by: Huangbin Zhan --- net/openssh/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/openssh/Makefile b/net/openssh/Makefile index 93e32d180..ec7fbb00e 100644 --- a/net/openssh/Makefile +++ b/net/openssh/Makefile @@ -197,13 +197,12 @@ define Build/Compile endef define Package/openssh-moduli/install - $(INSTALL_DIR) $(1)/etc/ssh + install -d -m0700 $(1)/etc/ssh $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/ endef define Package/openssh-client/install - $(INSTALL_DIR) $(1)/etc/ssh - chmod 0700 $(1)/etc/ssh + install -d -m0700 $(1)/etc/ssh $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/ $(INSTALL_DIR) $(1)/usr/libexec $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/libexec/ssh-openssh @@ -221,8 +220,7 @@ define Package/openssh-keygen/install endef define Package/openssh-server/install - $(INSTALL_DIR) $(1)/etc/ssh - chmod 0700 $(1)/etc/ssh + install -d -m0700 $(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 $(INSTALL_DIR) $(1)/etc/init.d