From patchwork Sat Jan 5 14:52:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 209679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 159D52C0082 for ; Sun, 6 Jan 2013 01:52:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 08C691015B3; Sat, 5 Jan 2013 14:52:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oejSXMcAnS5X; Sat, 5 Jan 2013 14:52:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4265A10184A; Sat, 5 Jan 2013 14:52:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 63AE38F753 for ; Sat, 5 Jan 2013 14:52:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 52FCD8BDFC for ; Sat, 5 Jan 2013 14:52:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rsrDGHVywskv for ; Sat, 5 Jan 2013 14:52:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by whitealder.osuosl.org (Postfix) with ESMTPS id A69F68BDF4 for ; Sat, 5 Jan 2013 14:52:12 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id x10so8349306wey.33 for ; Sat, 05 Jan 2013 06:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=CweiOgBKJqvOqCS8pbCJmu6zqAzvvwbu74lghZU2BIc=; b=go9/EIw/HjGRyewX7xPuIPjHiUwrKGxcvWJsEsEjZnm9mvAEPyrQMDumWVZ82XOu9f i3g1DWecpySx7+d0ZF+Kr4MUXXUOD5PNjjunh/VkoisEkx0JH/ppVQ77sBXiS2uZ7Kdf ESQ2+fH51GU7ZJT12D3wmE5bzQMQhNJk7FXW/yaaTAfieF+smd1Rb/yju2QzKC7If+6M kp/FiOv0cpVAx5yhtImrO53mOf1e0KRlUyBBsx1j01pYgkkLGqNMUcKVC9IU7cXB1ykb x9lcNiXdABl3iSG39QRS+E6Fks7Vn6ibtHgA7GxK4ybSJdrKU0wieTKx8Djn5ym5rA2I P9nQ== X-Received: by 10.180.86.36 with SMTP id m4mr2315317wiz.5.1357397530947; Sat, 05 Jan 2013 06:52:10 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-70-176.w90-32.abo.wanadoo.fr. [90.32.149.176]) by mx.google.com with ESMTPS id h19sm3593620wiv.7.2013.01.05.06.52.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 05 Jan 2013 06:52:10 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sat, 5 Jan 2013 15:52:02 +0100 Message-Id: <1f2432a8027f1e1c780a45b488be8be03f1b1b93.1357397453.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 1/2] system: set root password only for default skeleton X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net In case one is using a custom skeleton, the root pasword might already be set in this case, and should not be overriden. Just ask for (and set) the root password only for the default skeleton. Reported-by: Gustavo Zacarias Signed-off-by: "Yann E. MORIN" Cc: Peter Korsgaard --- system/Config.in | 42 +++++++++++++++++++++--------------------- system/system.mk | 2 ++ 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/system/Config.in b/system/Config.in index 5b66ac0..19bdd2d 100644 --- a/system/Config.in +++ b/system/Config.in @@ -12,27 +12,6 @@ config BR2_TARGET_GENERIC_ISSUE help Select system banner (/etc/issue) to be displayed at login. -config BR2_TARGET_GENERIC_ROOT_PASSWD - string "Root password" - default "" - help - Set the initial root password (in clear). It will be md5-encrypted. - - If set to empty (the default), then no root password will be set, - and root will need no password to log in. - - WARNING! WARNING! - Although pretty strong, MD5 is now an old hash function, and - suffers from some weaknesses, which makes it susceptible to attacks. - It is showing its age, so this root password should not be trusted - to properly secure any product that can be shipped to the wide, - hostile world. - - WARNING! WARNING! - The password appears in clear in the .config file, and may appear - in the build log! Avoid using a valuable password if either the - .config file or the build log may be distributed! - choice prompt "/dev management" default BR2_ROOTFS_DEVICE_CREATION_STATIC @@ -140,6 +119,27 @@ endif if BR2_ROOTFS_SKELETON_DEFAULT +config BR2_TARGET_GENERIC_ROOT_PASSWD + string "Root password" + default "" + help + Set the initial root password (in clear). It will be md5-encrypted. + + If set to empty (the default), then no root password will be set, + and root will need no password to log in. + + WARNING! WARNING! + Although pretty strong, MD5 is now an old hash function, and + suffers from some weaknesses, which makes it susceptible to attacks. + It is showing its age, so this root password should not be trusted + to properly secure any product that can be shipped to the wide, + hostile world. + + WARNING! WARNING! + The password appears in clear in the .config file, and may appear + in the build log! Avoid using a valuable password if either the + .config file or the build log may be distributed! + config BR2_TARGET_GENERIC_GETTY_PORT string "Port to run a getty (login prompt) on" default "ttyS0" diff --git a/system/system.mk b/system/system.mk index 3c4d06e..651f7df 100644 --- a/system/system.mk +++ b/system/system.mk @@ -47,7 +47,9 @@ ifneq ($(TARGET_GENERIC_ISSUE),) TARGETS += target-generic-issue endif +ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y) TARGETS += target-root-passwd +endif ifneq ($(TARGET_GENERIC_GETTY),) ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y)