From owner-freebsd-audit Wed Aug 8 2:32:59 2001 Delivered-To: freebsd-audit@freebsd.org Received: from ringworld.nanolink.com (discworld.nanolink.com [217.75.135.248]) by hub.freebsd.org (Postfix) with SMTP id B0AC337B401 for ; Wed, 8 Aug 2001 02:32:52 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 10961 invoked by uid 1000); 8 Aug 2001 09:31:39 -0000 Date: Wed, 8 Aug 2001 12:31:39 +0300 From: Peter Pentchev To: Bruce Evans Cc: Mark Peek , audit@FreeBSD.ORG Subject: Re: [PATCH] fix a file(1) minor POLA stretching Message-ID: <20010808123139.G534@ringworld.oblivion.bg> Mail-Followup-To: Bruce Evans , Mark Peek , audit@FreeBSD.ORG References: <20010808183309.M6269-100000@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010808183309.M6269-100000@besplex.bde.org>; from bde@zeta.org.au on Wed, Aug 08, 2001 at 06:45:44PM +1000 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Aug 08, 2001 at 06:45:44PM +1000, Bruce Evans wrote: > On Tue, 7 Aug 2001, Mark Peek wrote: > > > >The fix is simple: build and install the new magic database along > > >with the old file. Patch attached. > > Building at install time breaks installing from readonly object trees > (if the sources somehow become out of date). True. Then how about just generating the magic DB at install time, right into the destination directory? Patch attached. G'luck, Peter -- Hey, out there - is it *you* reading me, or is it someone else? Index: src/usr.bin/file/Makefile =================================================================== RCS file: /home/ncvs/src/usr.bin/file/Makefile,v retrieving revision 1.18 diff -u -r1.18 Makefile --- src/usr.bin/file/Makefile 2001/07/30 03:50:04 1.18 +++ src/usr.bin/file/Makefile 2001/08/08 09:13:22 @@ -58,5 +58,7 @@ beforeinstall: $(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \ magic $(DESTDIR)$(MAGICFILE) + cd ${DESTDIR}${MAGICFILE:H} && \ + ${.OBJDIR}/file -C -m ${DESTDIR}${MAGICFILE} .include To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message