43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
|
$NetBSD: patch-az,v 1.1 2011/04/01 21:56:14 agc Exp $
|
||
|
|
||
|
--- ftp/ftpd/ftpcmd.c 2011/03/30 11:35:57 1.1
|
||
|
+++ ftp/ftpd/ftpcmd.c 2011/03/30 11:36:46
|
||
|
@@ -1985,10 +1985,10 @@
|
||
|
#include <arpa/telnet.h>
|
||
|
|
||
|
/*
|
||
|
- * getline - a hacked up version of fgets to ignore TELNET escape codes.
|
||
|
+ * srp_ftp_getline - a hacked up version of fgets to ignore TELNET escape codes.
|
||
|
*/
|
||
|
char *
|
||
|
-getline(s, n, iop)
|
||
|
+srp_ftp_getline(s, n, iop)
|
||
|
char *s;
|
||
|
register FILE *iop;
|
||
|
{
|
||
|
@@ -2089,7 +2089,7 @@
|
||
|
*s = '\0';
|
||
|
return(s);
|
||
|
}
|
||
|
- if (debug) syslog(LOG_DEBUG, "getline got %d from %s <%s>\n",
|
||
|
+ if (debug) syslog(LOG_DEBUG, "srp_ftp_getline got %d from %s <%s>\n",
|
||
|
len, cs, mic?"MIC":"ENC");
|
||
|
#ifdef SRP
|
||
|
if (strcmp(auth_type, "SRP") == 0)
|
||
|
@@ -2218,13 +2218,13 @@
|
||
|
case CMD:
|
||
|
(void) signal(SIGALRM, toolong);
|
||
|
(void) alarm((unsigned) timeout);
|
||
|
- if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
|
||
|
+ if (srp_ftp_getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
|
||
|
reply(221, "You could at least say goodbye.");
|
||
|
dologout(0);
|
||
|
}
|
||
|
(void) alarm(0);
|
||
|
|
||
|
- /* If getline() finds an error, the string is null */
|
||
|
+ /* If srp_ftp_getline() finds an error, the string is null */
|
||
|
if (*cbuf == '\0')
|
||
|
continue;
|
||
|
|