diff options
-rw-r--r-- | usr.bin/ssh/pathnames.h | 3 | ||||
-rw-r--r-- | usr.bin/ssh/sftp-int.c | 8 |
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); } |