[mod_python] fix #633905 - fixed AVC message caused by accessing ~/.local directory
Jan Kaluža
jkaluza at fedoraproject.org
Thu Jul 14 08:16:22 UTC 2011
commit 72b160bc25aa21f3213847fabfa25e9f04615125
Author: Jan Kaluza <hanzz.k at gmail.com>
Date: Thu Jul 14 10:15:24 2011 +0200
fix #633905 - fixed AVC message caused by accessing ~/.local directory
mod_python-3.3.1-no-user-site-directory.patch | 16 ++++++++++++++++
mod_python.spec | 7 ++++++-
2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/mod_python-3.3.1-no-user-site-directory.patch b/mod_python-3.3.1-no-user-site-directory.patch
new file mode 100644
index 0000000..09729bc
--- /dev/null
+++ b/mod_python-3.3.1-no-user-site-directory.patch
@@ -0,0 +1,16 @@
+diff --git a/src/mod_python.c b/src/mod_python.c
+index 1c8e90e..01cfb1d 100644
+--- a/src/mod_python.c
++++ b/src/mod_python.c
+@@ -796,7 +796,10 @@ static int python_init(apr_pool_t *p, apr_pool_t *ptemp,
+ if (initialized == 0 || !Py_IsInitialized())
+ {
+ initialized = 1;
+-
++
++ /* disable user site directories */
++ Py_NoUserSiteDirectory = 1;
++
+ /* initialze the interpreter */
+ Py_Initialize();
+
diff --git a/mod_python.spec b/mod_python.spec
index da8e497..036a2e6 100644
--- a/mod_python.spec
+++ b/mod_python.spec
@@ -3,13 +3,14 @@
Summary: An embedded Python interpreter for the Apache HTTP Server
Name: mod_python
Version: 3.3.1
-Release: 15%{?dist}
+Release: 16%{?dist}
Source: http://www.apache.org/dist/httpd/modpython/%{name}-%{version}.tgz
Source1: python.conf
Patch1: mod_python-3.1.3-ldflags.patch
Patch2: mod_python-3.1.4-cflags.patch
Patch3: mod_python-3.3.1-buckets.patch
Patch4: mod_python-3.3.1-pycapsule.patch
+Patch5: mod_python-3.3.1-no-user-site-directory.patch
URL: http://www.modpython.org/
License: ASL 2.0
@@ -32,6 +33,7 @@ performance over the traditional CGI approach.
%patch2 -p1 -b .cflags
%patch3 -p1 -b .buckets
%patch4 -p1 -b .capsule
+%patch5 -p1 -b .no-user-site-directory
# Convert to utf-8
for file in CREDITS NEWS; do
@@ -65,6 +67,9 @@ cp -a doc-html/* $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_python/
%{python_sitearch}/mod_python*
%changelog
+* Thu Jul 14 2011 Jan Kaluza <jkaluza at redhat.com> - 3.3.1-16
+- fix #633905 - fixed AVC message caused by accessing ~/.local directory
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.3.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list