From patchwork Wed Jan 17 17:44:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 862439 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=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zMDxg3h3Fz9s7f for ; Thu, 18 Jan 2018 04:44:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E81023029A; Wed, 17 Jan 2018 17:44:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w669s862635t; Wed, 17 Jan 2018 17:44:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0169C30243; Wed, 17 Jan 2018 17:44:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 691BC1C01EF for ; Wed, 17 Jan 2018 17:44:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 64B9888FA0 for ; Wed, 17 Jan 2018 17:44:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sqSbwpbO3F8a for ; Wed, 17 Jan 2018 17:44:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from idris.smile.fr (idris.smile.fr [91.216.209.19]) by whitealder.osuosl.org (Postfix) with ESMTPS id 10AAB89023 for ; Wed, 17 Jan 2018 17:44:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id B0A8F1EE2BD1; Wed, 17 Jan 2018 18:44:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at smile.fr Received: from idris.smile.fr ([127.0.0.1]) by localhost (bluemind-mta.prod.vitry.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rau3qLO54fN0; Wed, 17 Jan 2018 18:44:25 +0100 (CET) Received: from P-ASN-Evian-romnao.idf.intranet (static-css-ccs-204145.business.bouyguestelecom.com [176.157.204.145]) by idris.smile.fr (Postfix) with ESMTPSA id 871AA1EE2BE3; Wed, 17 Jan 2018 18:44:25 +0100 (CET) From: Romain Naour To: buildroot@buildroot.org Date: Wed, 17 Jan 2018 18:44:15 +0100 Message-Id: <1516211058-466-6-git-send-email-romain.naour@smile.fr> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516211058-466-1-git-send-email-romain.naour@smile.fr> References: <1516211058-466-1-git-send-email-romain.naour@smile.fr> Subject: [Buildroot] [PATCH v2 5/8] package/tmux: add /usr/bin/tmux to /etc/shells X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When tmux is selected, /usr/bin/tmux is not added to /etc/shells (see man shells). So, login tools like dropbear reject the ssh connexions for users using tmux as shell in /etc/passwd. buildroot authpriv.warn dropbear[853]: User 'kubu' has invalid shell, rejected Signed-off-by: Romain Naour Cc: "Yann E. MORIN" Acked-by: "Yann E. MORIN" --- v2: add double-dollar after /usr/bin/tmux (Yann) --- package/tmux/tmux.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/tmux/tmux.mk b/package/tmux/tmux.mk index 6e03d01..94833ed 100644 --- a/package/tmux/tmux.mk +++ b/package/tmux/tmux.mk @@ -10,4 +10,12 @@ TMUX_LICENSE = ISC TMUX_LICENSE_FILES = README TMUX_DEPENDENCIES = libevent ncurses host-pkgconf +# Add /usr/bin/tmux to /etc/shells otherwise some login tools like dropbear +# can reject the user connexion. See man shells. +define TMUX_INSTALL_ADD_TMUX_TO_SHELLS + grep -qsE '^/usr/bin/tmux$$' $(TARGET_DIR)/etc/shells \ + || echo "/usr/bin/tmux" >> $(TARGET_DIR)/etc/shells +endef +TMUX_POST_INSTALL_TARGET_HOOKS += TMUX_INSTALL_ADD_TMUX_TO_SHELLS + $(eval $(autotools-package))