From patchwork Thu Jun 21 18:52:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 932881 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Vo1Pd8mu"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DCtuRyx9"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41BW6W5fPDz9s01 for ; Fri, 22 Jun 2018 04:52:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4P38J01Ou9NjYbAAGfWooJ+7j3l3Hd96Uuhturad+AE=; b=Vo1Pd8mu4u3XXYSBWSPV2Cl/bt 5I0IKxUZFh3v6E5IE3FxrdP1vHA/YBuL8CYHTrUv3z0Xn/WhDjUNfhKAnBMBC8cleFauibIaxFlxi ZoulCz0r9Jf3mUuodT9DTOwFdLirq1aT1KVFIcZYf4SV+2lJ35vr3zi7H3fyxZDYqFuG8daTZxkKS tM6df19J5i390nxB1lSlAg+czTbCStO2kmUPWISL3P+l4UzUbLI/Lbtd41fk1QAI9J/95dyfI87PA 7pAvVRFZsABxZoUyD0nd3KNIiNiVXRHP1yYtBMJudw8lqFJt9UCMcMkdmEY7kKecXx361t/jxWax8 q75Bqa6g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW4hL-0007Xo-G9; Thu, 21 Jun 2018 18:52:47 +0000 Received: from mail-pl0-x235.google.com ([2607:f8b0:400e:c01::235]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fW4hI-0007X4-13 for lede-dev@lists.infradead.org; Thu, 21 Jun 2018 18:52:45 +0000 Received: by mail-pl0-x235.google.com with SMTP id k1-v6so2147936plt.2 for ; Thu, 21 Jun 2018 11:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=IZxvHvqvIt//cdKjHCEZMeQtkdGe+SwFkb7r5cm0cyQ=; b=DCtuRyx90y12nNyW0zLB6HQC1je2Oj0PFLC8dShKzEAUrgqex8D7GHyqsPFBUJ4zxF YLbmA1mlfLPBJZvkKKTQ4hN3IiAjvH6hVXfw7EUmYnK9HRSIXWPpvLXU7wB9rN53rpXR 3aP39w1dDG07hI/W762mxFca8nySYiEMxjojDv+tVYL97tDbZ84FL+gc9N7hrHP6SpsB 4POfuFMjlMTwN/i8nBC+BVmDpgOSTBTZRfJagLswfrW5K+OxTtNlTCFjlz9nFGSAxA6k D4KEOo/tU9TgUX0WtTJ2uFrpyJL2LwNR7dIdKr1KpvhefddWwEekvTJ7/P9+BcRhCyoe PErw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=IZxvHvqvIt//cdKjHCEZMeQtkdGe+SwFkb7r5cm0cyQ=; b=VY6xFrEpDHNX6yfaGNEsSTJRss9u9HIMIXsxu4mfn/IpkMJi5iUpNNTdYiEP5ZFSQc zB+cCOIDN72ZXKxz7Z9dsW9IAVFT/JYocV/FFGnKv7JO3RPal9AbaX7BYattpP8rDRJo s05fhsmHBSizHtam7VWqgMjDRFIl5YQYoNlbJ2gAQVvMvpejKdYxPvCtehfjoaTenp4f qseqfCVFGwEF8E/AbAE8z0usJXPrQZaKdwipyp0Nb9lbqDl/tpRjOkGRYAAhpY+Uyqru XdLo1yLYbsRc/j3PwfPVe50uQqV64x7kwv8bFGkEWKiy5Zy9sC1S7KW8lepOBs/I+ZJn U4kA== X-Gm-Message-State: APt69E3LQSNNBqVWl5Rajt2LtPEpbuCBLUK0RoxyeLGf+eFJUysPtfJS kLylNKJxnn21diRDRIBRHoujj62C X-Google-Smtp-Source: ADUXVKI2AQjEva+1fbjaMp9Jhm4pELhGL0hz8DJqRUvko2+C3m42Q40pO88MpIkD3Sl26hHimmKrLw== X-Received: by 2002:a17:902:1566:: with SMTP id b35-v6mr29973018plh.107.1529607152646; Thu, 21 Jun 2018 11:52:32 -0700 (PDT) Received: from clevo-mangix.lan ([2001:470:1f05:c3e::a1e]) by smtp.gmail.com with ESMTPSA id 185-v6sm2648160pgd.52.2018.06.21.11.52.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Jun 2018 11:52:32 -0700 (PDT) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Date: Thu, 21 Jun 2018 11:52:30 -0700 Message-Id: <20180621185230.9046-1-rosenp@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180617030636.19021-1-rosenp@gmail.com> References: <20180617030636.19021-1-rosenp@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180621_115244_120761_8D4021D5 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: 1.3 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c01:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rosenp[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list Subject: [OpenWrt-Devel] [PATCHv2] dropbear: Install to /(s)bin instead of /usr so OpenSSH can coexist X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org If you run opkg install openssh-client and then remove it, the ssh client symlink that was initially there goes away. This avoids that problem. Signed-off-by: Rosen Penev --- v2: Fixed new key generation package/network/services/dropbear/Makefile | 18 +++++++++--------- .../services/dropbear/files/dropbear.init | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 21ac09f724..41f51b284b 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dropbear PKG_VERSION:=2017.75 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ @@ -57,7 +57,7 @@ endef define Package/dropbear/conffiles /etc/dropbear/dropbear_rsa_host_key -/etc/config/dropbear +/etc/config/dropbear endef define Package/dropbearconvert @@ -128,13 +128,13 @@ define Build/Compile endef define Package/dropbear/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear - $(INSTALL_DIR) $(1)/usr/bin - $(LN) ../sbin/dropbear $(1)/usr/bin/scp - $(LN) ../sbin/dropbear $(1)/usr/bin/ssh - $(LN) ../sbin/dropbear $(1)/usr/bin/dbclient - $(LN) ../sbin/dropbear $(1)/usr/bin/dropbearkey + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/sbin/dropbear + $(INSTALL_DIR) $(1)/bin + $(LN) ../sbin/dropbear $(1)/bin/scp + $(LN) ../sbin/dropbear $(1)/bin/ssh + $(LN) ../sbin/dropbear $(1)/bin/dbclient + $(LN) ../sbin/dropbear $(1)/bin/dropbearkey $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./files/dropbear.config $(1)/etc/config/dropbear $(INSTALL_DIR) $(1)/etc/init.d diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init index 2225113498..e40cdb2bd5 100755 --- a/package/network/services/dropbear/files/dropbear.init +++ b/package/network/services/dropbear/files/dropbear.init @@ -6,7 +6,7 @@ START=50 STOP=50 USE_PROCD=1 -PROG=/usr/sbin/dropbear +PROG=/sbin/dropbear NAME=dropbear PIDCOUNT=0 EXTRA_COMMANDS="killclients" @@ -96,8 +96,8 @@ keygen() [ -f /tmp/$key -o -s /etc/$key ] || { # generate missing keys mkdir -p /tmp/dropbear - [ -x /usr/bin/dropbearkey ] && { - /usr/bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start + [ -x /bin/dropbearkey ] && { + /bin/dropbearkey -t $keytype -f /tmp/$key 2>&- >&- && exec /etc/rc.common "$initscript" start } & exit 0 }