NetBSD Problem Report #17186

Received: (qmail 5360 invoked by uid 605); 7 Jun 2002 08:12:44 -0000
Message-Id: <200206070812.g578Cfs19838@dhcp118.verkstad.net>
Date: Fri, 7 Jun 2002 10:12:41 +0200 (CEST)
From: martti.kuparinen@iki.fi
Sender: gnats-bugs-owner@netbsd.org
Reply-To: martti.kuparinen@iki.fi
To: gnats-bugs@gnats.netbsd.org
Subject: audit-packages ignores DISTDIR
X-Send-Pr-Version: 3.95

>Number:         17186
>Category:       pkg
>Synopsis:       audit-packages ignores DISTDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 07 08:13:00 +0000 2002
>Closed-Date:    Fri Jun 07 10:30:21 +0000 2002
>Last-Modified:  Fri Jun 07 16:40:01 +0000 2002
>Originator:     Martti Kuparinen
>Release:        NetBSD 1.6_BETA1
>Organization:
>Environment:
System: NetBSD dhcp118.verkstad.net 1.6_BETA1 NetBSD 1.6_BETA1 (KAYAK) #2: Wed May 29 13:47:35 CEST 2002 root@dhcp118.verkstad.net:/work/netbsd/src/sys/arch/i386/compile/KAYAK i386
Architecture: i386
Machine: i386
>Description:

I just noticed that security/audit-packages's download-vulnerability-list
saves the vulnerability list to /usr/pkgsrc/distfiles even though the user
might keep his distfiles somewhere else.

>How-To-Repeat:

# echo DISTDIR=/tmp/distfiles >> /etc/mk.conf
[install some package and see how the distfile is saved into /tmp/distfiles]
# download-vulnerability-list
[see how the vulnerability list is still stored in /usr/pkgsrc/distfiles]

>Fix:

Maybe some "grep DISTDIR /etc/mk.conf" kludge is needed to determine the
correct directory (not very elegant).
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: wiz 
State-Changed-When: Fri Jun 7 03:29:32 PDT 2002 
State-Changed-Why:  
Setting PKGVULNDIR in /etc/mk.conf is the solution to this problem. 
It's even documented in bsd.pkg.defaults.mk. 
Thanks for the PR. 

From: Thomas Klausner <wiz@netbsd.org>
To: Martti Kuparinen <martti.kuparinen@iki.fi>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/17186
Date: Fri, 7 Jun 2002 12:46:48 +0200

 On Fri, Jun 07, 2002 at 01:37:24PM +0300, Martti Kuparinen wrote:
 > No, this is NOT the solution (please re-open this PR). PKGVULNDIR is for
 > audit-packages but download-vulnerability-list still has hardcoded
 > /usr/pkgsrc/distfiles.
 > 
 > Please see head of the /usr/pkg/sbin/download-vulnerability-list...

 Yes, this is the solution.
 Please look at the top of
 /usr/pkgsrc/security/audit-packages/files/download-vulnerability-list:

 if [ ! -e ${PKGVULNDIR} ]; then
         echo "Creating ${PKGVULNDIR}"
         /bin/mkdir -p ${PKGVULNDIR} || (echo "Can't create
 	${PKGVULNDIR}" 1>&2; 
 exit 1)
 fi

 and the do-configure step in the package's Makefile.

 Bye,
  Thomas

 -- 
 Thomas Klausner - wiz@danbala.tuwien.ac.at
 Intolerance is the last defense of the insecure.

From: Martti Kuparinen <martti.kuparinen@iki.fi>
To: wiz@netbsd.org
Cc: martti.kuparinen@iki.fi, <pkg-manager@netbsd.org>
Subject: Re: pkg/17186
Date: Fri, 7 Jun 2002 13:37:24 +0300 (EEST)

 On 7 Jun 2002 wiz@netbsd.org wrote:

 > Setting PKGVULNDIR in /etc/mk.conf is the solution to this problem.
 > It's even documented in bsd.pkg.defaults.mk.
 > Thanks for the PR.

 No, this is NOT the solution (please re-open this PR). PKGVULNDIR is for
 audit-packages but download-vulnerability-list still has hardcoded
 /usr/pkgsrc/distfiles.

 Please see head of the /usr/pkg/sbin/download-vulnerability-list...

 Martti

 ---
 Martti Kuparinen <martti.kuparinen@iki.fi>      NetBSD - No media hype
 http://www.iki.fi/kuparine/                     http://www.netbsd.org/

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: martti.kuparinen@iki.fi
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/17186: audit-packages ignores DISTDIR
Date: Fri, 7 Jun 2002 18:24:31 +0200

 On Fri, Jun 07, 2002 at 10:12:41AM +0200, martti.kuparinen@iki.fi wrote:
 > 
 > >Number:         17186
 > >Category:       pkg
 > >Synopsis:       audit-packages ignores DISTDIR
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Fri Jun 07 01:13:00 PDT 2002
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Martti Kuparinen
 > >Release:        NetBSD 1.6_BETA1
 > >Organization:
 > >Environment:
 > System: NetBSD dhcp118.verkstad.net 1.6_BETA1 NetBSD 1.6_BETA1 (KAYAK) #2: Wed May 29 13:47:35 CEST 2002 root@dhcp118.verkstad.net:/work/netbsd/src/sys/arch/i386/compile/KAYAK i386
 > Architecture: i386
 > Machine: i386
 > >Description:
 > 
 > I just noticed that security/audit-packages's download-vulnerability-list
 > saves the vulnerability list to /usr/pkgsrc/distfiles even though the user
 > might keep his distfiles somewhere else.

 While we're at it, it would be nice if download-vulnerability-list
 could use another ftp server than ftp.netbsd.org without hacking the code :)

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --

From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/17186: audit-packages ignores DISTDIR
Date: Fri, 7 Jun 2002 18:26:21 +0200

 On Fri, Jun 07, 2002 at 04:25:02PM -0000, Manuel Bouyer wrote:
 >  While we're at it, it would be nice if download-vulnerability-list
 >  could use another ftp server than ftp.netbsd.org without hacking the code :)

 The point is to get the most current file; that's only sure by using
 ftp.netbsd.org.

 Bye,
  Thomas

 -- 
 Thomas Klausner - wiz@danbala.tuwien.ac.at
 Intolerance is the last defense of the insecure.

From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/17186: audit-packages ignores DISTDIR
Date: Fri, 7 Jun 2002 18:31:30 +0200

 On Fri, Jun 07, 2002 at 06:30:23PM +0200, Manuel Bouyer wrote:
 > First I'm running a mirror and I trust it to be up-to-date :)
 > And I think it would not be unrealistic for a site with lots of machine,
 > to mirror the vulnerability file to a local ftp server and update
 > the other machines from here.
 > There may even be some cases where it could be the only way to get it
 > (ftp disabled by firewall).

 Nobody forces you to use download-vulnerability-list... especially if
 you know what you're doing.

 Perhaps if you come up with a patch :)
  Thomas

 -- 
 Thomas Klausner - wiz@danbala.tuwien.ac.at
 Intolerance is the last defense of the insecure.

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/17186: audit-packages ignores DISTDIR
Date: Fri, 7 Jun 2002 18:38:58 +0200

 On Fri, Jun 07, 2002 at 06:31:30PM +0200, Thomas Klausner wrote:
 > On Fri, Jun 07, 2002 at 06:30:23PM +0200, Manuel Bouyer wrote:
 > > First I'm running a mirror and I trust it to be up-to-date :)
 > > And I think it would not be unrealistic for a site with lots of machine,
 > > to mirror the vulnerability file to a local ftp server and update
 > > the other machines from here.
 > > There may even be some cases where it could be the only way to get it
 > > (ftp disabled by firewall).
 > 
 > Nobody forces you to use download-vulnerability-list... especially if
 > you know what you're doing.

 Sure, but as it's there ...

 > 
 > Perhaps if you come up with a patch :)

 OK, I'll have a look. Would an evironnement variable be enouth ?

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
      NetBSD: 23 ans d'experience feront toujours la difference
 --
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.