From ef315d113fbe3630842c7cdf3fdb999b69a74340 Mon Sep 17 00:00:00 2001 From: max Date: Fri, 17 Jan 1997 09:09:18 +0000 Subject: Rip off the patch to ftpd.c and one to access.c from patch-ai and merge ftpd.c patch to patch-ad and access.c patch to patch-af. (As clearly stated in the handbook, a file should be changed only by one patch.) --- ftp/wu-ftpd/files/patch-ad | 93 ++++++++++++++++++++++++++++++++-------------- ftp/wu-ftpd/files/patch-ai | 54 --------------------------- 2 files changed, 65 insertions(+), 82 deletions(-) (limited to 'ftp/wu-ftpd') diff --git a/ftp/wu-ftpd/files/patch-ad b/ftp/wu-ftpd/files/patch-ad index d6ddda015e11..8a6749a4e6de 100644 --- a/ftp/wu-ftpd/files/patch-ad +++ b/ftp/wu-ftpd/files/patch-ad @@ -1,5 +1,5 @@ -*** src/ftpd.c.orig Wed Apr 13 23:17:18 1994 ---- src/ftpd.c Tue May 30 00:17:25 1995 +*** src/ftpd.c.orig Tue Jan 7 00:27:09 1997 +--- src/ftpd.c Fri Jan 17 17:45:14 1997 *************** *** 139,146 **** *freopen(const char *, const char *, FILE *); @@ -172,6 +172,23 @@ { FILE *fin, *************** +*** 1403,1409 **** + if (dout == NULL) + goto done; + #ifdef HAVE_ST_BLKSIZE +! send_data(fin, dout, st.st_blksize); + #else + send_data(fin, dout, BUFSIZ); + #endif +--- 1435,1441 ---- + if (dout == NULL) + goto done; + #ifdef HAVE_ST_BLKSIZE +! send_data(fin, dout, st.st_blksize*2); + #else + send_data(fin, dout, BUFSIZ); + #endif +*************** *** 1422,1428 **** --- 1454,1464 ---- for (loop = 0; namebuf[loop]; loop++) @@ -217,6 +234,26 @@ xfertime, remotehost, *************** +*** 1678,1683 **** +--- 1719,1735 ---- + if (setsockopt(s, IPPROTO_IP, IP_TOS, (char *) &on, sizeof(int)) < 0) + syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); + #endif ++ #ifdef TCP_NOPUSH ++ /* ++ * Turn off push flag to keep sender TCP from sending short packets ++ * at the boundaries of each write(). Should probably do a SO_SNDBUF ++ * to set the send buffer size as well, but that may not be desirable ++ * in heavy-load situations. ++ */ ++ on = 1; ++ if (setsockopt(s, IPPROTO_TCP, TCP_NOPUSH, (char *)&on, sizeof on) < 0) ++ syslog(LOG_WARNING, "setsockopt (TCP_NOPUSH): %m"); ++ #endif + + return (fdopen(s, mode)); + bad: +*************** *** 1699,1705 **** file_size = size; byte_count = 0; @@ -225,7 +262,7 @@ else (void) strcpy(sizebuf, ""); if (pdata >= 0) { ---- 1740,1750 ---- +--- 1751,1761 ---- file_size = size; byte_count = 0; if (size != (off_t) - 1) @@ -248,7 +285,7 @@ (void) close(pdata); pdata = -1; return (NULL); ---- 1752,1774 ---- +--- 1763,1785 ---- int s, fromlen = sizeof(from); @@ -274,7 +311,7 @@ return (NULL); *************** *** 1764,1769 **** ---- 1823,1829 ---- +--- 1834,1840 ---- * encapsulation of the data subject to Mode, Structure, and Type. * * NB: Form isn't handled. */ @@ -284,7 +321,7 @@ register int c, *************** *** 1839,1844 **** ---- 1899,1905 ---- +--- 1910,1916 ---- * the data subject to Mode, Structure, and Type. * * N.B.: Form isn't handled. */ @@ -294,7 +331,7 @@ register int c; *************** *** 1915,1920 **** ---- 1976,1982 ---- +--- 1987,1993 ---- return (-1); } @@ -304,7 +341,7 @@ char line[BUFSIZ]; *************** *** 1948,1953 **** ---- 2010,2016 ---- +--- 2021,2027 ---- reply(211, "End of Status"); } @@ -314,7 +351,7 @@ struct sockaddr_in *sin; *************** *** 2001,2006 **** ---- 2064,2070 ---- +--- 2075,2081 ---- reply(211, "End of status"); } @@ -324,7 +361,7 @@ reply(451, "Error in server: %s\n", s); *************** *** 2095,2100 **** ---- 2159,2165 ---- +--- 2170,2176 ---- #else /* VARARGS2 */ @@ -334,7 +371,7 @@ if (autospout != NULL) { *************** *** 2129,2134 **** ---- 2194,2200 ---- +--- 2205,2211 ---- } /* VARARGS2 */ @@ -344,7 +381,7 @@ if (!dolreplies) *************** *** 2144,2160 **** ---- 2210,2229 ---- +--- 2221,2240 ---- } #endif @@ -367,7 +404,7 @@ char *cp; *************** *** 2164,2169 **** ---- 2233,2239 ---- +--- 2244,2250 ---- reply(500, "'%s': command not understood.", cbuf); } @@ -377,7 +414,7 @@ struct stat st; *************** *** 2208,2213 **** ---- 2278,2284 ---- +--- 2289,2295 ---- ack("DELE"); } @@ -387,7 +424,7 @@ struct aclmember *entry = NULL; *************** *** 2248,2253 **** ---- 2319,2325 ---- +--- 2330,2336 ---- } } @@ -406,7 +443,7 @@ int valid = 0; /* ---- 2346,2355 ---- +--- 2357,2366 ---- reply(257, "MKD command successful."); } @@ -419,7 +456,7 @@ /* *************** *** 2298,2303 **** ---- 2371,2377 ---- +--- 2382,2388 ---- ack("RMD"); } @@ -436,7 +473,7 @@ else reply(257, "\"%s\" is current directory.", path); } ---- 2386,2393 ---- +--- 2397,2404 ---- #else if (getwd(path) == (char *) NULL) #endif @@ -447,7 +484,7 @@ } *************** *** 2342,2347 **** ---- 2417,2423 ---- +--- 2428,2434 ---- return (name); } @@ -457,7 +494,7 @@ *************** *** 2357,2362 **** ---- 2433,2439 ---- +--- 2444,2450 ---- ack("RNTO"); } @@ -467,17 +504,17 @@ struct hostent *hp; *************** *** 2412,2417 **** ---- 2489,2495 ---- +--- 2500,2506 ---- } /* Record logout in wtmp file and exit with supplied status. */ + void dologout(int status) { - if (logged_in) { + /* *************** -*** 2459,2464 **** ---- 2537,2543 ---- +*** 2466,2471 **** +--- 2555,2561 ---- * PASV command in RFC959. However, it has been blessed as a legitimate * response by Jon Postel in a telephone conversation with Rick Adams on 25 * Jan 89. */ @@ -486,8 +523,8 @@ { int len; *************** -*** 2530,2535 **** ---- 2609,2615 ---- +*** 2537,2542 **** +--- 2627,2633 ---- } /* Format and send reply containing system error number. */ @@ -496,8 +533,8 @@ { reply(code, "%s: %s.", string, strerror(errno)); *************** -*** 2538,2543 **** ---- 2618,2624 ---- +*** 2545,2550 **** +--- 2636,2642 ---- static char *onefile[] = {"", 0}; diff --git a/ftp/wu-ftpd/files/patch-ai b/ftp/wu-ftpd/files/patch-ai index 0dc7c97dcdcb..67cb35730961 100644 --- a/ftp/wu-ftpd/files/patch-ai +++ b/ftp/wu-ftpd/files/patch-ai @@ -17,57 +17,3 @@ * allow use of private file. (for site group and site gpass) */ -*** src/access.c Sat Oct 7 07:52:31 1995 ---- src/access.c Sat Oct 7 10:10:04 1995 -*************** -*** 803,810 **** ---- 803,812 ---- - acl_join(class); - return (1); - } else { -+ #ifdef LOG_TOOMANY - syslog(LOG_NOTICE, "ACCESS DENIED (user limit %d; class %s) TO %s [%s]", - limit, class, remotehost, remoteaddr); -+ #endif - pr_mesg(msgcode, msgfile); - return (-1); - } -*** src/ftpd.c Sat Oct 7 07:52:30 1995 ---- src/ftpd.c Fri Oct 6 23:48:59 1995 -*************** -*** 1435,1441 **** - if (dout == NULL) - goto done; - #ifdef HAVE_ST_BLKSIZE -! send_data(fin, dout, st.st_blksize); - #else - send_data(fin, dout, BUFSIZ); - #endif ---- 1435,1441 ---- - if (dout == NULL) - goto done; - #ifdef HAVE_ST_BLKSIZE -! send_data(fin, dout, st.st_blksize*2); - #else - send_data(fin, dout, BUFSIZ); - #endif -*************** -*** 1718,1723 **** ---- 1718,1734 ---- - on = IPTOS_THROUGHPUT; - if (setsockopt(s, IPPROTO_IP, IP_TOS, (char *) &on, sizeof(int)) < 0) - syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); -+ #endif -+ #ifdef TCP_NOPUSH -+ /* -+ * Turn off push flag to keep sender TCP from sending short packets -+ * at the boundaries of each write(). Should probably do a SO_SNDBUF -+ * to set the send buffer size as well, but that may not be desirable -+ * in heavy-load situations. -+ */ -+ on = 1; -+ if (setsockopt(s, IPPROTO_TCP, TCP_NOPUSH, (char *)&on, sizeof on) < 0) -+ syslog(LOG_WARNING, "setsockopt (TCP_NOPUSH): %m"); - #endif - - return (fdopen(s, mode)); -- cgit