From 76b3cbd1a9886d1f5297cf40df6da61fd9d84f7d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 30 2017 13:43:45 +0000 Subject: import mod_fcgid-2.3.9-4.el7_4.1 --- diff --git a/SOURCES/mod_fcgid-2.1-README.RPM b/SOURCES/mod_fcgid-2.1-README.RPM deleted file mode 100644 index 89165c5..0000000 --- a/SOURCES/mod_fcgid-2.1-README.RPM +++ /dev/null @@ -1,75 +0,0 @@ -Using the mod_fcgid RPM Package -=============================== - -This mod_fcgid package includes a configuration file -/etc/httpd/conf.d/fcgid.conf that ensures that the module is loaded and -added as the handler for .fcg, .fcgi, and .fpl applications. - -Example: setting up moin with mod_fcgid -======================================= - -Setting up moin with mod_fcgid is very similar to setting it up as a regular -CGI application. - - * Create a directory for your wiki instance: - - DESTDIR=/var/www/mywiki - mkdir -p $DESTDIR/cgi-bin - - * Copy in the wiki template data and the application itself: - - cp -a /usr/share/moin/{data,underlay} $DESTDIR - cp -a /usr/share/moin/server/moin.fcg $DESTDIR/cgi-bin - cp -a /usr/share/moin/config/wikiconfig.py $DESTDIR/cgi-bin - - * Fix the directory ownership - - chown -R apache:apache $DESTDIR/{data,underlay} - - * Edit $DESTDIR/cgi-bin/wikiconfig.py to suit your needs - - * Create a httpd configuration file for the wiki, e.g. - /etc/httpd/conf.d/mywiki.conf - - # Wiki application data common to all wiki instances - Alias /moin_static185 "/usr/share/moin/htdocs/" - - Options Indexes FollowSymLinks - AllowOverride None - Order allow,deny - Allow from all - - ExpiresActive On - ExpiresDefault "access plus 1 year" - - - - # Wiki instance with mod_fcgid - - ScriptAlias /mywiki "/var/www/mywiki/cgi-bin/moin.fcg" - - Options Indexes FollowSymLinks ExecCGI - AllowOverride None - Order allow,deny - Allow from all - - - - * Restart the web server to load the new configuration: - - service httpd restart - -That should do it! - -Ruby on Rails with mod_fcgid -============================ - -One of the differences between mod_fastcgi and mod_fcgid is that the former -sets the SCRIPT_NAME environment variable whilst the latter does not, and it's -reported (http://bugzilla.redhat.com/476658) that Ruby on Rails expects this -environment variable to be present. A workaround for this is to add: - -ActionController::AbstractRequest.relative_url_root = "" - -to the Rails::Initializer.run segment of config/environment.rb - diff --git a/SOURCES/mod_fcgid-2.3.9-segfault-upload.patch b/SOURCES/mod_fcgid-2.3.9-segfault-upload.patch new file mode 100644 index 0000000..099be55 --- /dev/null +++ b/SOURCES/mod_fcgid-2.3.9-segfault-upload.patch @@ -0,0 +1,49 @@ +diff --git a/modules/fcgid/fcgid_proc_unix.c b/modules/fcgid/fcgid_proc_unix.c +index 218f3f7..8b69a89 100644 +--- a/modules/fcgid/fcgid_proc_unix.c ++++ b/modules/fcgid/fcgid_proc_unix.c +@@ -762,14 +762,15 @@ apr_status_t proc_write_ipc(fcgid_ipc *ipc_handle, + struct iovec vec[FCGID_VEC_COUNT]; + int nvec = 0; + apr_bucket *e; ++ apr_bucket_brigade* tmpbb = apr_brigade_create(output_brigade->p,output_brigade->bucket_alloc); + +- for (e = APR_BRIGADE_FIRST(output_brigade); +- e != APR_BRIGADE_SENTINEL(output_brigade); +- e = APR_BUCKET_NEXT(e)) { ++ while (!APR_BRIGADE_EMPTY(output_brigade)) { ++ e = APR_BRIGADE_FIRST(output_brigade); + apr_size_t len; + const char* base; + + if (APR_BUCKET_IS_METADATA(e)) { ++ apr_bucket_delete(e); + continue; + } + +@@ -780,6 +781,9 @@ apr_status_t proc_write_ipc(fcgid_ipc *ipc_handle, + return rv; + } + ++ APR_BUCKET_REMOVE(e); ++ APR_BRIGADE_INSERT_TAIL(tmpbb, e); ++ + vec[nvec].iov_len = len; + vec[nvec].iov_base = (char*) base; + if (nvec == (FCGID_VEC_COUNT - 1)) { +@@ -789,6 +793,7 @@ apr_status_t proc_write_ipc(fcgid_ipc *ipc_handle, + FCGID_VEC_COUNT)) != APR_SUCCESS) + return rv; + nvec = 0; ++ apr_brigade_cleanup(tmpbb); + } + else + nvec++; +@@ -800,6 +805,7 @@ apr_status_t proc_write_ipc(fcgid_ipc *ipc_handle, + return rv; + } + ++ apr_brigade_destroy(tmpbb); + return APR_SUCCESS; + } + diff --git a/SPECS/mod_fcgid.spec b/SPECS/mod_fcgid.spec index 5bdfa65..ec45674 100644 --- a/SPECS/mod_fcgid.spec +++ b/SPECS/mod_fcgid.spec @@ -34,7 +34,7 @@ Name: mod_fcgid Version: 2.3.9 -Release: 4%{?dist} +Release: 4%{?dist}.1 Summary: FastCGI interface module for Apache 2 Group: System Environment/Daemons License: ASL 2.0 @@ -49,6 +49,7 @@ Source10: fastcgi.te Source11: fastcgi-2.5.te Source12: fastcgi.fc Patch0: mod_fcgid-2.3.4-fixconf-shellbang.patch +Patch1: mod_fcgid-2.3.9-segfault-upload.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: httpd-devel >= 2.0, pkgconfig Requires: httpd-mmn = %{_httpd_mmn} @@ -118,6 +119,7 @@ cp -p %{SOURCE12} fastcgi.fc # Fix shellbang in fixconf script for our location of sed %patch0 -p1 +%patch1 -p1 -b .segfault_upload %build APXS=%{_httpd_apxs} ./configure.apxs @@ -221,6 +223,10 @@ exit 0 %endif %changelog +* Mon Oct 16 2017 Luboš Uhliarik - 2.3.9-4.1 +- Resolves: #1501307 - mod_fcgid cause Segmentation fault error while doing + large file uploads over HTTPS + * Fri Jan 24 2014 Daniel Mach - 2.3.9-4 - Mass rebuild 2014-01-24