diff --git a/gedit-2.25.5-fix-python-path.patch b/gedit-2.25.5-fix-python-path.patch index 8d3a21a..49fd077 100644 --- a/gedit-2.25.5-fix-python-path.patch +++ b/gedit-2.25.5-fix-python-path.patch @@ -1,13 +1,23 @@ diff -up gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c.fix-python-path gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c ---- gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c.fix-python-path 2009-01-26 12:36:50.289751027 -0500 -+++ gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c 2009-01-26 12:39:23.668963430 -0500 -@@ -541,6 +541,9 @@ gedit_python_init (GeditPluginLoaderPyth +--- gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c.fix-python-path 2009-01-12 11:23:48.000000000 -0500 ++++ gedit-2.25.5/plugin-loaders/python/gedit-plugin-loader-python.c 2009-01-26 15:35:30.672713673 -0500 +@@ -488,7 +488,7 @@ gedit_python_init (GeditPluginLoaderPyth + PyObject *gettext, *install, *gettext_args; + struct sigaction old_sigint; + gint res; +- char *argv[] = { "gedit", NULL }; ++ char *argv[] = { GEDIT_PLUGINS_LIBS_DIR, NULL }; - PySys_SetArgv (1, argv); - -+ /* Sanitize sys.path, see http://bugzilla.gnome.org/show_bug.cgi?id=569214 */ -+ PyRun_SimpleString ("import sys; sys.path = filter(None, sys.path)"); -+ - if (!gedit_check_pygtk2 ()) + if (loader->priv->init_failed) { - /* Warning message already printed in check_pygtk2 */ +diff -up gedit-2.25.5/plugin-loaders/python/Makefile.am.fix-python-path gedit-2.25.5/plugin-loaders/python/Makefile.am +--- gedit-2.25.5/plugin-loaders/python/Makefile.am.fix-python-path 2009-01-26 15:51:12.102965135 -0500 ++++ gedit-2.25.5/plugin-loaders/python/Makefile.am 2009-01-26 15:35:49.978712718 -0500 +@@ -13,6 +13,7 @@ INCLUDES = \ + $(DISABLE_DEPRECATED_CFLAGS) \ + $(PYGTK_CFLAGS) \ + $(PYTHON_CFLAGS) \ ++ -DGEDIT_PLUGINS_LIBS_DIR=\"$(GEDIT_PLUGINS_LIBS_DIR)\" \ + -DGEDIT_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" + + loader_LTLIBRARIES = libpythonloader.la diff --git a/gedit.spec b/gedit.spec index dc90608..9bfbfd4 100644 --- a/gedit.spec +++ b/gedit.spec @@ -18,7 +18,7 @@ Summary: Text editor for the GNOME desktop Name: gedit Version: 2.25.5 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: GPLv2+ and GFDL Group: Applications/Editors @@ -225,6 +225,9 @@ fi %changelog +* Mon Jan 26 2009 Ray Strode - 1:2.25.5-3 +- Different, more functional fix for bug 481556. + * Mon Jan 26 2009 Ray Strode - 1:2.25.5-2 - Fix up python plugin path to close up a security attack vectors (bug 481556).