[gdm/gnome-2-32] Register /bin/true as URI scheme handler for several schemes
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-2-32] Register /bin/true as URI scheme handler for several schemes
- Date: Tue, 31 May 2011 14:37:40 +0000 (UTC)
commit c721deb4c3dbf170946af8ee3634327c06ea4536
Author: Vincent Untz <vuntz gnome org>
Date: Tue May 31 16:37:22 2011 +0200
Register /bin/true as URI scheme handler for several schemes
Starting with glib 2.28, we don't use gconf to find out which handler
should be used for a URI scheme, and we need to provide a custom MIME
configuration for the gdm user to ensure no default URI scheme handler
is used.
CVE-2011-1709
data/Makefile.am | 11 ++++++++++-
data/mime-dummy-handler.desktop | 6 ++++++
data/mimeapps.list | 19 +++++++++++++++++++
3 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 8624306..1e9a5ff 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -94,6 +94,8 @@ EXTRA_DIST = \
PostLogin \
gconf.path \
session-setup.entries \
+ mime-dummy-handler.desktop \
+ mimeapps.list \
$(NULL)
CLEANFILES = \
@@ -222,6 +224,12 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
chown root:gdm $(DESTDIR)$(workingdir) || : ; \
fi
+ if test '!' -d $(DESTDIR)$(workingdir)/.local/share/applications; then \
+ $(mkinstalldirs) $(DESTDIR)$(workingdir)/.local/share/applications; \
+ chmod 0755 $(DESTDIR)$(workingdir)/.local/share/applications; \
+ chown gdm:gdm $(DESTDIR)$(workingdir)/.local/share/applications || : ; \
+ fi
+
if test '!' -d $(DESTDIR)$(cachedir); then \
$(mkinstalldirs) $(DESTDIR)$(cachedir); \
chmod 1755 $(DESTDIR)$(cachedir); \
@@ -235,4 +243,5 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
chmod 1750 $(DESTDIR)$(workingdir)/.gconf.mandatory
chmod 1640 $(DESTDIR)$(workingdir)/.gconf.mandatory/*.xml
-
+ $(INSTALL_DATA) $(srcdir)/mime-dummy-handler.desktop $(DESTDIR)$(workingdir)/.local/share/applications/mime-dummy-handler.desktop
+ $(INSTALL_DATA) $(srcdir)/mimeapps.list $(DESTDIR)$(workingdir)/.local/share/applications/mimeapps.list
diff --git a/data/mime-dummy-handler.desktop b/data/mime-dummy-handler.desktop
new file mode 100644
index 0000000..c94779c
--- /dev/null
+++ b/data/mime-dummy-handler.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Application
+Name=Dummy URI Handler
+Exec=/bin/true %U
+Terminal=false
+StartupNotify=false
diff --git a/data/mimeapps.list b/data/mimeapps.list
new file mode 100644
index 0000000..db3a144
--- /dev/null
+++ b/data/mimeapps.list
@@ -0,0 +1,19 @@
+[Default Applications]
+x-scheme-handler/file=mime-dummy-handler.desktop
+x-scheme-handler/ftp=mime-dummy-handler.desktop
+x-scheme-handler/ghelp=mime-dummy-handler.desktop
+x-scheme-handler/help=mime-dummy-handler.desktop
+x-scheme-handler/http=mime-dummy-handler.desktop
+x-scheme-handler/https=mime-dummy-handler.desktop
+x-scheme-handler/info=mime-dummy-handler.desktop
+x-scheme-handler/irc=mime-dummy-handler.desktop
+x-scheme-handler/itms=mime-dummy-handler.desktop
+x-scheme-handler/mailto=mime-dummy-handler.desktop
+x-scheme-handler/man=mime-dummy-handler.desktop
+x-scheme-handler/mms=mime-dummy-handler.desktop
+x-scheme-handler/rtp=mime-dummy-handler.desktop
+x-scheme-handler/rtsp=mime-dummy-handler.desktop
+x-scheme-handler/sip=mime-dummy-handler.desktop
+x-scheme-handler/trash=mime-dummy-handler.desktop
+x-scheme-handler/webcal=mime-dummy-handler.desktop
+x-scheme-handler/xmpp=mime-dummy-handler.desktop
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]