suppress verbose messages from CWD and post-login if the first
character of the anonymous password is `-'.
This commit is contained in:
parent
c8493e9499
commit
ab88a15086
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: conf.c,v 1.28 2000/01/12 22:39:27 lukem Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.29 2000/01/13 00:04:31 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: conf.c,v 1.28 2000/01/12 22:39:27 lukem Exp $");
|
||||
__RCSID("$NetBSD: conf.c,v 1.29 2000/01/13 00:04:31 lukem Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -472,6 +472,9 @@ show_chdir_messages(code)
|
|||
char cwd[MAXPATHLEN];
|
||||
char *cp, **rlist;
|
||||
|
||||
if (quietmessages)
|
||||
return;
|
||||
|
||||
/* Setup list for directory cache */
|
||||
if (slist == NULL)
|
||||
slist = sl_init();
|
||||
|
@ -534,6 +537,9 @@ format_file(file, code)
|
|||
off_t b;
|
||||
time_t now;
|
||||
|
||||
if (quietmessages)
|
||||
return (0);
|
||||
|
||||
#define PUTC(x) putchar(x), b++
|
||||
|
||||
if (EMPTYSTR(file))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.23 2000/01/12 22:39:28 lukem Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.24 2000/01/13 00:04:31 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -221,6 +221,7 @@ GLOBAL int logging;
|
|||
GLOBAL int pdata;
|
||||
GLOBAL char proctitle[];
|
||||
GLOBAL struct passwd *pw;
|
||||
GLOBAL int quietmessages;
|
||||
GLOBAL char remotehost[];
|
||||
GLOBAL off_t restart_point;
|
||||
GLOBAL char tmpline[];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: ftpd.8,v 1.49 2000/01/08 11:09:56 lukem Exp $
|
||||
.\" $NetBSD: ftpd.8,v 1.50 2000/01/13 00:04:31 lukem Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
|
@ -67,7 +67,7 @@
|
|||
.\"
|
||||
.\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94
|
||||
.\"
|
||||
.Dd January 8, 2000
|
||||
.Dd January 13, 2000
|
||||
.Dt FTPD 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -348,6 +348,13 @@ commands and the setting of a specific umask), then appropriate
|
|||
entries in
|
||||
.Xr ftpd.conf 5
|
||||
are required.
|
||||
.Pp
|
||||
If the first character of the password supplied by an anonymous user
|
||||
is
|
||||
.Dq - ,
|
||||
then the verbose messages displayed at login and upon a
|
||||
.Sy CWD
|
||||
command are suppressed.
|
||||
.El
|
||||
.Sh Display file escape sequences
|
||||
.Pp
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ftpd.c,v 1.84 2000/01/12 22:39:28 lukem Exp $ */
|
||||
/* $NetBSD: ftpd.c,v 1.85 2000/01/13 00:04:31 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 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.84 2000/01/12 22:39:28 lukem Exp $");
|
||||
__RCSID("$NetBSD: ftpd.c,v 1.85 2000/01/13 00:04:31 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -778,6 +778,7 @@ end_login()
|
|||
}
|
||||
pw = NULL;
|
||||
logged_in = 0;
|
||||
quietmessages = 0;
|
||||
curclass.type = CLASS_REAL;
|
||||
}
|
||||
|
||||
|
@ -983,6 +984,9 @@ skip:
|
|||
}
|
||||
setenv("HOME", home, 1);
|
||||
|
||||
if (curclass.type == CLASS_GUEST && passwd[0] == '-')
|
||||
quietmessages = 1;
|
||||
|
||||
/*
|
||||
* Display a login message, if it exists.
|
||||
* N.B. reply(230,) must follow the message.
|
||||
|
@ -1934,6 +1938,9 @@ epsvonly:;
|
|||
lreply(0,
|
||||
"Upload commands (APPE, STOR, STOU): %sabled",
|
||||
curclass.upload ? "en" : "dis");
|
||||
if (curclass.portmin && curclass.portmax)
|
||||
lreply(0, "PASV port range: %d - %d",
|
||||
curclass.portmin, curclass.portmax);
|
||||
if (curclass.rateget)
|
||||
lreply(0, "Rate get limit: %d bytes/sec",
|
||||
curclass.rateget);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: version.h,v 1.6 2000/01/12 22:39:29 lukem Exp $ */
|
||||
/* $NetBSD: version.h,v 1.7 2000/01/13 00:04:32 lukem Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -36,5 +36,5 @@
|
|||
*/
|
||||
|
||||
#ifndef FTPD_VERSION
|
||||
#define FTPD_VERSION "Version: NetBSD-ftpd/20000111"
|
||||
#define FTPD_VERSION "Version: NetBSD-ftpd/20000113"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue