diff options
Diffstat (limited to 'net-ftp/bsdftpd-ssl/files/bsdftpd-ds-getline.diff')
-rw-r--r-- | net-ftp/bsdftpd-ssl/files/bsdftpd-ds-getline.diff | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/net-ftp/bsdftpd-ssl/files/bsdftpd-ds-getline.diff b/net-ftp/bsdftpd-ssl/files/bsdftpd-ds-getline.diff new file mode 100644 index 0000000..7aaf626 --- /dev/null +++ b/net-ftp/bsdftpd-ssl/files/bsdftpd-ds-getline.diff @@ -0,0 +1,45 @@ +diff -dPNur bsdftpd-ssl-1.0.2.orig/ftpd/extern.h bsdftpd-ssl-1.0.2/ftpd/extern.h +--- bsdftpd-ssl-1.0.2.orig/ftpd/extern.h 2004-04-18 12:20:14.000000000 +0000 ++++ bsdftpd-ssl-1.0.2/ftpd/extern.h 2012-01-13 20:21:33.000000000 +0000 +@@ -47,7 +47,7 @@ + void ftpd_logwtmp(char *, char *, struct sockaddr *addr); + int ftpd_pclose(FILE *); + FILE *ftpd_popen(char *, char *); +-char *getline(char *, int, FILE *); ++char *mygetline(char *, int, FILE *); + void lreply(int, const char *, ...); + void makedir(char *); + void nack(char *); +diff -dPNur bsdftpd-ssl-1.0.2.orig/ftpd/ftpcmd.y bsdftpd-ssl-1.0.2/ftpd/ftpcmd.y +--- bsdftpd-ssl-1.0.2.orig/ftpd/ftpcmd.y 2004-05-30 18:55:11.000000000 +0000 ++++ bsdftpd-ssl-1.0.2/ftpd/ftpcmd.y 2012-01-13 20:21:27.000000000 +0000 +@@ -1374,7 +1374,7 @@ + * getline - a hacked up version of fgets to ignore TELNET escape codes. + */ + char * +-getline(char *s, int n, FILE *iop) ++mygetline(char *s, int n, FILE *iop) + { + int c; + register char *cs; +@@ -1522,7 +1522,7 @@ + case CMD: + (void) signal(SIGALRM, toolong); + (void) alarm((unsigned) timeout); +- if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { ++ if (mygetline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + reply(221, "You could at least say goodbye."); + dologout(0); + } +diff -dPNur bsdftpd-ssl-1.0.2.orig/ftpd/ftpd.c bsdftpd-ssl-1.0.2/ftpd/ftpd.c +--- bsdftpd-ssl-1.0.2.orig/ftpd/ftpd.c 2012-01-13 19:55:37.000000000 +0000 ++++ bsdftpd-ssl-1.0.2/ftpd/ftpd.c 2012-01-13 20:21:48.000000000 +0000 +@@ -3750,7 +3750,7 @@ + tv.tv_usec=0; + if (select(fileno(stdin)+1, &mask, NULL, NULL, &tv)) { + #endif /*USE_SSL*/ +- if (getline(cp, 7, stdin) == NULL) { ++ if (mygetline(cp, 7, stdin) == NULL) { + reply(221, "You could at least say goodbye."); + dologout(0); + } |