Txt file considered as program?

Greg Matthews gmatt at nerc.ac.uk
Mon Jan 7 09:34:05 GMT 2008


Scott Silva wrote:
> Technically it would be a RedHat problem, because CentOS doesn't change 
> the magic file that RedHat ships. But many other distros would also hit 
> some of these. Those magic definitions are very old, and from a time 
> when e-mail was less in use.
> Does anybody have a link to a better magic file?

I take the approach of editing and formatting the magic used by file and 
exclude the file package from updates (exclude=file in /etc/yum.conf).

It's quite a simple process - the flat file and compiled binary data are 
at /usr/share/file/ read the man page for file(1) for details of 
compiling the magic. Copy the /usr/share/file/magic to /tmp, edit to 
your taste and then "file -C -m /tmp/magic" to compile it. Make sure you 
keep a copy of your edited magic file somewhere as its really annoying 
when rpm overwrites it!

the edits that I make are simply to comment out 5 lines that identify 
Apple Quicktime movie files where the first four bytes spell out a word 
or a start of a word (free, junk, skip, wide and pict). So far QT is the 
only false positive I've had to deal with but the same approach can be 
used for others.

hth

GREG

> 
> 


-- 
Greg Matthews           01491 692445
Head of UNIX/Linux, iTSS Wallingford

-- 
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.



More information about the MailScanner mailing list