Bug 6743

Summary: fix for C-like source code MIME types
Product: shared-mime-info Reporter: Stanislav Brabec <sbrabec>
Component: freedesktop.org.xmlAssignee: Jonathan Blandford <jrb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: bugzilla
Version: unspecifiedKeywords: patch
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: shared-mime-info-csrc.patch

Description Stanislav Brabec 2006-04-26 02:05:25 UTC
Problem:

C source code definition in shared-mime-info-0.17 contains vague magic. Other
C-like source codes fit these MIME types, and this fact causes MIME type
conflict between content MIME type and suffix MIME type and it causes security
warning in Nautilus.

Possible fixes:

- Remove this vague magic. (C source code without suffix will not be recognized)

- Define C-like MIME types as sub-class-of C source. (Any C-like source code
without proper suffix will be recognized as C source. Code with proper suffix
will be recognized exactly.)

Proposed patch uses the second way. It does:

Defines all C-like (header and source) MIME types as sub-class-of "C source
code" (with exception of C++ header, which is defined as sub-class of C header).

Moves *.h++ and *.hp from C header to C++ header.

Removes now obsolete duplicated magic definitions and keeps only unique ones.

Decreases priority of "/*" and "//" to prevent previous XPM high-priority
problem (just fixed) and future problems.
Comment 1 Stanislav Brabec 2006-04-26 02:05:53 UTC
Created attachment 5473 [details] [review]
shared-mime-info-csrc.patch
Comment 2 Bastien Nocera 2006-05-14 20:59:49 UTC
2006-05-14  Bastien Nocera  <hadess@hadess.net>

        * freedesktop.org.xml.in: patch from Stanislav Brabec <sbrabec@suse.cz>
        to clarify C, C++, C# and ObjC headers and sources (Closes: #6743)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.