From 88b976f214e14da4ec29a7516d02c0141c8ef597 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 29 Dec 2007 02:40:43 +1100 Subject: [PATCH] - djm@cvs.openbsd.org 2007/12/12 05:04:03 [sftp.c] unbreak lls command and add a regress test that would have caught the breakage; spotted by mouring@ --- ChangeLog | 9 ++++++++- sftp.c | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8609e2407..247f0e10c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +20071229 + - (dtucker) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2007/12/12 05:04:03 + [sftp.c] + unbreak lls command and add a regress test that would have caught the + breakage; spotted by mouring@ + 20071202 - (dtucker) [configure.ac] Enable -fstack-protector-all on systems where gcc supports it. ok djm@ @@ -3458,4 +3465,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4806 2007/12/02 12:22:52 dtucker Exp $ +$Id: ChangeLog,v 1.4807 2007/12/28 15:40:43 dtucker Exp $ diff --git a/sftp.c b/sftp.c index e8113875e..db0a8d9af 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.97 2007/10/24 03:30:02 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.98 2007/12/12 05:04:03 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -1080,6 +1080,8 @@ parse_args(const char **cpp, int *pflag, int *lflag, int *iflag, *path1 = xstrdup(argv[optidx]); break; case I_LLS: + /* Skip ls command and following whitespace */ + cp = cp + strlen(cmd) + strspn(cp, WHITESPACE); case I_SHELL: /* Uses the rest of the line */ break;