aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-06 16:39:04 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-06 16:39:04 +0800
commit665035daca3b08898e1d838d38c65fbe5f36ff95 (patch)
treef4f14a60607e560f8a5d38552d3f092248494560 /data
parentdfd17005ee1f28b31a3e07a31e0f2fc5afc70596 (diff)
downloadgsoc2013-epiphany-665035daca3b08898e1d838d38c65fbe5f36ff95.tar
gsoc2013-epiphany-665035daca3b08898e1d838d38c65fbe5f36ff95.tar.gz
gsoc2013-epiphany-665035daca3b08898e1d838d38c65fbe5f36ff95.tar.bz2
gsoc2013-epiphany-665035daca3b08898e1d838d38c65fbe5f36ff95.tar.lz
gsoc2013-epiphany-665035daca3b08898e1d838d38c65fbe5f36ff95.tar.xz
gsoc2013-epiphany-665035daca3b08898e1d838d38c65fbe5f36ff95.tar.zst
gsoc2013-epiphany-665035daca3b08898e1d838d38c65fbe5f36ff95.zip
Add a list of permissions for mime and a script to update it (py hackers
2003-11-06 Marco Pesenti Gritti <marco@gnome.org> * data/Makefile.am: * data/check-mime.py: * data/mime-types-permissions.xml: Add a list of permissions for mime and a script to update it (py hackers please forgive me). I put only very obvious items in the safe list for now.
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am6
-rwxr-xr-xdata/check-mime.py33
-rwxr-xr-xdata/mime-types-permissions.xml354
3 files changed, 392 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 8fb44d6f0..7f5fcfb2f 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -34,6 +34,9 @@ schema_DATA = epiphany.schemas
aboutdir = $(pkgdatadir)
about_DATA = epiphany.xhtml conspiracy.xhtml
+mimepermissiondir = $(pkgdatadir)
+mimepermission_DATA = mime-types-permissions.xml
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = epiphany-1.0.pc
@@ -50,7 +53,8 @@ EXTRA_DIST = $(NAUTILUS_VIEW_SERVER) \
$(DESKTOP_IN_FILES) \
$(about_DATA) \
$(applications_DATA) \
- $(pkgconfig_DATA)
+ $(pkgconfig_DATA) \
+ check_mime.py
DISTCLEANFILES = \
$(nautilus_server_DATA) \
diff --git a/data/check-mime.py b/data/check-mime.py
new file mode 100755
index 000000000..59d1d3383
--- /dev/null
+++ b/data/check-mime.py
@@ -0,0 +1,33 @@
+from xml.dom.minidom import parse, Node, Document, parseString
+import xml.parsers.expat
+
+import os
+import sys
+
+base = sys.argv[0]
+dbfile = os.path.join(os.path.dirname(base), "freedesktop.org.xml")
+permissionfile = os.path.join(os.path.dirname(base), "mime-types-permissions.xml")
+
+def PrintIfAbsent(elements, elem):
+ for elem2 in elements:
+ if (elem.attributes["type"].value == elem2.attributes["type"].value):
+ return;
+ print ("<mime-type type=\"" + elem.attributes["type"].value + "\"/>");
+
+def ExtractTypes():
+ dbdom = parse(dbfile)
+ permissiondom = parse(permissionfile);
+ dbelements = dbdom.getElementsByTagName("mime-type");
+ permissionelements = permissiondom.getElementsByTagName("mime-type");
+ print ("New types:");
+ print ("----------\n");
+ for elem in dbelements:
+ PrintIfAbsent(permissionelements, elem)
+ print ("\nTypes removed:");
+ print ("--------------\n");
+ for elem in permissionelements:
+ PrintIfAbsent(dbelements, elem)
+ dbdom.unlink();
+ permissiondom.unlink();
+
+ExtractTypes();
diff --git a/data/mime-types-permissions.xml b/data/mime-types-permissions.xml
new file mode 100755
index 000000000..27922d1a7
--- /dev/null
+++ b/data/mime-types-permissions.xml
@@ -0,0 +1,354 @@
+<mime-types-permissions>
+<safe>
+<mime-type type="application/vnd.lotus-1-2-3"/>
+<mime-type type="application/vnd.ms-excel"/>
+<mime-type type="application/vnd.ms-powerpoint"/>
+<mime-type type="application/vnd.ms-word"/>
+<mime-type type="application/vnd.rn-realmedia"/>
+<mime-type type="application/vnd.stardivision.calc"/>
+<mime-type type="application/vnd.stardivision.chart"/>
+<mime-type type="application/vnd.stardivision.draw"/>
+<mime-type type="application/vnd.stardivision.impress"/>
+<mime-type type="application/vnd.stardivision.mail"/>
+<mime-type type="application/vnd.stardivision.math"/>
+<mime-type type="application/vnd.stardivision.writer"/>
+<mime-type type="application/vnd.sun.xml.calc"/>
+<mime-type type="application/vnd.sun.xml.calc.template"/>
+<mime-type type="application/vnd.sun.xml.draw"/>
+<mime-type type="application/vnd.sun.xml.draw.template"/>
+<mime-type type="application/vnd.sun.xml.impress"/>
+<mime-type type="application/vnd.sun.xml.impress.template"/>
+<mime-type type="application/vnd.sun.xml.math"/>
+<mime-type type="application/vnd.sun.xml.writer"/>
+<mime-type type="application/vnd.sun.xml.writer.global"/>
+<mime-type type="application/vnd.sun.xml.writer.template"/>
+<mime-type type="application/wordperfect"/>
+<mime-type type="application/x-abiword"/>
+<mime-type type="application/x-amipro"/>
+<mime-type type="application/x-applix-spreadsheet"/>
+<mime-type type="application/x-applix-word"/>
+<mime-type type="audio/ac3"/>
+<mime-type type="audio/basic"/>
+<mime-type type="audio/prs.sid"/>
+<mime-type type="audio/vnd.rn-realaudio"/>
+<mime-type type="audio/x-adpcm"/>
+<mime-type type="audio/x-aifc"/>
+<mime-type type="audio/x-aiff"/>
+<mime-type type="audio/x-aiffc"/>
+<mime-type type="audio/x-it"/>
+<mime-type type="audio/midi"/>
+<mime-type type="audio/x-mod"/>
+<mime-type type="audio/x-mp3"/>
+<mime-type type="audio/x-mp3-playlist"/>
+<mime-type type="audio/x-mpeg"/>
+<mime-type type="audio/x-mpegurl"/>
+<mime-type type="audio/x-pn-realaudio"/>
+<mime-type type="audio/x-riff"/>
+<mime-type type="audio/x-s3m"/>
+<mime-type type="audio/x-scpls"/>
+<mime-type type="audio/x-stm"/>
+<mime-type type="audio/x-voc"/>
+<mime-type type="audio/x-wav"/>
+<mime-type type="audio/x-xi"/>
+<mime-type type="audio/x-xm"/>
+<mime-type type="image/bmp"/>
+<mime-type type="image/cgm"/>
+<mime-type type="image/fax-g3"/>
+<mime-type type="image/g3fax"/>
+<mime-type type="image/gif"/>
+<mime-type type="image/ief"/>
+<mime-type type="image/jpeg"/>
+<mime-type type="image/png"/>
+<mime-type type="image/svg+xml"/>
+<mime-type type="image/tiff"/>
+<mime-type type="image/vnd.dwg"/>
+<mime-type type="image/vnd.dxf"/>
+<mime-type type="image/x-3ds"/>
+<mime-type type="image/x-applix-graphics"/>
+<mime-type type="image/x-cmu-raster"/>
+<mime-type type="image/x-compressed-xcf"/>
+<mime-type type="image/x-djvu"/>
+<mime-type type="image/x-eps"/>
+<mime-type type="image/x-ico"/>
+<mime-type type="image/x-iff"/>
+<mime-type type="image/x-ilbm"/>
+<mime-type type="image/x-jng"/>
+<mime-type type="image/x-lwo"/>
+<mime-type type="image/x-lws"/>
+<mime-type type="image/x-msod"/>
+<mime-type type="image/x-niff"/>
+<mime-type type="image/x-pcx"/>
+<mime-type type="image/x-photo-cd"/>
+<mime-type type="image/x-portable-anymap"/>
+<mime-type type="image/x-portable-bitmap"/>
+<mime-type type="image/x-portable-graymap"/>
+<mime-type type="image/x-portable-pixmap"/>
+<mime-type type="image/x-psd"/>
+<mime-type type="image/x-rgb"/>
+<mime-type type="image/x-tga"/>
+<mime-type type="image/x-wmf"/>
+<mime-type type="image/x-xbitmap"/>
+<mime-type type="image/x-xcf"/>
+<mime-type type="image/x-xfig"/>
+<mime-type type="image/x-xpixmap"/>
+<mime-type type="image/x-xwindowdump"/>
+<mime-type type="video/isivideo"/>
+<mime-type type="video/mpeg"/>
+<mime-type type="video/quicktime"/>
+<mime-type type="video/vivo"/>
+<mime-type type="video/wavelet"/>
+<mime-type type="video/x-anim"/>
+<mime-type type="video/x-avi"/>
+<mime-type type="video/x-flic"/>
+<mime-type type="video/x-mng"/>
+<mime-type type="video/x-ms-asf"/>
+<mime-type type="video/x-ms-wmv"/>
+<mime-type type="video/x-msvideo"/>
+<mime-type type="video/x-real-video"/>
+<mime-type type="video/x-sgi-movie"/>
+<mime-type type="application/andrew-inset"/>
+<mime-type type="application/illustrator"/>
+</safe>
+<unsafe>
+<mime-type type="application/mac-binhex40"/>
+<mime-type type="application/msword"/>
+<mime-type type="application/octet-stream"/>
+<mime-type type="application/oda"/>
+<mime-type type="application/pdf"/>
+<mime-type type="application/pgp"/>
+<mime-type type="application/pgp-encrypted"/>
+<mime-type type="application/pgp-keys"/>
+<mime-type type="application/pgp-signature"/>
+<mime-type type="application/pkcs7-mime"/>
+<mime-type type="application/pkcs7-signature"/>
+<mime-type type="application/postscript"/>
+<mime-type type="application/rtf"/>
+<mime-type type="application/smil"/>
+<mime-type type="application/x-arc"/>
+<mime-type type="application/x-archive"/>
+<mime-type type="application/x-arj"/>
+<mime-type type="application/x-asp"/>
+<mime-type type="application/x-awk"/>
+<mime-type type="application/x-bcpio"/>
+<mime-type type="application/x-bzip"/>
+<mime-type type="application/x-bzip-compressed-tar"/>
+<mime-type type="application/x-cd-image"/>
+<mime-type type="application/x-cgi"/>
+<mime-type type="application/x-chess-pgn"/>
+<mime-type type="application/x-class-file"/>
+<mime-type type="application/x-compress"/>
+<mime-type type="application/x-compressed-tar"/>
+<mime-type type="application/x-core"/>
+<mime-type type="application/x-cpio"/>
+<mime-type type="application/x-cpio-compressed"/>
+<mime-type type="application/x-csh"/>
+<mime-type type="application/x-dbase"/>
+<mime-type type="application/x-dbm"/>
+<mime-type type="application/x-dc-rom"/>
+<mime-type type="application/x-deb"/>
+<mime-type type="application/x-designer"/>
+<mime-type type="application/x-desktop"/>
+<mime-type type="application/x-dia-diagram"/>
+<mime-type type="application/x-dvi"/>
+<mime-type type="application/x-e-theme"/>
+<mime-type type="application/x-egon"/>
+<mime-type type="application/x-executable"/>
+<mime-type type="application/x-font"/>
+<mime-type type="application/x-font-afm"/>
+<mime-type type="application/x-font-bdf"/>
+<mime-type type="application/x-font-dos"/>
+<mime-type type="application/x-font-framemaker"/>
+<mime-type type="application/x-font-libgrx"/>
+<mime-type type="application/x-font-linux-psf"/>
+<mime-type type="application/x-font-pcf"/>
+<mime-type type="application/x-font-speedo"/>
+<mime-type type="application/x-font-sunos-news"/>
+<mime-type type="application/x-font-tex"/>
+<mime-type type="application/x-font-tex-tfm"/>
+<mime-type type="application/x-font-ttf"/>
+<mime-type type="application/x-font-vfont"/>
+<mime-type type="application/x-frame"/>
+<mime-type type="application/x-gameboy-rom"/>
+<mime-type type="application/x-gdbm"/>
+<mime-type type="application/x-genesis-rom"/>
+<mime-type type="application/x-gettext-translation"/>
+<mime-type type="application/x-glade"/>
+<mime-type type="application/x-gmc-link"/>
+<mime-type type="application/x-gnucash"/>
+<mime-type type="application/x-gnumeric"/>
+<mime-type type="application/x-graphite"/>
+<mime-type type="application/x-gtar"/>
+<mime-type type="application/x-gtktalog"/>
+<mime-type type="application/x-gzip"/>
+<mime-type type="application/x-gzpostscript"/>
+<mime-type type="application/x-hdf"/>
+<mime-type type="application/x-jar"/>
+<mime-type type="application/x-java"/>
+<mime-type type="application/x-jbuilder-project"/>
+<mime-type type="application/x-karbon"/>
+<mime-type type="application/x-kchart"/>
+<mime-type type="application/x-kformula"/>
+<mime-type type="application/x-killustrator"/>
+<mime-type type="application/x-kivio"/>
+<mime-type type="application/x-kontour"/>
+<mime-type type="application/x-kpovmodeler"/>
+<mime-type type="application/x-kpresenter"/>
+<mime-type type="application/x-krita"/>
+<mime-type type="application/x-kspread"/>
+<mime-type type="application/x-kspread-crypt"/>
+<mime-type type="application/x-ksysv-package"/>
+<mime-type type="application/x-kugar"/>
+<mime-type type="application/x-kword"/>
+<mime-type type="application/x-kword-crypt"/>
+<mime-type type="application/x-lha"/>
+<mime-type type="application/x-lhz"/>
+<mime-type type="application/x-linguist"/>
+<mime-type type="application/x-lyx"/>
+<mime-type type="application/x-lzop"/>
+<mime-type type="application/x-mif"/>
+<mime-type type="application/x-mswinurl"/>
+<mime-type type="application/x-mswrite"/>
+<mime-type type="application/x-msx-rom"/>
+<mime-type type="application/x-n64-rom"/>
+<mime-type type="application/x-nautilus-link"/>
+<mime-type type="application/x-nes-rom"/>
+<mime-type type="application/x-netcdf"/>
+<mime-type type="application/x-object"/>
+<mime-type type="application/ogg"/>
+<mime-type type="application/x-oleo"/>
+<mime-type type="application/x-palm-database"/>
+<mime-type type="application/x-pef-executable"/>
+<mime-type type="application/x-perl"/>
+<mime-type type="application/x-php"/>
+<mime-type type="application/x-pkcs12"/>
+<mime-type type="application/x-profile"/>
+<mime-type type="application/x-pw"/>
+<mime-type type="application/x-python"/>
+<mime-type type="application/x-python-bytecode"/>
+<mime-type type="application/x-quattropro"/>
+<mime-type type="application/x-qw"/>
+<mime-type type="application/x-rar"/>
+<mime-type type="application/x-reject"/>
+<mime-type type="application/x-rpm"/>
+<mime-type type="application/x-ruby"/>
+<mime-type type="application/x-sc"/>
+<mime-type type="application/x-shar"/>
+<mime-type type="application/x-shared-library-la"/>
+<mime-type type="application/x-sharedlib"/>
+<mime-type type="application/x-shellscript"/>
+<mime-type type="application/x-shockwave-flash"/>
+<mime-type type="application/x-siag"/>
+<mime-type type="application/x-slp"/>
+<mime-type type="application/x-sms-rom"/>
+<mime-type type="application/x-stuffit"/>
+<mime-type type="application/x-sv4cpio"/>
+<mime-type type="application/x-sv4crc"/>
+<mime-type type="application/x-tar"/>
+<mime-type type="application/x-tarz"/>
+<mime-type type="application/x-tex-gf"/>
+<mime-type type="application/x-tex-pk"/>
+<mime-type type="application/x-tgif"/>
+<mime-type type="application/x-theme"/>
+<mime-type type="application/x-toutdoux"/>
+<mime-type type="application/x-trash"/>
+<mime-type type="application/x-troff"/>
+<mime-type type="application/x-troff-man"/>
+<mime-type type="application/x-troff-man-compressed"/>
+<mime-type type="application/x-tzo"/>
+<mime-type type="application/x-ustar"/>
+<mime-type type="application/x-wais-source"/>
+<mime-type type="application/x-x509-ca-cert"/>
+<mime-type type="application/x-zerosize"/>
+<mime-type type="application/x-zoo"/>
+<mime-type type="application/xhtml+xml"/>
+<mime-type type="application/zip"/>
+<mime-type type="inode/blockdevice"/>
+<mime-type type="inode/chardevice"/>
+<mime-type type="inode/directory"/>
+<mime-type type="inode/fifo"/>
+<mime-type type="inode/socket"/>
+<mime-type type="inode/symlink"/>
+<mime-type type="message/delivery-status"/>
+<mime-type type="message/disposition-notification"/>
+<mime-type type="message/external-body"/>
+<mime-type type="message/news"/>
+<mime-type type="message/partial"/>
+<mime-type type="message/rfc822"/>
+<mime-type type="message/x-gnu-rmail"/>
+<mime-type type="model/vrml"/>
+<mime-type type="multipart/alternative"/>
+<mime-type type="multipart/appledouble"/>
+<mime-type type="multipart/digest"/>
+<mime-type type="multipart/encrypted"/>
+<mime-type type="multipart/mixed"/>
+<mime-type type="multipart/related"/>
+<mime-type type="multipart/report"/>
+<mime-type type="multipart/signed"/>
+<mime-type type="multipart/x-mixed-replace"/>
+<mime-type type="text/calendar"/>
+<mime-type type="text/css"/>
+<mime-type type="text/directory"/>
+<mime-type type="text/enriched"/>
+<mime-type type="text/x-gettext-translation"/>
+<mime-type type="text/html"/>
+<mime-type type="text/htmlh"/>
+<mime-type type="text/mathml"/>
+<mime-type type="text/plain"/>
+<mime-type type="text/rdf"/>
+<mime-type type="text/rfc822-headers"/>
+<mime-type type="text/richtext"/>
+<mime-type type="text/rss"/>
+<mime-type type="text/sgml"/>
+<mime-type type="text/spreadsheet"/>
+<mime-type type="text/tab-separated-values"/>
+<mime-type type="text/vnd.wap.wml"/>
+<mime-type type="text/x-adasrc"/>
+<mime-type type="text/x-authors"/>
+<mime-type type="text/x-bibtex"/>
+<mime-type type="text/x-c++hdr"/>
+<mime-type type="text/x-c++src"/>
+<mime-type type="text/x-chdr"/>
+<mime-type type="text/x-comma-separated-values"/>
+<mime-type type="text/x-copying"/>
+<mime-type type="text/x-credits"/>
+<mime-type type="text/x-csrc"/>
+<mime-type type="text/x-dcl"/>
+<mime-type type="text/x-diff"/>
+<mime-type type="text/x-dsl"/>
+<mime-type type="text/x-dtd"/>
+<mime-type type="text/x-emacs-lisp"/>
+<mime-type type="text/x-fortran"/>
+<mime-type type="text/x-gtkrc"/>
+<mime-type type="text/x-haskell"/>
+<mime-type type="text/x-idl"/>
+<mime-type type="text/x-install"/>
+<mime-type type="text/x-java"/>
+<mime-type type="text/x-ksh"/>
+<mime-type type="text/x-ksysv-log"/>
+<mime-type type="text/x-literate-haskell"/>
+<mime-type type="text/x-log"/>
+<mime-type type="text/x-makefile"/>
+<mime-type type="text/x-moc"/>
+<mime-type type="text/x-objcsrc"/>
+<mime-type type="text/x-pascal"/>
+<mime-type type="text/x-patch"/>
+<mime-type type="text/x-readme"/>
+<mime-type type="text/x-scheme"/>
+<mime-type type="text/x-setext"/>
+<mime-type type="text/x-speech"/>
+<mime-type type="text/x-sql"/>
+<mime-type type="text/x-tcl"/>
+<mime-type type="text/x-tex"/>
+<mime-type type="text/x-texinfo"/>
+<mime-type type="text/x-troff-me"/>
+<mime-type type="text/x-troff-mm"/>
+<mime-type type="text/x-troff-ms"/>
+<mime-type type="text/x-uri"/>
+<mime-type type="text/x-vcalendar"/>
+<mime-type type="text/x-vcard"/>
+<mime-type type="text/x-xslfo"/>
+<mime-type type="text/x-xslt"/>
+<mime-type type="text/xmcd"/>
+<mime-type type="text/xml"/>
+</unsafe>
+</mime-types-permissions>