NetBSD Problem Report #49005

From www@NetBSD.org  Thu Jul 17 05:38:08 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 832C0A5810
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Jul 2014 05:38:08 +0000 (UTC)
Message-Id: <20140717053807.9B415A655C@mollari.NetBSD.org>
Date: Thu, 17 Jul 2014 05:38:07 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [patch] t_truncate: use /etc/motd instead of /usr/bin/fpr
X-Send-Pr-Version: www-1.0

>Number:         49005
>Category:       bin
>Synopsis:       [patch] t_truncate: use /etc/motd instead of /usr/bin/fpr
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 17 05:40:00 +0000 2014
>Closed-Date:    Thu Aug 10 01:51:41 +0000 2017
>Last-Modified:  Thu Aug 10 01:51:41 +0000 2017
>Originator:     Garrett Cooper
>Release:        n/a
>Organization:
EMC / Isilon Storage Division
>Environment:
n/a
>Description:
FreeBSD doesn't have /usr/bin/fpr, but it does have /etc/motd, so the testcase should be changed to use /etc/motd.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Garrett Cooper <yaneurabeya@gmail.com>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of /usr/bin/fpr
Date: Wed, 16 Jul 2014 22:43:41 -0700

 --047d7bdc07e28629e704fe5d1fde
 Content-Type: text/plain; charset=UTF-8

 On Wed, Jul 16, 2014 at 10:40 PM,  <gnats-admin@netbsd.org> wrote:
 > Thank you very much for your problem report.
 > It has the internal identification `bin/49005'.
 > The individual assigned to look at your
 > report is: bin-bug-people.
 >
 >>Category:       bin
 >>Responsible:    bin-bug-people
 >>Synopsis:       [patch] t_truncate: use /etc/motd instead of /usr/bin/fpr
 >>Arrival-Date:   Thu Jul 17 05:40:00 +0000 2014

 Patch attached -- thanks!
 -Garrett

 --047d7bdc07e28629e704fe5d1fde
 Content-Type: application/octet-stream; 
 	name="t_truncate-use-etc-motd-instead-of-fpc.patch"
 Content-Disposition: attachment; 
 	filename="t_truncate-use-etc-motd-instead-of-fpc.patch"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_hxpnjyj80

 SW5kZXg6IHRlc3RzL2xpYi9saWJjL3N5cy90X3RydW5jYXRlLmMKPT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmls
 ZTogL2N2c3Jvb3Qvc3JjL3Rlc3RzL2xpYi9saWJjL3N5cy90X3RydW5jYXRlLmMsdgpyZXRyaWV2
 aW5nIHJldmlzaW9uIDEuMgpkaWZmIC11IC1yMS4yIHRfdHJ1bmNhdGUuYwotLS0gdGVzdHMvbGli
 L2xpYmMvc3lzL3RfdHJ1bmNhdGUuYwkxOCBBdWcgMjAxMSAxOTo0ODowMyAtMDAwMAkxLjIKKysr
 IHRlc3RzL2xpYi9saWJjL3N5cy90X3RydW5jYXRlLmMJMTcgSnVsIDIwMTQgMDQ6NDM6MDEgLTAw
 MDAKQEAgLTE2MCw3ICsxNjAsNyBAQAogCUFURl9SRVFVSVJFX0VSUk5PKEVOT0VOVCwgdHJ1bmNh
 dGUoIi9hL2IvYy9kL2UvZi9nIiwgOTk5KSA9PSAtMSk7CiAKIAllcnJubyA9IDA7Ci0JQVRGX1JF
 UVVJUkVfRVJSTk8oRUFDQ0VTLCB0cnVuY2F0ZSgiL3Vzci9iaW4vZnByIiwgOTk5KSA9PSAtMSk7
 CisJQVRGX1JFUVVJUkVfRVJSTk8oRUFDQ0VTLCB0cnVuY2F0ZSgiL2V0Yy9tb3RkIiwgOTk5KSA9
 PSAtMSk7CiB9CiAKIEFURl9UUF9BRERfVENTKHRwKQo=
 --047d7bdc07e28629e704fe5d1fde--

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of
 /usr/bin/fpr
Date: Thu, 17 Jul 2014 09:05:40 +0000

 On Thu, Jul 17, 2014 at 05:40:00AM +0000, yaneurabeya@gmail.com wrote:
  > >Description:
  > FreeBSD doesn't have /usr/bin/fpr, but it does have /etc/motd, so the testcase should be changed to use /etc/motd.

 /usr/bin/fpr was chosen on the grounds that it's expendable if
 something goes wrong and it gets truncated. The motd isn't.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Garrett Cooper <yaneurabeya@gmail.com>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
Cc: "gnats-admin@netbsd.org" <gnats-admin@netbsd.org>, 
	"netbsd-bugs@netbsd.org" <netbsd-bugs@netbsd.org>
Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of /usr/bin/fpr
Date: Thu, 17 Jul 2014 12:19:16 -0700

 On Thu, Jul 17, 2014 at 2:10 AM, David Holland <dholland-bugs@netbsd.org> wrote:
 > The following reply was made to PR bin/49005; it has been noted by GNATS.
 >
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of
 >  /usr/bin/fpr
 > Date: Thu, 17 Jul 2014 09:05:40 +0000
 >
 >  On Thu, Jul 17, 2014 at 05:40:00AM +0000, yaneurabeya@gmail.com wrote:
 >   > >Description:
 >   > FreeBSD doesn't have /usr/bin/fpr, but it does have /etc/motd, so the testcase should be changed to use /etc/motd.
 >
 >  /usr/bin/fpr was chosen on the grounds that it's expendable if
 >  something goes wrong and it gets truncated. The motd isn't.

     Ah, ok. It might be better to install a file into the source
 directory that's owned by root and 0644, then try and truncate it so
 the test is more portable and doesn't accidentally hose a utility or
 other file that it shouldn't as that's the purpose of the testcase (to
 test EACESS). Does that sound like a good approach?
 Thanks!
 -Garrett

From: Garrett Cooper <yaneurabeya@gmail.com>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
Cc: "gnats-admin@netbsd.org" <gnats-admin@netbsd.org>, 
	"netbsd-bugs@netbsd.org" <netbsd-bugs@netbsd.org>
Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of /usr/bin/fpr
Date: Thu, 17 Jul 2014 12:19:42 -0700

 On Thu, Jul 17, 2014 at 12:19 PM, Garrett Cooper <yaneurabeya@gmail.com> wrote:
 > On Thu, Jul 17, 2014 at 2:10 AM, David Holland <dholland-bugs@netbsd.org> wrote:
 >> The following reply was made to PR bin/49005; it has been noted by GNATS.
 >>
 >> From: David Holland <dholland-bugs@netbsd.org>
 >> To: gnats-bugs@NetBSD.org
 >> Cc:
 >> Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of
 >>  /usr/bin/fpr
 >> Date: Thu, 17 Jul 2014 09:05:40 +0000
 >>
 >>  On Thu, Jul 17, 2014 at 05:40:00AM +0000, yaneurabeya@gmail.com wrote:
 >>   > >Description:
 >>   > FreeBSD doesn't have /usr/bin/fpr, but it does have /etc/motd, so the testcase should be changed to use /etc/motd.
 >>
 >>  /usr/bin/fpr was chosen on the grounds that it's expendable if
 >>  something goes wrong and it gets truncated. The motd isn't.
 >
 >     Ah, ok. It might be better to install a file into the source

 source -> tests

 > directory that's owned by root and 0644, then try and truncate it so
 > the test is more portable and doesn't accidentally hose a utility or
 > other file that it shouldn't as that's the purpose of the testcase (to
 > test EACESS). Does that sound like a good approach?

From: Garrett Cooper <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of /usr/bin/fpr
Date: Thu, 23 Oct 2014 22:22:42 -0700

 --Apple-Mail=_7B7B5186-365F-4402-886D-C9A915C9667F
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=windows-1252

 On Jul 17, 2014, at 12:20, Garrett Cooper <yaneurabeya@gmail.com> wrote:

 > The following reply was made to PR bin/49005; it has been noted by =
 GNATS.
 >=20
 > From: Garrett Cooper <yaneurabeya@gmail.com>
 > To: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
 > Cc: "gnats-admin@netbsd.org" <gnats-admin@netbsd.org>,=20
 > 	"netbsd-bugs@netbsd.org" <netbsd-bugs@netbsd.org>
 > Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of =
 /usr/bin/fpr
 > Date: Thu, 17 Jul 2014 12:19:42 -0700
 >=20
 > On Thu, Jul 17, 2014 at 12:19 PM, Garrett Cooper =
 <yaneurabeya@gmail.com> wrote:
 >> On Thu, Jul 17, 2014 at 2:10 AM, David Holland =
 <dholland-bugs@netbsd.org> wrote:
 >>> The following reply was made to PR bin/49005; it has been noted by =
 GNATS.
 >>>=20
 >>> From: David Holland <dholland-bugs@netbsd.org>
 >>> To: gnats-bugs@NetBSD.org
 >>> Cc:
 >>> Subject: Re: bin/49005: [patch] t_truncate: use /etc/motd instead of
 >>> /usr/bin/fpr
 >>> Date: Thu, 17 Jul 2014 09:05:40 +0000
 >>>=20
 >>> On Thu, Jul 17, 2014 at 05:40:00AM +0000, yaneurabeya@gmail.com =
 wrote:
 >>>>> Description:
 >>>> FreeBSD doesn't have /usr/bin/fpr, but it does have /etc/motd, so =
 the testcase should be changed to use /etc/motd.
 >>>=20
 >>> /usr/bin/fpr was chosen on the grounds that it's expendable if
 >>> something goes wrong and it gets truncated. The motd isn't.
 >>=20
 >>    Ah, ok. It might be better to install a file into the source
 >=20
 > source -> tests
 >=20
 >> directory that's owned by root and 0644, then try and truncate it so
 >> the test is more portable and doesn't accidentally hose a utility or
 >> other file that it shouldn't as that's the purpose of the testcase =
 (to
 >> test EACESS). Does that sound like a good approach?

 Here=92s a better approach: =
 https://svnweb.freebsd.org/base?view=3Drevision&revision=3D273533 ; =
 here=92s the build target I=92ll be adding to =
 lib/libc/tests/sys/Makefile to generate the file:

 > FILESGROUPS=3D            FILES truncate_test_FILES
 >
 > truncate_test_FILES=3D    truncate_test.root_owned
 > truncate_test_FILESDIR=3D ${TESTSDIR}
 > truncate_test_FILESMODE=3D 0600
 > truncate_test_FILESOWNER=3D root
 > truncate_test_FILESGRP=3D wheel
 >
 > CLEANFILES=3D     truncate_test.root_owned
 > truncate_test.root_owned:
 > 	dd if=3D/dev/null bs=3D1 count=3D1 of=3D${.TARGET}

 Cheers!

 --Apple-Mail=_7B7B5186-365F-4402-886D-C9A915C9667F
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename=signature.asc
 Content-Type: application/pgp-signature;
 	name=signature.asc
 Content-Description: Message signed with OpenPGP using GPGMail

 -----BEGIN PGP SIGNATURE-----
 Comment: GPGTools - https://gpgtools.org

 iQEcBAEBCgAGBQJUSeIiAAoJEMZr5QU6S73eMHwH/RXDnurQL4Y7xKBgbFZi2H7r
 YyWve9IL3UGye7GYmk/FfR4baFwiDIVelbnIktAzSd9uOPpHWX2+OHRMOjQ+gyFn
 sXen6+PI2EuwYe9sjCV8FpaF8UZTxSnuuM+mP7ZvSmNPvq+fqDm4fuxrgJ4KmE1g
 7jmGlB5FwulxCdETTIl6yV73tERSRCPsW7KJVn+69cyYRGFTTDR/fjqF64beQfGW
 PlXgHUYT0pKD9hLtdAgUBYhV0GhLyHGXcfaR784ASs2d1U9PBca99McquHwpYN/3
 xdGvVnY87d7JfPVHTIDpfO1TdkI8T9ee9v402PhyEX3JoXM4JnXCpjtHw6lZrJQ=
 =XE1r
 -----END PGP SIGNATURE-----

 --Apple-Mail=_7B7B5186-365F-4402-886D-C9A915C9667F--

State-Changed-From-To: open->closed
State-Changed-By: ginsbach@NetBSD.org
State-Changed-When: Thu, 10 Aug 2017 01:51:41 +0000
State-Changed-Why:
christos committed changes for PR/51844 (a duplicated of this issue) which
fix this issue.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.