From c63ddfd7263d959c1eedd99ff800fb7f110bec87 Mon Sep 17 00:00:00 2001 From: lukem Date: Mon, 5 May 2008 22:54:11 +0000 Subject: [PATCH] Only attempt to el_parse() a command unknown by the default parser if editing is enabled. Fixes PR bin/38589 --- usr.bin/ftp/main.c | 7 ++++--- usr.bin/ftp/version.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 5592c03cf937..3c2e6da62938 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,7 +1,7 @@ -/* $NetBSD: main.c,v 1.107 2008/04/28 20:24:13 martin Exp $ */ +/* $NetBSD: main.c,v 1.108 2008/05/05 22:54:11 lukem Exp $ */ /*- - * Copyright (c) 1996-2005 The NetBSD Foundation, Inc. + * Copyright (c) 1996-2008 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -97,7 +97,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$NetBSD: main.c,v 1.107 2008/04/28 20:24:13 martin Exp $"); +__RCSID("$NetBSD: main.c,v 1.108 2008/05/05 22:54:11 lukem Exp $"); #endif #endif /* not lint */ @@ -722,6 +722,7 @@ cmdscanner(void) * such commands as invalid. */ if (strchr(margv[0], ':') != NULL || + !editing || el_parse(el, margc, (const char **)margv) != 0) #endif /* !NO_EDITCOMPLETE */ fputs("?Invalid command.\n", ttyout); diff --git a/usr.bin/ftp/version.h b/usr.bin/ftp/version.h index 7953a6a3c95a..e16c8a86d510 100644 --- a/usr.bin/ftp/version.h +++ b/usr.bin/ftp/version.h @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.74 2008/04/28 20:24:13 martin Exp $ */ +/* $NetBSD: version.h,v 1.75 2008/05/05 22:54:11 lukem Exp $ */ /*- * Copyright (c) 1999-2008 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION "20080422" +#define FTP_VERSION "20080505" #endif