[gdm] Register /bin/true as URI scheme handler for several schemes



commit d13dd72531599ab7e4c747db3b58a8c17753e08d
Author: Vincent Untz <vuntz gnome org>
Date:   Mon May 23 18:34:46 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                |   10 ++++++++++
 data/mime-dummy-handler.desktop |    6 ++++++
 data/mimeapps.list              |   19 +++++++++++++++++++
 3 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 4b13387..f252b64 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -98,6 +98,8 @@ EXTRA_DIST =			\
 	session-setup.entries	\
 	make-dconf-override-db.sh \
 	dconf-profile \
+	mime-dummy-handler.desktop	\
+	mimeapps.list			\
 	$(NULL)
 
 CLEANFILES = 				\
@@ -247,6 +249,12 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
 		chown gdm:gdm $(DESTDIR)$(workingdir)/.config/dconf || : ; \
 	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)$(sysconfdir)/dconf/profile; then \
 		$(mkinstalldirs) $(DESTDIR)$(sysconfdir)/dconf/profile; \
 		chmod 0755 $(DESTDIR)$(sysconfdir)/dconf/profile; \
@@ -275,3 +283,5 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
 	$(INSTALL_DATA) $(srcdir)/dconf-override-db $(DESTDIR)$(sysconfdir)/dconf/db/gdm
 	$(INSTALL_DATA) $(srcdir)/dconf-profile $(DESTDIR)$(sysconfdir)/dconf/profile/gdm
 
+	$(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]