Skip to content

Commit

Permalink
www/fcgiwrap: fix IPv6 support
Browse files Browse the repository at this point in the history
Extend existing patch to fix IPv6 support.
Bump PORTREVISION

The fix zero-out the sockaddr structure before
using it as a sockaddr_in6 structure as explained
by IEEE Std 1003.1.

The patch was upstremed : gnosek/fcgiwrap#51

PR:		243721
Reported by:	<[email protected]>


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@529749 35697150-7ecd-e111-bb59-0022644237b5
  • Loading branch information
rodrigo committed Mar 28, 2020
1 parent 1b42f66 commit 58d0ac4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion www/fcgiwrap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= fcgiwrap
PORTVERSION= 1.1.0
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= www

MAINTAINER= [email protected]
Expand Down
2 changes: 1 addition & 1 deletion www/fcgiwrap/files/fcgiwrap.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# fcgiwrap_myserver_group="mygroup"
# fcgiwrap_myotherserver_socket="unix:/var/run/fcgiwrap.myotherserver.socket"
# fcgiwrap_myotherserver_user="myotheruser"
# fcgiwrap_myotherserver_grup="myothergroup"
# fcgiwrap_myotherserver_group="myothergroup"
# fcgiwrap_myserver_socket_mode="0775"
# fcgiwrap_myotherserver_flags="" # No flags for this profile.

Expand Down
18 changes: 13 additions & 5 deletions www/fcgiwrap/files/patch-fcgiwrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,23 @@
char *p = url;
char *q;
int fd;
@@ -751,6 +785,7 @@ invalid_url:
@@ -685,6 +719,7 @@ static int setup_socket(char *url) {
struct sockaddr_in6 sa_in6;
} sa;

+ memset(&sa, 0, sizeof(sa));
if (!strncmp(p, "unix:", sizeof("unix:") - 1)) {
p += sizeof("unix:") - 1;

@@ -751,6 +786,7 @@ invalid_url:
return -1;
}

+ *fd_out = fd;
return listen_on_fd(fd);
}

@@ -758,9 +793,10 @@ int main(int argc, char **argv)
@@ -758,9 +794,10 @@ int main(int argc, char **argv)
{
int nchildren = 1;
char *socket_url = NULL;
Expand All @@ -107,15 +115,15 @@
switch (c) {
case 'f':
stderr_to_fastcgi++;
@@ -773,6 +809,7 @@ int main(int argc, char **argv)
@@ -773,6 +810,7 @@ int main(int argc, char **argv)
" -c <number>\t\tNumber of processes to prefork\n"
" -s <socket_url>\tSocket to bind to (say -s help for help)\n"
" -h\t\t\tShow this help message and exit\n"
+ " -p <path>\t\tRestrict execution to this script. (repeated options will be merged)\n"
"\nReport bugs to Grzegorz Nosek <"PACKAGE_BUGREPORT">.\n"
PACKAGE_NAME" home page: <http://nginx.localdomain.pl/wiki/FcgiWrap>\n",
argv[0]
@@ -784,8 +821,14 @@ int main(int argc, char **argv)
@@ -784,8 +822,14 @@ int main(int argc, char **argv)
case 's':
socket_url = strdup(optarg);
break;
Expand All @@ -131,7 +139,7 @@
fprintf(stderr, "Option -%c requires an argument.\n", optopt);
else if (isprint(optopt))
fprintf(stderr, "Unknown option `-%c'.\n", optopt);
@@ -808,13 +851,24 @@ int main(int argc, char **argv)
@@ -808,13 +852,24 @@ int main(int argc, char **argv)
} else
#endif
if (socket_url) {
Expand Down

0 comments on commit 58d0ac4

Please sign in to comment.