NetBSD Problem Report #36084

From timshel@treebeard.shels.local  Sun Mar 25 16:18:47 2007
Return-Path: <timshel@treebeard.shels.local>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 2125F63B8C3
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 25 Mar 2007 16:18:47 +0000 (UTC)
Message-Id: <20070325145526.0529A21130@treebeard.shels.local>
Date: Mon, 26 Mar 2007 00:54:16 +1000 (EST)
From: timshel@shels.net
Reply-To: timshel@shels.net
To: gnats-bugs@NetBSD.org
Subject: ambiguous file(1) "magic" mis-identifies files
X-Send-Pr-Version: 3.95

>Number:         36084
>Category:       bin
>Synopsis:       ambiguous file(1) "magic" mis-identifies files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 25 16:20:00 +0000 2007
>Closed-Date:    Sun Apr 12 14:21:39 +0000 2020
>Last-Modified:  Sun Apr 12 14:21:39 +0000 2020
>Originator:     Timshel Knoll-Miller
>Release:        NetBSD 3.1
>Organization:
Shels.net
>Environment:
System: NetBSD treebeard.shels.local 3.1 NetBSD 3.1 (GENERIC) #0: Tue Oct 31 04:27:07 UTC 2006 builds@b0.netbsd.org:/home/builds/ab/netbsd-3-1-RELEASE/i386/200610302053Z-obj/home/builds/ab/netbsd-3-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386

>Description:
	file(1)'s magic database contains ambiguous entries which
	erroneously identify general text files as more other complex
	file types

	The specific problem I am experiencing is with a file from
	pkgsrc/net/proftpd from pkgsrc-2006Q4; specifically
	${WRKSRC}/contrib/mod_wrap.c. This file contains the word
	"library" beginning at file offset 60, which matches the
	file(1) magic from src/dist/file/magic/magdir/palm:

# Palm OS .prc file types       
60              string          libr            Palm OS dynamic library data
>0              string          >\0             "%s"


	The magic number is clearly not specific enough.
	The net affect of this problem for me is that I cannot use
	pkgsrc's subst.mk on the affected file without a very ugly
	workaround to this problem.

>How-To-Repeat:
	Run "make extract" in pkgsrc/net/proftpd (pkgsrc-2006Q4) and run
	"file work/proftpd-1.3.1rc2/contrib/mod_wrap.c":

me@myhost ttyp1 proftpd-1.3.1rc2]$ file contrib/mod_wrap.c
contrib/mod_wrap.c: Palm OS dynamic library data "/*"

>Fix:
Remove (or improve) the magic around Palm OS dynamic library data (and
potentially other ambiguous entries?)

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: bin-bug-people->pooka
Responsible-Changed-By: pooka@netbsd.org
Responsible-Changed-When: Tue, 27 Mar 2007 15:56:27 +0300
Responsible-Changed-Why:
I'll handle it.  I need to request netbsd-3 file(1) update anyway.


State-Changed-From-To: open->analyzed
State-Changed-By: pooka@netbsd.org
State-Changed-When: Tue, 27 Mar 2007 15:56:27 +0300
State-Changed-Why:
problem pretty obvious


From: Antti Kantee <pooka@cs.hut.fi>
To: gnats-bugs@NetBSD.org
Cc: christos@netbsd.org
Subject: Re: bin/36084: ambiguous file(1) "magic" mis-identifies files
Date: Tue, 27 Mar 2007 15:54:56 +0300

 On Sun Mar 25 2007 at 16:20:00 +0000, timshel@shels.net wrote:
 > # Palm OS .prc file types       
 > 60              string          libr            Palm OS dynamic library data
 > >0              string          >\0             "%s"
 > 
 > 	
 > 	The magic number is clearly not specific enough.
 > 	The net affect of this problem for me is that I cannot use
 > 	pkgsrc's subst.mk on the affected file without a very ugly
 > 	workaround to this problem.
 > 
 > >How-To-Repeat:
 > 	Run "make extract" in pkgsrc/net/proftpd (pkgsrc-2006Q4) and run
 > 	"file work/proftpd-1.3.1rc2/contrib/mod_wrap.c":
 > 
 > me@myhost ttyp1 proftpd-1.3.1rc2]$ file contrib/mod_wrap.c
 > contrib/mod_wrap.c: Palm OS dynamic library data "/*"

 This is a problem for -current file-4.20 also.

 -- 
 Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
 http://www.iki.fi/pooka/                          http://www.NetBSD.org/
     "la qualité la plus indispensable du cuisinier est l'exactitude"

Responsible-Changed-From-To: pooka->bin-bug-people
Responsible-Changed-By: pooka@NetBSD.org
Responsible-Changed-When: Thu, 14 Jan 2010 23:48:01 +0200
Responsible-Changed-Why:
i'm not working on this currently


State-Changed-From-To: analyzed->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 12 Apr 2020 14:21:39 +0000
State-Changed-Why:
As far as I can tell, this isn't an issue with file 5.38.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.