1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
diff -urN pure-ftpd-1.0.18/src/ftpd.c pure-ftpd-1.0.19/src/ftpd.c
--- pure-ftpd-1.0.18/src/ftpd.c 2004-03-02 14:04:21.000000000 -0500
+++ pure-ftpd-1.0.19/src/ftpd.c 2004-06-20 13:29:56.000000000 -0400
@@ -4631,13 +4633,14 @@
if (STORAGE_FAMILY(sa) != AF_INET && STORAGE_FAMILY(sa) != AF_INET6) {
(void) close(clientfd);
return;
- }
+ }
if (maxusers > 0U && nb_children >= maxusers) {
char line[1024];
snprintf(line, sizeof line, "421 " MSG_MAX_USERS "\r\n",
(unsigned long) maxusers);
/* No need to check a return value to say 'fuck' */
+ (void) fcntl(clientfd, F_SETFL, fcntl(clientfd, F_GETFL) | O_NONBLOCK);
(void) write(clientfd, line, strlen(line));
(void) close(clientfd);
return;
@@ -4649,6 +4652,7 @@
char hbuf[NI_MAXHOST];
static struct sockaddr_storage old_sa;
+ (void) fcntl(clientfd, F_SETFL, fcntl(clientfd, F_GETFL) | O_NONBLOCK);
if (!SNCHECK(snprintf(line, sizeof line,
"421 " MSG_MAX_USERS_IP "\r\n",
(unsigned long) maxip), sizeof line)) {
|