Index: head/www/mod_fastcgi/Makefile =================================================================== --- head/www/mod_fastcgi/Makefile (revision 487435) +++ head/www/mod_fastcgi/Makefile (revision 487436) @@ -1,28 +1,28 @@ # Created by: JunSeon Oh # $FreeBSD$ PORTNAME= mod_fastcgi -PORTVERSION= 2.4.7 -PORTREVISION= 1 +PORTVERSION= 2.4.7.1 CATEGORIES= www -MASTER_SITES= http://www.fastcgi.com/dist/ \ - LOCAL/ohauer -DISTNAME= mod_fastcgi-SNAP-0910052141 DIST_SUBDIR= apache2 MAINTAINER= apache@FreeBSD.org -COMMENT= Apache 2.2 fast-cgi module +COMMENT= Apache 2.4 fast-cgi module -USES= apache:2.2+ +USES= apache:2.4+ + +USE_GITHUB= yes +GH_ACCOUNT= FastCGI-Archives + AP_FAST_BUILD= yes AP_GENPLIST= yes SRC_FILE= *.c PORTDOCS= mod_fastcgi.html OPTIONS_DEFINE= DOCS post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${STAGEDIR}${DOCSDIR} .include Index: head/www/mod_fastcgi/distinfo =================================================================== --- head/www/mod_fastcgi/distinfo (revision 487435) +++ head/www/mod_fastcgi/distinfo (revision 487436) @@ -1,2 +1,3 @@ -SHA256 (apache2/mod_fastcgi-SNAP-0910052141.tar.gz) = e6564ae206284806c781834e9e89aa4b0a4dd647b45c6da5cc389c65a984bdc7 -SIZE (apache2/mod_fastcgi-SNAP-0910052141.tar.gz) = 103255 +TIMESTAMP = 1544180674 +SHA256 (apache2/FastCGI-Archives-mod_fastcgi-2.4.7.1_GH0.tar.gz) = 4ba3509b498463f42401fe6911aa410561efbed93d43bb12ad8f7ee7c6318ab8 +SIZE (apache2/FastCGI-Archives-mod_fastcgi-2.4.7.1_GH0.tar.gz) = 112142 Index: head/www/mod_fastcgi/files/patch-fcgi.h =================================================================== --- head/www/mod_fastcgi/files/patch-fcgi.h (revision 487435) +++ head/www/mod_fastcgi/files/patch-fcgi.h (nonexistent) @@ -1,97 +0,0 @@ ---- fcgi.h.orig -+++ fcgi.h -@@ -57,10 +57,14 @@ - #define XtOffsetOf APR_OFFSETOF - #define ap_select select - --#define ap_user_id unixd_config.user_id --#define ap_group_id unixd_config.group_id --#define ap_user_name unixd_config.user_name --#define ap_suexec_enabled unixd_config.suexec_enabled -+#if MODULE_MAGIC_NUMBER_MAJOR < 20081201 -+#define ap_unixd_config unixd_config -+#endif -+ -+#define ap_user_id ap_unixd_config.user_id -+#define ap_group_id ap_unixd_config.group_id -+#define ap_user_name ap_unixd_config.user_name -+#define ap_suexec_enabled ap_unixd_config.suexec_enabled - - #ifndef S_ISDIR - #define S_ISDIR(m) (((m)&(S_IFMT)) == (S_IFDIR)) -@@ -354,42 +358,42 @@ - #ifdef APACHE2 - - #ifdef WIN32 --#define FCGI_LOG_EMERG __FILE__,__LINE__,APLOG_EMERG,APR_FROM_OS_ERROR(GetLastError()) --#define FCGI_LOG_ALERT __FILE__,__LINE__,APLOG_ALERT,APR_FROM_OS_ERROR(GetLastError()) --#define FCGI_LOG_CRIT __FILE__,__LINE__,APLOG_CRIT,APR_FROM_OS_ERROR(GetLastError()) --#define FCGI_LOG_ERR __FILE__,__LINE__,APLOG_ERR,APR_FROM_OS_ERROR(GetLastError()) --#define FCGI_LOG_WARN __FILE__,__LINE__,APLOG_WARNING,APR_FROM_OS_ERROR(GetLastError()) --#define FCGI_LOG_NOTICE __FILE__,__LINE__,APLOG_NOTICE,APR_FROM_OS_ERROR(GetLastError()) --#define FCGI_LOG_INFO __FILE__,__LINE__,APLOG_INFO,APR_FROM_OS_ERROR(GetLastError()) --#define FCGI_LOG_DEBUG __FILE__,__LINE__,APLOG_DEBUG,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_EMERG APLOG_MARK,APLOG_EMERG,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_ALERT APLOG_MARK,APLOG_ALERT,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_CRIT APLOG_MARK,APLOG_CRIT,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_ERR APLOG_MARK,APLOG_ERR,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_WARN APLOG_MARK,APLOG_WARNING,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_NOTICE APLOG_MARK,APLOG_NOTICE,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_INFO APLOG_MARK,APLOG_INFO,APR_FROM_OS_ERROR(GetLastError()) -+#define FCGI_LOG_DEBUG APLOG_MARK,APLOG_DEBUG,APR_FROM_OS_ERROR(GetLastError()) - #else /* !WIN32 */ --#define FCGI_LOG_EMERG __FILE__,__LINE__,APLOG_EMERG,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_ALERT __FILE__,__LINE__,APLOG_ALERT,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_CRIT __FILE__,__LINE__,APLOG_CRIT,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_ERR __FILE__,__LINE__,APLOG_ERR,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_WARN __FILE__,__LINE__,APLOG_WARNING,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_NOTICE __FILE__,__LINE__,APLOG_NOTICE,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_INFO __FILE__,__LINE__,APLOG_INFO,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_DEBUG __FILE__,__LINE__,APLOG_DEBUG,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_EMERG APLOG_MARK,APLOG_EMERG,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_ALERT APLOG_MARK,APLOG_ALERT,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_CRIT APLOG_MARK,APLOG_CRIT,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_ERR APLOG_MARK,APLOG_ERR,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_WARN APLOG_MARK,APLOG_WARNING,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_NOTICE APLOG_MARK,APLOG_NOTICE,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_INFO APLOG_MARK,APLOG_INFO,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_DEBUG APLOG_MARK,APLOG_DEBUG,APR_FROM_OS_ERROR(errno) - #endif - --#define FCGI_LOG_EMERG_ERRNO __FILE__,__LINE__,APLOG_EMERG,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_ALERT_ERRNO __FILE__,__LINE__,APLOG_ALERT,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_CRIT_ERRNO __FILE__,__LINE__,APLOG_CRIT,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_ERR_ERRNO __FILE__,__LINE__,APLOG_ERR,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_WARN_ERRNO __FILE__,__LINE__,APLOG_WARNING,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_NOTICE_ERRNO __FILE__,__LINE__,APLOG_NOTICE,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_INFO_ERRNO __FILE__,__LINE__,APLOG_INFO,APR_FROM_OS_ERROR(errno) --#define FCGI_LOG_DEBUG_ERRNO __FILE__,__LINE__,APLOG_DEBUG,APR_FROM_OS_ERROR(errno) -- --#define FCGI_LOG_EMERG_NOERRNO __FILE__,__LINE__,APLOG_EMERG,0 --#define FCGI_LOG_ALERT_NOERRNO __FILE__,__LINE__,APLOG_ALERT,0 --#define FCGI_LOG_CRIT_NOERRNO __FILE__,__LINE__,APLOG_CRIT,0 --#define FCGI_LOG_ERR_NOERRNO __FILE__,__LINE__,APLOG_ERR,0 --#define FCGI_LOG_WARN_NOERRNO __FILE__,__LINE__,APLOG_WARNING,0 --#define FCGI_LOG_NOTICE_NOERRNO __FILE__,__LINE__,APLOG_NOTICE,0 --#define FCGI_LOG_INFO_NOERRNO __FILE__,__LINE__,APLOG_INFO,0 --#define FCGI_LOG_DEBUG_NOERRNO __FILE__,__LINE__,APLOG_DEBUG,0 -+#define FCGI_LOG_EMERG_ERRNO APLOG_MARK,APLOG_EMERG,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_ALERT_ERRNO APLOG_MARK,APLOG_ALERT,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_CRIT_ERRNO APLOG_MARK,APLOG_CRIT,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_ERR_ERRNO APLOG_MARK,APLOG_ERR,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_WARN_ERRNO APLOG_MARK,APLOG_WARNING,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_NOTICE_ERRNO APLOG_MARK,APLOG_NOTICE,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_INFO_ERRNO APLOG_MARK,APLOG_INFO,APR_FROM_OS_ERROR(errno) -+#define FCGI_LOG_DEBUG_ERRNO APLOG_MARK,APLOG_DEBUG,APR_FROM_OS_ERROR(errno) -+ -+#define FCGI_LOG_EMERG_NOERRNO APLOG_MARK,APLOG_EMERG,0 -+#define FCGI_LOG_ALERT_NOERRNO APLOG_MARK,APLOG_ALERT,0 -+#define FCGI_LOG_CRIT_NOERRNO APLOG_MARK,APLOG_CRIT,0 -+#define FCGI_LOG_ERR_NOERRNO APLOG_MARK,APLOG_ERR,0 -+#define FCGI_LOG_WARN_NOERRNO APLOG_MARK,APLOG_WARNING,0 -+#define FCGI_LOG_NOTICE_NOERRNO APLOG_MARK,APLOG_NOTICE,0 -+#define FCGI_LOG_INFO_NOERRNO APLOG_MARK,APLOG_INFO,0 -+#define FCGI_LOG_DEBUG_NOERRNO APLOG_MARK,APLOG_DEBUG,0 - - #else /* !APACHE2 */ - Property changes on: head/www/mod_fastcgi/files/patch-fcgi.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/mod_fastcgi/files/patch-fcgi_protocol.c =================================================================== --- head/www/mod_fastcgi/files/patch-fcgi_protocol.c (revision 487435) +++ head/www/mod_fastcgi/files/patch-fcgi_protocol.c (revision 487436) @@ -1,11 +1,11 @@ ---- fcgi_protocol.c.orig +--- fcgi_protocol.c.orig 2017-03-29 21:11:44 UTC +++ fcgi_protocol.c -@@ -475,7 +475,7 @@ +@@ -475,7 +475,7 @@ int fcgi_protocol_dequeue(pool *p, fcgi_request *fr) ap_log_rerror(FCGI_LOG_ERR_NOERRNO, fr->r, "FastCGI: comm with server \"%s\" aborted: protocol error: " "invalid FCGI_END_REQUEST size: " -- "%d != sizeof(FCGI_EndRequestBody)(%d)", +- "%d != sizeof(FCGI_EndRequestBody)(%ld)", + "%d != sizeof(FCGI_EndRequestBody)(%zu)", fr->fs_path, fr->dataLen, sizeof(FCGI_EndRequestBody)); return HTTP_INTERNAL_SERVER_ERROR; } Index: head/www/mod_fastcgi/files/patch-fcgi_util.c =================================================================== --- head/www/mod_fastcgi/files/patch-fcgi_util.c (revision 487435) +++ head/www/mod_fastcgi/files/patch-fcgi_util.c (revision 487436) @@ -1,54 +1,54 @@ ---- fcgi_util.c.orig +--- fcgi_util.c.orig 2017-03-29 21:11:44 UTC +++ fcgi_util.c -@@ -268,13 +268,17 @@ +@@ -268,13 +268,17 @@ fcgi_util_check_access(pool *tp, /* 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 @@ +@@ -445,8 +449,9 @@ fcgi_util_fs_set_uid_n_gid(pool *p, fcgi_server *s, ui { #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 @@ +@@ -467,14 +472,14 @@ fcgi_util_fs_set_uid_n_gid(pool *p, fcgi_server *s, ui 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 */ Index: head/www/mod_fastcgi/files/patch-mod_fastcgi.c =================================================================== --- head/www/mod_fastcgi/files/patch-mod_fastcgi.c (revision 487435) +++ head/www/mod_fastcgi/files/patch-mod_fastcgi.c (revision 487436) @@ -1,32 +1,20 @@ ---- mod_fastcgi.c.orig +--- mod_fastcgi.c.orig 2017-03-29 21:11:44 UTC +++ mod_fastcgi.c -@@ -753,6 +753,11 @@ - continue; - } - -+ if (strcasecmp(name, "Content-Length") == 0) { -+ ap_set_content_length(r, strtol(value, NULL, 10)); -+ continue; -+ } -+ - /* If the script wants them merged, it can do it */ - ap_table_add(r->err_headers_out, name, value); - continue; -@@ -2215,7 +2220,7 @@ +@@ -2219,7 +2219,7 @@ SERVER_SEND: if (select_status < 0) { ap_log_rerror(FCGI_LOG_ERR_ERRNO, r, "FastCGI: comm with server " - "\"%s\" aborted: select() failed", fr->fs_path); + "\"%s\" aborted: select() failed: \"%s\"", fr->fs_path, strerror(errno)); state = STATE_ERROR; break; } -@@ -2298,7 +2303,7 @@ +@@ -2302,7 +2302,7 @@ SERVER_SEND: else { - ap_log_rerror(FCGI_LOG_ERR, r, "FastCGI: comm with server " -- "\"%s\" aborted: read failed", fr->fs_path); -+ "\"%s\" aborted: read failed: \"%s\"", fr->fs_path, strerror(errno)); - state = STATE_ERROR; - break; - } + ap_log_rerror(FCGI_LOG_ERR, r, "FastCGI: comm with server " +- "\"%s\" aborted: read failed", fr->fs_path); ++ "\"%s\" aborted: read failed: \"%s\"", fr->fs_path, strerror(errno)); + state = STATE_ERROR; + break; + } Index: head/www/mod_fastcgi/pkg-descr =================================================================== --- head/www/mod_fastcgi/pkg-descr (revision 487435) +++ head/www/mod_fastcgi/pkg-descr (revision 487436) @@ -1,7 +1,7 @@ mod_fastcgi is a cgi-module for Apache FastCGI is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs. See the docs for more details. -WWW: http://www.fastcgi.com/ +WWW: https://github.com/FastCGI-Archives/mod_fastcgi