diff --git a/src/bin/network/ftpd/extern.h b/src/bin/network/ftpd/extern.h index b0dab93704..5a7ed7caa4 100644 --- a/src/bin/network/ftpd/extern.h +++ b/src/bin/network/ftpd/extern.h @@ -46,7 +46,7 @@ void fatalerror(char *); void ftpd_logwtmp(char *, char *, struct sockaddr *addr); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *, char *); -char *getline(char *, int, FILE *); +char *ftpd_getline(char *, int, FILE *); void lreply(int, const char *, ...) __printflike(2, 3); void makedir(char *); void nack(char *); diff --git a/src/bin/network/ftpd/ftpcmd.y b/src/bin/network/ftpd/ftpcmd.y index e081551b19..6ecd924e4f 100644 --- a/src/bin/network/ftpd/ftpcmd.y +++ b/src/bin/network/ftpd/ftpcmd.y @@ -542,7 +542,7 @@ cmd case MODE_S: reply(200, "MODE S accepted."); break; - + default: reply(502, "Unimplemented MODE type."); } @@ -1194,10 +1194,10 @@ lookup(struct tab *p, char *cmd) #include /* - * getline - a hacked up version of fgets to ignore TELNET escape codes. + * ftpd_getline - a hacked up version of fgets to ignore TELNET escape codes. */ char * -getline(char *s, int n, FILE *iop) +ftpd_getline(char *s, int n, FILE *iop) { int c; register char *cs; @@ -1305,7 +1305,7 @@ yylex(void) case CMD: (void) signal(SIGALRM, toolong); (void) alarm(timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + if (ftpd_getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { reply(221, "You could at least say goodbye."); dologout(0); } diff --git a/src/bin/network/ftpd/ftpd.c b/src/bin/network/ftpd/ftpd.c index aad7abbe57..92f1a819a8 100644 --- a/src/bin/network/ftpd/ftpd.c +++ b/src/bin/network/ftpd/ftpd.c @@ -1062,7 +1062,7 @@ user(char *name) reply(530, "Sorry, only anonymous ftp allowed."); return; } - + if ((pw = sgetpwnam(name))) { if ((shell = pw->pw_shell) == NULL || *shell == 0) shell = _PATH_BSHELL; @@ -2838,7 +2838,7 @@ myoob(void) return (0); } cp = tmpline; - if (getline(cp, 7, stdin) == NULL) { + if (ftpd_getline(cp, 7, stdin) == NULL) { reply(221, "You could at least say goodbye."); dologout(0); } @@ -2930,7 +2930,7 @@ passive(void) #endif else goto pasv_error; - + p = (char *) &pasv_addr.su_port; #define UC(b) (((int) b) & 0xff) @@ -2989,7 +2989,7 @@ long_passive(char *cmd, int pf) return; } } - + pdata = socket(ctrl_addr.su_family, SOCK_STREAM, 0); if (pdata < 0) { perror_reply(425, "Can't open passive connection"); @@ -3128,7 +3128,7 @@ guniquefd(char *local, char **name) /* -4 is for the .nn we put on the end below */ (void) snprintf(new, sizeof(new) - 4, "%s", local); cp = new + strlen(new); - /* + /* * Don't generate dotfile unless requested explicitly. * This covers the case when basename gets truncated off * by buffer size.