gedit (2.30.4-1squeeze1) 03_python_path.patch

Summary

 plugin-loaders/python/Makefile.am                  |    1 +
 plugin-loaders/python/Makefile.in                  |    1 +
 plugin-loaders/python/gedit-plugin-loader-python.c |    2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

Description: CVE-2009-0314: Untrusted search path vulnerability
Bug: http://bugzilla.gnome.org/show_bug.cgi?id=569214

--- a/plugin-loaders/python/gedit-plugin-loader-python.c
+++ b/plugin-loaders/python/gedit-plugin-loader-python.c
@@ -486,7 +486,7 @@
 	PyObject *mdict, *tuple;
 	PyObject *gedit, *geditutils, *geditcommands, *geditplugins;
 	PyObject *gettext, *install, *gettext_args;
-	char *argv[] = { "gedit", NULL };
+	char *argv[] = { GEDIT_PLUGINS_LIBS_DIR, NULL };
 #ifdef HAVE_SIGACTION
 	gint res;
 	struct sigaction old_sigint;
--- a/plugin-loaders/python/Makefile.in
+++ b/plugin-loaders/python/Makefile.in
@@ -375,6 +375,7 @@
 	$(DISABLE_DEPRECATED_CFLAGS)					\
 	$(PYGTK_CFLAGS)							\
 	$(PYTHON_CFLAGS)						\
+	-DGEDIT_PLUGINS_LIBS_DIR=\"$(GEDIT_PLUGINS_LIBS_DIR)\"		\
 	-DGEDIT_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
 
 loader_LTLIBRARIES = libpythonloader.la
--- a/plugin-loaders/python/Makefile.am
+++ b/plugin-loaders/python/Makefile.am
@@ -13,6 +13,7 @@
 	$(DISABLE_DEPRECATED_CFLAGS)					\
 	$(PYGTK_CFLAGS)							\
 	$(PYTHON_CFLAGS)						\
+	-DGEDIT_PLUGINS_LIBS_DIR=\"$(GEDIT_PLUGINS_LIBS_DIR)\"		\
 	-DGEDIT_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
 
 loader_LTLIBRARIES = libpythonloader.la