summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>2001-11-27 23:42:40 +0000
committerlukem <lukem@NetBSD.org>2001-11-27 23:42:40 +0000
commit5f6482cfc3bf25be239444559430f837a7df3dba (patch)
tree1e0212d4523283db53bcfd5ebad6ae1cfa0b9341 /libexec
parentdf7d7405f8b1360c2abd7723f82c9758bfe70e30 (diff)
- Don't try and use the motd if it's empty.
Problem reported in [bin/14751] by Kimmo Suominen - Display conffilename() version of limitfile and motd in status output
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpd.c11
-rw-r--r--libexec/ftpd/version.h4
2 files changed, 8 insertions, 7 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 0a412cc0bed..735668cb098 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ftpd.c,v 1.130 2001/09/24 13:22:30 wiz Exp $ */
+/* $NetBSD: ftpd.c,v 1.131 2001/11/27 23:42:40 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.130 2001/09/24 13:22:30 wiz Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.131 2001/11/27 23:42:40 lukem Exp $");
#endif
#endif /* not lint */
@@ -1118,7 +1118,8 @@ pass(const char *passwd)
* Display a login message, if it exists.
* N.B. reply(230,) must follow the message.
*/
- (void)display_file(conffilename(curclass.motd), 230);
+ if (! EMPTYSTR(curclass.motd))
+ (void)display_file(conffilename(curclass.motd), 230);
show_chdir_messages(230);
if (curclass.type == CLASS_GUEST) {
char *p;
@@ -2039,7 +2040,7 @@ statcmd(void)
reply(0, "Maximum connections: %d", curclass.limit);
if (curclass.limitfile)
reply(0, "Connection limit exceeded message file: %s",
- curclass.limitfile);
+ conffilename(curclass.limitfile));
if (! EMPTYSTR(curclass.chroot))
reply(0, "Chroot format: %s", curclass.chroot);
if (! EMPTYSTR(curclass.homedir))
@@ -2050,7 +2051,7 @@ statcmd(void)
reply(0, "Maximum file size: " LLF,
(LLT)curclass.maxfilesize);
if (! EMPTYSTR(curclass.motd))
- reply(0, "MotD file: %s", curclass.motd);
+ reply(0, "MotD file: %s", conffilename(curclass.motd));
reply(0,
"Modify commands (CHMOD, DELE, MKD, RMD, RNFR, UMASK): %sabled",
CURCLASS_FLAGS_ISSET(modify) ? "en" : "dis");
diff --git a/libexec/ftpd/version.h b/libexec/ftpd/version.h
index dd5ccbf0497..69e8260e0cf 100644
--- a/libexec/ftpd/version.h
+++ b/libexec/ftpd/version.h
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.34 2001/09/19 00:50:53 lukem Exp $ */
+/* $NetBSD: version.h,v 1.35 2001/11/27 23:42:41 lukem Exp $ */
/*-
* Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -36,5 +36,5 @@
*/
#ifndef FTPD_VERSION
-#define FTPD_VERSION "NetBSD-ftpd 20010919"
+#define FTPD_VERSION "NetBSD-ftpd 20011128"
#endif