Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758973AbYCFAQc (ORCPT ); Wed, 5 Mar 2008 19:16:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753287AbYCFAQV (ORCPT ); Wed, 5 Mar 2008 19:16:21 -0500 Received: from moutng.kundenserver.de ([212.227.126.186]:50275 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753107AbYCFAQU (ORCPT ); Wed, 5 Mar 2008 19:16:20 -0500 From: Bodo Eggert <7eggert@gmx.de> Subject: Re: [PATCH] chroot= as a new kernel parameter To: Guillaume Chazarain , Pawel Plociennik , Pavel Machek , linux-kernel@vger.kernel.org Reply-To: 7eggert@gmx.de Date: Thu, 06 Mar 2008 01:16:11 +0100 References: User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-Id: X-be10.7eggert.dyndns.org-MailScanner-Information: See www.mailscanner.info for information X-be10.7eggert.dyndns.org-MailScanner: Found to be clean X-be10.7eggert.dyndns.org-MailScanner-From: 7eggert@gmx.de X-Provags-ID: V01U2FsdGVkX18DGTxcCWkW9CisI/BdgAgD3plkO4Ew74xNsQa 4QWzPLLIiAK5jrYZin9xGfRwq9Di3nMCm/rWYdUdiuNcr71BY7 cHPeJK4WEHyK/+B5jczRA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1345 Lines: 26 Guillaume Chazarain wrote: > On Wed, Mar 5, 2008 at 2:38 PM, Pawel Plociennik >> At last my patch is as simple as possible and it has *only* a *few lines of >> the code* and it can be used as *independent* method to various *hundred* >> distroes. > > Your method requires a certain kernel, mine does not ;-) Your method requires to type the whole bible on the command line. >> static void run_init_process(char *init_filename) >> { >> + if (chroot_str) >> + if (sys_chroot(chroot_str) < 0) >> + printk(KERN_WARNING "chroot=%s failed\n", >> chroot_str); + > > As I said before, this chroot= option can be used for security reason > instead of testing purpose, and in this case, continuing booting after > a failed chroot sounds like a security issue. Even if not, continuing on unknown/bad options is a BAD idea. If I made a typo in the path, the wrong system would be started, leaving me to choose between waiting (felt) five minutes until I can shut it down cleanly or to hard reboot and fsck. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/