summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorKevin Steves <stevesk@cvs.openbsd.org>2001-02-08 22:28:08 +0000
committerKevin Steves <stevesk@cvs.openbsd.org>2001-02-08 22:28:08 +0000
commit42d22c84049840d34c843cd1d9b1002e64a53afe (patch)
treecc800ce3d4c508b747f68f19453fc139a642b97b /usr.bin/ssh
parent3c3e71b954a60752c1c3e3edd18bb61944c88cc3 (diff)
_PATH_LS; ok markus@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/pathnames.h3
-rw-r--r--usr.bin/ssh/sftp-int.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/ssh/pathnames.h b/usr.bin/ssh/pathnames.h
index a6835227f7a..39edf315ca4 100644
--- a/usr.bin/ssh/pathnames.h
+++ b/usr.bin/ssh/pathnames.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pathnames.h,v 1.3 2001/02/08 00:04:52 markus Exp $ */
+/* $OpenBSD: pathnames.h,v 1.4 2001/02/08 22:28:07 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -107,3 +107,4 @@
/* for sftp */
#define _PATH_SFTP_SERVER "/usr/libexec/sftp-server"
+#define _PATH_LS "ls"
diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c
index b8c11f71777..fba1756fc46 100644
--- a/usr.bin/ssh/sftp-int.c
+++ b/usr.bin/ssh/sftp-int.c
@@ -28,7 +28,7 @@
/* XXX: recursive operations */
#include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.17 2001/02/08 17:57:59 stevesk Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.18 2001/02/08 22:28:07 stevesk Exp $");
#include "buffer.h"
#include "xmalloc.h"
@@ -169,13 +169,13 @@ void
local_do_ls(const char *args)
{
if (!args || !*args)
- local_do_shell("ls");
+ local_do_shell(_PATH_LS);
else {
- int len = sizeof("/bin/ls ") + strlen(args) + 1;
+ int len = strlen(_PATH_LS " ") + strlen(args) + 1;
char *buf = xmalloc(len);
/* XXX: quoting - rip quoting code from ftp? */
- snprintf(buf, len, "/bin/ls %s", args);
+ snprintf(buf, len, _PATH_LS " %s", args);
local_do_shell(buf);
xfree(buf);
}