aboutsummaryrefslogtreecommitdiff
path: root/www/mod_fastcgi
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-05-07 05:24:14 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2010-05-07 05:24:14 +0000
commit68cc8d46d53a4c45951246683c78fe787e98c8ac (patch)
tree56a7c35155b65e5ef0a59252330dcbe8f3b99ece /www/mod_fastcgi
parent854ae4ebc95bc33a6b637498d6c53732e4d9d6e7 (diff)
downloadports-68cc8d46d53a4c45951246683c78fe787e98c8ac.tar.gz
ports-68cc8d46d53a4c45951246683c78fe787e98c8ac.zip
Notes
Diffstat (limited to 'www/mod_fastcgi')
-rw-r--r--www/mod_fastcgi/Makefile3
-rw-r--r--www/mod_fastcgi/files/patch-fcgi_util.c54
2 files changed, 56 insertions, 1 deletions
diff --git a/www/mod_fastcgi/Makefile b/www/mod_fastcgi/Makefile
index f86c32bea26c..dcff6a28ecef 100644
--- a/www/mod_fastcgi/Makefile
+++ b/www/mod_fastcgi/Makefile
@@ -7,13 +7,14 @@
PORTNAME= mod_fastcgi
PORTVERSION= 2.4.6
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.fastcgi.com/dist/
MAINTAINER= apache@FreeBSD.org
COMMENT= A fast-cgi module for Apache
-MAKE_JOBS_SAFE= yes
+MAKE_JOBS_SAFE= yes
CONFLICTS= apache-contrib-1.*
USE_APACHE= 1.3+
diff --git a/www/mod_fastcgi/files/patch-fcgi_util.c b/www/mod_fastcgi/files/patch-fcgi_util.c
new file mode 100644
index 000000000000..e2bde2354260
--- /dev/null
+++ b/www/mod_fastcgi/files/patch-fcgi_util.c
@@ -0,0 +1,54 @@
+--- fcgi_util.c.orig 2009-07-08 17:16:29.816884000 +0800
++++ fcgi_util.c 2009-07-09 08:43:09.222180000 +0800
+@@ -268,13 +268,17 @@
+ /* Get the user membership for the file's group. If the
+ * uid is a member, check the group bits. */
+ {
+- const struct group * const gr = getgrgid(statBuf->st_gid);
+- const struct passwd * const pw = getpwuid(uid);
++ char buf[1024], buf2[1024];
++ struct group gr, *r;
++ struct passwd pw, *r2;
+
+- if (gr != NULL && pw != NULL) {
+- char **user = gr->gr_mem;
++ getgrgid_r(statBuf->st_gid, &gr, buf, sizeof(buf), &r);
++ getpwuid_r(uid, &pw, buf2, sizeof(buf2), &r2);
++
++ if (r != NULL && r2 != NULL) {
++ char **user = r->gr_mem;
+ for ( ; *user != NULL; user++) {
+- if (strcmp(*user, pw->pw_name) == 0) {
++ if (strcmp(*user, r2->pw_name) == 0) {
+ if (mode & R_OK && !(statBuf->st_mode & S_IRGRP))
+ return "read not allowed by group";
+ if (mode & W_OK && !(statBuf->st_mode & S_IWGRP))
+@@ -445,8 +449,9 @@
+ {
+ #ifndef WIN32
+
++ char buf[1024];
+ struct passwd *pw;
+- struct group *gr;
++ struct group gr, *r;
+
+ if (fcgi_wrapper == NULL)
+ return NULL;
+@@ -467,14 +472,14 @@
+ s->username = s->user;
+
+ s->gid = gid;
+- gr = getgrgid(gid);
+- if (gr == NULL) {
++ getgrgid_r(gid, &gr, buf, sizeof(buf), &r);
++ if (r == NULL) {
+ return ap_psprintf(p,
+ "getgrgid() couldn't determine the group name for gid '%ld', "
+ "you probably need to modify the Group directive: %s",
+ (long)gid, strerror(errno));
+ }
+- s->group = ap_pstrdup(p, gr->gr_name);
++ s->group = ap_pstrdup(p, r->gr_name);
+
+ #endif /* !WIN32 */
+