NetBSD Problem Report #48391
From ef@math.uni-bonn.de Thu Nov 21 12:27:20 2013
Return-Path: <ef@math.uni-bonn.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 3D68DA61B3
for <gnats-bugs@gnats.NetBSD.org>; Thu, 21 Nov 2013 12:27:20 +0000 (UTC)
Message-Id: <20131121122716.C3BF51BD42@trave.math.uni-bonn.de>
Date: Thu, 21 Nov 2013 13:27:16 +0100 (CET)
From: ef@math.uni-bonn.de
Reply-To: ef@math.uni-bonn.de
To: gnats-bugs@gnats.NetBSD.org
Subject: fsck -T option handling
X-Send-Pr-Version: 3.95
>Number: 48391
>Category: bin
>Synopsis: fsck -T option handling
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 21 12:30:00 +0000 2013
>Last-Modified: Mon Oct 13 09:05:00 +0000 2014
>Originator: Edgar Fuß
>Release: NetBSD 6.1_STABLE
>Organization:
Mathematisches Institut der Uni Bonn
>Environment:
System: NetBSD trave.math.uni-bonn.de 6.1_STABLE NetBSD 6.1_STABLE (MI12serv) #27: Tue Nov 19 17:13:05 CET 2013 support@trave.math.uni-bonn.de:/usr/obj/sys/arch/amd64/compile/mi12serv amd64
Architecture: x86_64
Machine: amd64
>Description:
Passing "-Tffs:-x,/var/db" to fsck makes it pass "-x -o /var/db"
to fsck_ffs.
I would expect "-x /var/db" without the "-o" in between.
Of course, on can circumvent this with "-Tffs:-x/var/db",
which passes "-x/var/db"
>How-To-Repeat:
fsck -d "-Tffs:-x,/var/db" <ffs file system>
>Fix:
>Audit-Trail:
From: Miwa Susumu <miwarin@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/48391
Date: Mon, 13 Oct 2014 18:02:39 +0900
fsck is regarded as -o unknown options.
in sbin/fsck_ffs/fsck.c mangle():
if (*p != '\0') {
if (*p == '-') {
argv[argc++] = p;
p = strchr(p, '=');
if (p) {
*p = '\0';
argv[argc++] = p+1;
}
} else {
argv[argc++] = "-o"; <====
argv[argc++] = p;
}
}
This process ( mangle() ) is included from the initial commit.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/fsck/fsck.c?only_with_tag=MAIN
For example fsck_ffs, I should be an error to be used in -o fsck_ffs.
Why fsck Are they regarded as -o?
--
miwarin
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.