While here fix minor whitespace mistake.
"looks fine to me" chris@
-/* $OpenBSD: extern.h,v 1.21 2020/01/15 22:06:59 jan Exp $ */
+/* $OpenBSD: extern.h,v 1.22 2021/05/20 15:21:03 jan Exp $ */
/* $NetBSD: extern.h,v 1.2 1995/04/11 02:44:49 cgd Exp $ */
/*
void fatal(char *);
int ftpd_pclose(FILE *, pid_t);
FILE *ftpd_ls(const char *, pid_t *);
-int get_line(char *, int, FILE *);
+int get_line(char *, int);
void ftpdlogwtmp(char *, char *, char *);
void lreply(int, const char *, ...);
void makedir(char *);
-/* $OpenBSD: ftpcmd.y,v 1.69 2020/03/04 20:17:48 millert Exp $ */
+/* $OpenBSD: ftpcmd.y,v 1.70 2021/05/20 15:21:03 jan Exp $ */
/* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */
/*
* get_line - a hacked up version of fgets to ignore TELNET escape codes.
*/
int
-get_line(s, n, iop)
+get_line(s, n)
char *s;
int n;
- FILE *iop;
{
int c;
char *cs;
if (c == 0)
tmpline[0] = '\0';
}
- while ((c = getc(iop)) != EOF) {
+ while ((c = getc(stdin)) != EOF) {
c &= 0377;
if (c == IAC) {
- if ((c = getc(iop)) != EOF) {
+ if ((c = getc(stdin)) != EOF) {
c &= 0377;
switch (c) {
case WILL:
case WONT:
- c = getc(iop);
+ c = getc(stdin);
printf("%c%c%c", IAC, DONT, 0377&c);
(void) fflush(stdout);
continue;
case DO:
case DONT:
- c = getc(iop);
+ c = getc(stdin);
printf("%c%c%c", IAC, WONT, 0377&c);
(void) fflush(stdout);
continue;
* This prevents the command to be split up into
* multiple commands.
*/
- while (c != '\n' && (c = getc(iop)) != EOF)
+ while (c != '\n' && (c = getc(stdin)) != EOF)
;
return (-2);
}
case CMD:
(void) alarm((unsigned) timeout);
- n = get_line(cbuf, sizeof(cbuf)-1, stdin);
+ n = get_line(cbuf, sizeof(cbuf)-1);
if (n == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
-/* $OpenBSD: ftpd.c,v 1.229 2020/01/15 22:06:59 jan Exp $ */
+/* $OpenBSD: ftpd.c,v 1.230 2021/05/20 15:21:03 jan Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
if (!transflag)
return;
cp = tmpline;
- ret = get_line(cp, sizeof(tmpline)-1, stdin);
+ ret = get_line(cp, sizeof(tmpline)-1);
if (ret == -1) {
reply(221, "You could at least say goodbye.");
dologout(0);
-/* $OpenBSD: monitor.c,v 1.27 2021/05/15 13:37:43 jan Exp $ */
+/* $OpenBSD: monitor.c,v 1.28 2021/05/20 15:21:03 jan Exp $ */
/*
* Copyright (c) 2004 Moritz Jodeit <moritz@openbsd.org>
break;
case AUTH_SLAVE:
if (pledge("stdio rpath wpath cpath inet recvfd"
- " sendfd proc tty getpw", NULL) == -1)
+ " sendfd proc tty getpw", NULL) == -1)
fatalx("pledge");
/* User-privileged slave */
debugmsg("user-privileged slave started");