p7zip: assorted fixes
[oi-userland.git] / components / network / proftpd / patches / 006.24747309.patch
blob22537be769b902637a262bf555396bc437dbb00c
2 # patch fixes CR 24747309 (passive mode should treat EACCES as EADDRINUSE)
3 # fix has been sent to upstream master branch:
4 # https://github.com/proftpd/proftpd/pull/703
6 # It also contains a followup fix covered by CR 30455356.
7 # The follow up fix has been offered to upstream as well:
8 # https://github.com/proftpd/proftpd/pull/853
11 diff --git a/src/inet.c b/src/inet.c
12 index b01230d3e..f8b3ed0fb 100644
13 --- a/src/inet.c
14 +++ b/src/inet.c
15 @@ -433,7 +433,11 @@ static conn_t *init_conn(pool *p, int fd, const pr_netaddr_t *bind_addr,
18 if (res != -1 ||
19 +#ifdef SOLARIS2
20 + (hold_errno != EADDRINUSE && hold_errno != EACCES) ||
21 +#else /* !SOLARIS2 */
22 hold_errno != EADDRINUSE ||
23 +#endif /* SOLARIS2 */
24 (port != INPORT_ANY && !retry_bind)) {
25 break;
27 @@ -601,7 +605,11 @@ conn_t *pr_inet_create_conn_portrange(pool *p, const pr_netaddr_t *bind_addr,
28 c = init_conn(p, -1, bind_addr, ports[i], FALSE, FALSE);
30 if (!c &&
31 +#ifdef SOLARIS2
32 + (inet_errno != EADDRINUSE && inet_errno != EACCES)) {
33 +#else /* !SOLARIS2 */
34 inet_errno != EADDRINUSE) {
35 +#endif /* SOLARIS2 */
36 pr_log_pri(PR_LOG_WARNING, "error initializing connection: %s",
37 strerror(inet_errno));
38 pr_session_disconnect(NULL, PR_SESS_DISCONNECT_BY_APPLICATION, NULL);