All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] skeleton: add default login port to /etc/securetty
@ 2012-07-13  3:19 roylee17 at gmail.com
  2012-07-14 16:56 ` Arnout Vandecappelle
  2013-05-26 20:14 ` Spenser Gilliland
  0 siblings, 2 replies; 13+ messages in thread
From: roylee17 at gmail.com @ 2012-07-13  3:19 UTC (permalink / raw)
  To: buildroot

From: Tzu-Jung Lee <tjlee@ambarella.com>

We ran into a "Login incorrect" problem when running the same rootfs
image across platforms with different loging ports ttyS0/1/2/3.

Simply assignning "console" to BR2_TARGET_GENERIC_GETTY_PORT, which in
turn modifies the /etc/inittab, is not enough because the "console" device
was missing in the /etc/securetty.

While current securetty has enumerated a lot of ttys, this patch should save
some efforts to enumerate more.

Change-Id: Ifb1239c80eb86528345b24eb8d04b52b67aa1209
Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
---
 target/generic/Makefile.in |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/target/generic/Makefile.in b/target/generic/Makefile.in
index 4185202..571b54a 100644
--- a/target/generic/Makefile.in
+++ b/target/generic/Makefile.in
@@ -31,6 +31,9 @@ target-generic-do-remount-rw:
 target-generic-dont-remount-rw:
 	$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
 
+target-generic-securetty:
+	grep -q $(TARGET_GENERIC_GETTY) $(TARGET_DIR)/etc/securetty || echo $(TARGET_GENERIC_GETTY) >> $(TARGET_DIR)/etc/securetty
+
 ifneq ($(TARGET_GENERIC_HOSTNAME),)
 TARGETS += target-generic-hostname
 endif
@@ -50,4 +53,7 @@ TARGETS += target-generic-do-remount-rw
 else
 TARGETS += target-generic-dont-remount-rw
 endif
+ifneq ($(TARGET_GENERIC_GETTY),)
+TARGETS += target-generic-securetty
+endif
 endif
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/1] skeleton: add default login port to /etc/securetty
@ 2013-05-21  9:56 Tzu-Jung Lee
  0 siblings, 0 replies; 13+ messages in thread
From: Tzu-Jung Lee @ 2013-05-21  9:56 UTC (permalink / raw)
  To: buildroot

We ran into a "Login incorrect" problem when running the same rootfs
image across platforms with different loging ports ttyS0/1/2/3.

Simply assignning "console" to BR2_TARGET_GENERIC_GETTY_PORT, which in
turn modifies the /etc/inittab, is not enough because the "console" device
was missing in the /etc/securetty.

While current securetty has enumerated a lot of ttys, this patch should save
some efforts to enumerate more.

Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
---
 system/system.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/system/system.mk b/system/system.mk
index 44a33ae..67d3113 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -40,6 +40,9 @@ target-generic-do-remount-rw:
 target-generic-dont-remount-rw:
 	$(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab
 
+target-generic-securetty:
+	grep -q $(TARGET_GENERIC_GETTY) $(TARGET_DIR)/etc/securetty || echo $(TARGET_GENERIC_GETTY) >> $(TARGET_DIR)/etc/securetty
+
 ifneq ($(TARGET_GENERIC_HOSTNAME),)
 TARGETS += target-generic-hostname
 endif
@@ -60,4 +63,7 @@ TARGETS += target-generic-do-remount-rw
 else
 TARGETS += target-generic-dont-remount-rw
 endif
+ifneq ($(TARGET_GENERIC_GETTY),)
+TARGETS += target-generic-securetty
+endif
 endif
-- 
1.8.2.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-05-26 21:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-13  3:19 [Buildroot] [PATCH 1/1] skeleton: add default login port to /etc/securetty roylee17 at gmail.com
2012-07-14 16:56 ` Arnout Vandecappelle
2012-07-14 17:15   ` Thomas Petazzoni
2012-07-14 21:20     ` Arnout Vandecappelle
2012-07-14 23:08       ` Thomas Petazzoni
2012-07-15  0:28         ` Arnout Vandecappelle
2012-07-30 15:13           ` Tzu-Jung Lee
2013-05-26 20:14 ` Spenser Gilliland
2013-05-26 20:30   ` Thomas Petazzoni
2013-05-26 20:40   ` Spenser Gilliland
2013-05-26 20:43     ` Spenser Gilliland
2013-05-26 21:00     ` Peter Korsgaard
2013-05-21  9:56 Tzu-Jung Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.