NetBSD Problem Report #52905

From petar@starling.NGC068  Sat Jan  6 21:48:23 2018
Return-Path: <petar@starling.NGC068>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 912CE7A1B0
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  6 Jan 2018 21:48:23 +0000 (UTC)
Message-Id: <20180106214819.961F39124CA@starling.NGC068>
Date: Sat,  6 Jan 2018 22:48:19 +0100 (CET)
From: Petar Bogdanovic <petar@smokva.net>
To: gnats-bugs@NetBSD.org
Subject: /etc/security: garbled dkctl args
X-Send-Pr-Version: 3.95

>Number:         52905
>Category:       bin
>Synopsis:       /etc/security: garbled dkctl args
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 06 21:50:00 +0000 2018
>Closed-Date:    Wed Apr 11 16:37:18 +0000 2018
>Last-Modified:  Wed Apr 11 16:37:18 +0000 2018
>Originator:     Petar Bogdanovic
>Release:        NetBSD 8.0_BETA
>Organization:
	-
>Environment:
	NetBSD 8.0_BETA amd64
>Description:
	from /etc/security:

	 946  if /sbin/dkctl $i listwedges -qe; then
	 947          /sbin/dkctl $i listwedges \
	 948              > "$work_dir/wedges.$i" 2>/dev/null
	 949  fi

	dkctl does not know -q/-e so I assume there is either an egrep
	missing or line 946 should redirect stdin/stderr to /dev/null
	instead of providing -qe to dkctl.

>How-To-Repeat:
	Run /etc/security, it will always generate "insecurity output".

>Fix:
	See above.

>Release-Note:

>Audit-Trail:
From: Petar Bogdanovic <petar@smokva.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52905: /etc/security: garbled dkctl args
Date: Sun, 7 Jan 2018 11:16:18 +0100

 Sorry, no, -qe is legit but not documented.

 Then the issue is `listwedges -q' not being quiet on success.

 Fix:

 Index: dkctl.c
 ===================================================================
 RCS file: /cvsroot/src/sbin/dkctl/dkctl.c,v
 retrieving revision 1.25
 diff -u -r1.25 dkctl.c
 --- dkctl.c     5 Apr 2017 20:27:09 -0000       1.25
 +++ dkctl.c     7 Jan 2018 10:12:16 -0000
 @@ -684,6 +684,9 @@
                 return;
         }

 +       if (quiet)
 +               return;
 +
         qsort(dkw, dkwl.dkwl_nwedges, sizeof(*dkw), dkw_sort);

         printf("%s: %u wedge%s:\n", dvname, dkwl.dkwl_nwedges,

From: "Robert Elz" <kre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52905 CVS commit: src/sbin/dkctl
Date: Sun, 7 Jan 2018 12:29:25 +0000

 Module Name:	src
 Committed By:	kre
 Date:		Sun Jan  7 12:29:25 UTC 2018

 Modified Files:
 	src/sbin/dkctl: dkctl.8 dkctl.c

 Log Message:
 PR bin/52905

 Document, and properly implement, the -q and -e options to dkctl xxN listwedges.
 (implementation fix supplied by Petar Bogdanovic.)


 To generate a diff of this commit:
 cvs rdiff -u -r1.26 -r1.27 src/sbin/dkctl/dkctl.8
 cvs rdiff -u -r1.25 -r1.26 src/sbin/dkctl/dkctl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52905: /etc/security: garbled dkctl args
Date: Sun, 7 Jan 2018 19:31:25 +0300

 PR bin/52905 (typo in the pr number in the log message).

 On Sat, Jan 06, 2018 at 23:44:06 +0000, Michael van Elst wrote:

 > Module Name:	src
 > Committed By:	mlelstv
 > Date:		Sat Jan  6 23:44:06 UTC 2018
 > 
 > Modified Files:
 > 	src/etc: security
 > 
 > Log Message:
 > Use sysctl to retrieve iostat names instead of parsing possibly
 > truncated iostat output.
 > 
 > Check dkctl listwedges output with grep.
 > 
 > Fixes PR 59205.
 > 
 > 
 > To generate a diff of this commit:
 > cvs rdiff -u -r1.121 -r1.122 src/etc/security
 > 
 > Please note that diffs are not public domain; they are subject to the
 > copyright notices on the relevant files.

 -uwe

From: Petar Bogdanovic <petar@smokva.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52905: /etc/security: garbled dkctl args
Date: Sun, 14 Jan 2018 15:32:47 +0100

 I suggest a pullup for netbsd-8 and reverting the last hunk of
 following commit:

 http://cvsweb.netbsd.org/bsdweb.cgi/src/etc/security.diff?r1=1.121&r2=1.122&only_with_tag=MAIN

State-Changed-From-To: open->pending-pullups
State-Changed-By: kre@NetBSD.org
State-Changed-When: Wed, 11 Apr 2018 12:16:06 +0000
State-Changed-Why:
pullup-8 #737 (for dkctl changes)
I don't think there's a need to do more fiddling to /etc/security.


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52905 CVS commit: [netbsd-8] src/sbin/dkctl
Date: Wed, 11 Apr 2018 14:45:51 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Apr 11 14:45:51 UTC 2018

 Modified Files:
 	src/sbin/dkctl [netbsd-8]: dkctl.8 dkctl.c

 Log Message:
 Pull up following revision(s) (requested by kre in ticket #737):

 	sbin/dkctl/dkctl.8: revision 1.27
 	sbin/dkctl/dkctl.8: revision 1.28
 	sbin/dkctl/dkctl.c: revision 1.26

 PR bin/52905

 Document, and properly implement, the -q and -e options to dkctl xxN listwedges.
 (implementation fix supplied by Petar Bogdanovic.)

 Bump date for previous.


 To generate a diff of this commit:
 cvs rdiff -u -r1.26 -r1.26.8.1 src/sbin/dkctl/dkctl.8
 cvs rdiff -u -r1.25 -r1.25.4.1 src/sbin/dkctl/dkctl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Wed, 11 Apr 2018 16:37:18 +0000
State-Changed-Why:
Pullups completed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.