From d67b3a54af65ab4818a891458d2d59f91f239f99 Mon Sep 17 00:00:00 2001 From: Tzu-Jung Lee Date: Sun, 26 May 2013 10:40:25 +0000 Subject: skeleton: add default login port to /etc/securetty 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. [Peter: guard with single quotes] Signed-off-by: Tzu-Jung Lee Signed-off-by: Spenser Gilliland Acked-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- system/system.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'system') diff --git a/system/system.mk b/system/system.mk index 44a33ae61..50c86ad60 100644 --- a/system/system.mk +++ b/system/system.mk @@ -9,6 +9,10 @@ TARGET_GENERIC_GETTY:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) TARGET_GENERIC_GETTY_TERM:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM)) +target-generic-securetty: + grep -q '^$(TARGET_GENERIC_GETTY)$$' $(TARGET_DIR)/etc/securetty || \ + echo '$(TARGET_GENERIC_GETTY)' >> $(TARGET_DIR)/etc/securetty + target-generic-hostname: mkdir -p $(TARGET_DIR)/etc echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname @@ -40,6 +44,10 @@ target-generic-do-remount-rw: target-generic-dont-remount-rw: $(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab +ifneq ($(TARGET_GENERIC_GETTY),) +TARGETS += target-generic-securetty +endif + ifneq ($(TARGET_GENERIC_HOSTNAME),) TARGETS += target-generic-hostname endif -- cgit v1.2.3 From 03bc3c3bdcffbef498b9072e9cd1c079fd0dd26a Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 25 May 2013 10:33:32 +0000 Subject: system/device-table: do not set /home/default stgid Currently, /home/default is mode 2755 which means it is setgid. Since /home/default is not group-writable, it is useless. Signed-off-by: "Yann E. MORIN" Acked-by: Samuel Martin Signed-off-by: Peter Korsgaard --- system/device_table.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/device_table.txt b/system/device_table.txt index 421728b08..43c0cfa0b 100644 --- a/system/device_table.txt +++ b/system/device_table.txt @@ -9,7 +9,7 @@ /dev d 755 0 0 - - - - - /tmp d 1777 0 0 - - - - - /etc d 755 0 0 - - - - - -/home/default d 2755 1000 1000 - - - - - +/home/default d 755 1000 1000 - - - - - /var/www d 755 33 33 - - - - - /etc/shadow f 600 0 0 - - - - - /etc/passwd f 644 0 0 - - - - - -- cgit v1.2.3