summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Naour <romain.naour@smile.fr>2018-01-19 11:15:03 +0100
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-05-03 23:12:21 +0200
commit129f3276989de6f07ba02eb3fe175f731f2ae9a8 (patch)
treece64b166fc3ea191bd5a68156b00e0d7a75c5e98
parent854e3dd1a0ce1902230118f3abd90a0113d171cd (diff)
downloadbuildroot-129f3276989de6f07ba02eb3fe175f731f2ae9a8.tar.gz
buildroot-129f3276989de6f07ba02eb3fe175f731f2ae9a8.zip
package/dash: add /etc/dash to /etc/shells
When dash is selected, /bin/dash is not added to /etc/shells (see man shells). So, login tools like dropbear reject the ssh connections for users using dash 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> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--package/dash/dash.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/dash/dash.mk b/package/dash/dash.mk
index 2ee292b8d3..9a26ebb642 100644
--- a/package/dash/dash.mk
+++ b/package/dash/dash.mk
@@ -28,4 +28,12 @@ define DASH_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/src/dash $(TARGET_DIR)/bin/dash
endef
+# Add /bin/dash to /etc/shells otherwise some login tools like dropbear
+# can reject the user connection. See man shells.
+define DASH_ADD_DASH_TO_SHELLS
+ grep -qsE '^/bin/dash$$' $(TARGET_DIR)/etc/shells \
+ || echo "/bin/dash" >> $(TARGET_DIR)/etc/shells
+endef
+DASH_TARGET_FINALIZE_HOOKS += DASH_ADD_DASH_TO_SHELLS
+
$(eval $(autotools-package))
OpenPOWER on IntegriCloud