Fixes from Dmitry Sivachenko <demon@freebsd.org>:
- always set "curname" to something appropriate (even when logging is not in effect). - fix usage for "PORT" command
This commit is contained in:
parent
c406903ac2
commit
6d15ebd30b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ftpcmd.y,v 1.72 2002/11/29 14:39:59 lukem Exp $ */
|
||||
/* $NetBSD: ftpcmd.y,v 1.73 2003/01/22 04:33:35 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2002 The NetBSD Foundation, Inc.
|
||||
|
@ -83,7 +83,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: ftpcmd.y,v 1.72 2002/11/29 14:39:59 lukem Exp $");
|
||||
__RCSID("$NetBSD: ftpcmd.y,v 1.73 2003/01/22 04:33:35 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -1222,7 +1222,7 @@ struct tab cmdtab[] = {
|
|||
{ "SMNT", SMNT, ARGS, 0, "(structure mount)" },
|
||||
{ "QUIT", QUIT, NOARGS, 1, "(terminate service)" },
|
||||
{ "REIN", REIN, NOARGS, 0, "(reinitialize server state)" },
|
||||
{ "PORT", PORT, ARGS, 1, "<sp> b0, b1, b2, b3, b4" },
|
||||
{ "PORT", PORT, ARGS, 1, "<sp> b0, b1, b2, b3, b4, b5" },
|
||||
{ "LPRT", LPRT, ARGS, 1, "<sp> af, hal, h1, h2, h3,..., pal, p1, p2..." },
|
||||
{ "EPRT", EPRT, STR1, 1, "<sp> |af|addr|port|" },
|
||||
{ "PASV", PASV, NOARGS, 1, "(set server in passive mode)" },
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ftpd.c,v 1.148 2002/12/06 01:59:22 thorpej Exp $ */
|
||||
/* $NetBSD: ftpd.c,v 1.149 2003/01/22 04:33:35 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2001 The NetBSD Foundation, Inc.
|
||||
|
@ -109,7 +109,7 @@ __COPYRIGHT(
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: ftpd.c,v 1.148 2002/12/06 01:59:22 thorpej Exp $");
|
||||
__RCSID("$NetBSD: ftpd.c,v 1.149 2003/01/22 04:33:35 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -670,8 +670,7 @@ user(const char *name)
|
|||
} else
|
||||
pw = sgetpwnam(name);
|
||||
|
||||
if (logging)
|
||||
strlcpy(curname, name, sizeof(curname));
|
||||
strlcpy(curname, name, sizeof(curname));
|
||||
|
||||
/* check user in /etc/ftpusers, and setup class */
|
||||
permitted = checkuser(_PATH_FTPUSERS, curname, 1, 0, &class);
|
||||
|
|
Loading…
Reference in New Issue