rpms/python/devel python-2.4.1-canonicalize.patch, NONE, 1.1 python.spec, 1.44, 1.45
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Sep 22 15:11:15 UTC 2005
Author: misa
Update of /cvs/dist/rpms/python/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv15179
Modified Files:
python.spec
Added Files:
python-2.4.1-canonicalize.patch
Log Message:
bugzilla: 169046 Make python compile on fc5
python-2.4.1-canonicalize.patch:
Python/sysmodule.c | 9 +++++++++
configure.in | 4 ++--
pyconfig.h.in | 3 +++
3 files changed, 14 insertions(+), 2 deletions(-)
--- NEW FILE python-2.4.1-canonicalize.patch ---
--- Python-2.4.1/pyconfig.h.in.canonicalize 2005-09-14 11:47:04.000000000 -0400
+++ Python-2.4.1/pyconfig.h.in 2005-09-14 11:47:02.000000000 -0400
@@ -58,6 +58,9 @@
/* Define if pthread_sigmask() does not work on your system. */
#undef HAVE_BROKEN_PTHREAD_SIGMASK
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
/* Define to 1 if you have the `chown' function. */
#undef HAVE_CHOWN
--- Python-2.4.1/Python/sysmodule.c.canonicalize 2005-09-14 11:53:30.000000000 -0400
+++ Python-2.4.1/Python/sysmodule.c 2005-09-14 11:52:04.000000000 -0400
@@ -1184,6 +1184,11 @@
char *p = NULL;
int n = 0;
PyObject *a;
+#ifdef HAVE_CANONICALIZE_FILE_NAME
+ argv0 = canonicalize_file_name(argv0);
+ if (argv0 == NULL)
+ Py_FatalError("no mem for sys.argv");
+#else /* ! HAVE_CANONICALIZE_FILE_NAME */
#ifdef HAVE_READLINK
char link[MAXPATHLEN+1];
char argv0copy[2*MAXPATHLEN+1];
@@ -1256,9 +1261,13 @@
#endif /* Unix */
}
#endif /* All others */
+#endif /* ! HAVE_CANONICALIZE_FILE_NAME */
a = PyString_FromStringAndSize(argv0, n);
if (a == NULL)
Py_FatalError("no mem for sys.path insertion");
+#ifdef HAVE_CANONICALIZE_FILE_NAME
+ free(argv0);
+#endif /* HAVE_CANONICALIZE_FILE_NAME */
if (PyList_Insert(path, 0, a) < 0)
Py_FatalError("sys.path.insert(0) failed");
Py_DECREF(a);
--- Python-2.4.1/configure.in.canonicalize 2005-09-14 11:46:00.000000000 -0400
+++ Python-2.4.1/configure.in 2005-09-14 11:47:22.000000000 -0400
@@ -2096,8 +2096,8 @@
AC_MSG_RESULT(MACHDEP_OBJS)
# checks for library functions
-AC_CHECK_FUNCS(alarm bind_textdomain_codeset chown clock confstr ctermid \
- execv fork fpathconf ftime ftruncate \
+AC_CHECK_FUNCS(alarm bind_textdomain_codeset canonicalize_file_name chown \
+ clock confstr ctermid execv fork fpathconf ftime ftruncate \
gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
getpriority getpwent getsid getwd \
kill killpg lchown lstat mkfifo mknod mktime \
Index: python.spec
===================================================================
RCS file: /cvs/dist/rpms/python/devel/python.spec,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- python.spec 20 Sep 2005 13:21:16 -0000 1.44
+++ python.spec 22 Sep 2005 15:11:13 -0000 1.45
@@ -19,7 +19,7 @@
Summary: An interpreted, interactive, object-oriented programming language.
Name: %{python}
Version: %{pybasever}.1
-Release: 4
+Release: 5
License: PSF - see LICENSE
Group: Development/Languages
Provides: python-abi = %{pybasever}
@@ -39,6 +39,7 @@
Patch9: japanese-codecs-lib64.patch
Patch13: python-2.4-distutils-bdist-rpm.patch
Patch14: python-2.3.4-pydocnodoc.patch
+Patch15: pyhton-2.4.1-canonicalize.patch
%if %{main_python}
Obsoletes: Distutils
@@ -142,6 +143,7 @@
%endif
%patch13 -p1 -b .bdist-rpm
%patch14 -p1 -b .no-doc
+%patch14 -p1 -b .canonicalize
# This shouldn't be necesarry, but is right now (2.2a3)
find -name "*~" |xargs rm -f
@@ -354,6 +356,11 @@
%{_libdir}/python%{pybasever}/lib-dynload/_tkinter.so
%changelog
+* Thu Sep 22 2005 Mihai Ibanescu <misa at redhat.com> 2.4.1-5
+- Fixed bug #169046 (realpath is unsafe); thanks to
+ Peter Jones <pjones at redhat.com> and Arjan van de Ven <arjanv at redhat.com> for
+ diagnosing and the patch.
+
* Tue Sep 20 2005 Mihai Ibanescu <misa at redhat.com> 2.4.1-4
- Fixed bug #168655 (fixes for building as python24)
More information about the fedora-cvs-commits
mailing list