summaryrefslogtreecommitdiffstats
path: root/package/tmux/tmux.mk
diff options
context:
space:
mode:
authorRomain Naour <romain.naour@smile.fr>2018-01-19 11:15:05 +0100
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-05-03 23:15:06 +0200
commit8491c62f44e0ad7a0b7bed6f922f814004d4a6bd (patch)
tree0e0c6cb1d681ac1dbefd17890987ab0036907e8f /package/tmux/tmux.mk
parentd19ed2fe4c52cbc2e618af6d3a168e5669231453 (diff)
downloadbuildroot-8491c62f44e0ad7a0b7bed6f922f814004d4a6bd.tar.gz
buildroot-8491c62f44e0ad7a0b7bed6f922f814004d4a6bd.zip
package/tmux: add /usr/bin/tmux to /etc/shells
When tmux is selected, /usr/bin/tmux is not added to /etc/shells (see man shells). So, login tools like dropbear reject the ssh connections 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 <romain.naour@smile.fr> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/tmux/tmux.mk')
-rw-r--r--package/tmux/tmux.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/tmux/tmux.mk b/package/tmux/tmux.mk
index 6e03d01abf..e380227475 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 connection. See man shells.
+define TMUX_ADD_TMUX_TO_SHELLS
+ grep -qsE '^/usr/bin/tmux$$' $(TARGET_DIR)/etc/shells \
+ || echo "/usr/bin/tmux" >> $(TARGET_DIR)/etc/shells
+endef
+TMUX_TARGET_FINALIZE_HOOKS += TMUX_ADD_TMUX_TO_SHELLS
+
$(eval $(autotools-package))
OpenPOWER on IntegriCloud