diff --git a/libncftp/lglob.c b/libncftp/lglob.c index e374f0c..2d74cd5 100644 --- a/libncftp/lglob.c +++ b/libncftp/lglob.c @@ -137,11 +137,11 @@ LazyUnixLocalGlob(FTPCIPtr cip, FTPLineListPtr fileList, const char *const patte * work for us. */ #ifdef HAVE_SNPRINTF - (void) snprintf(cmd, sizeof(cmd) - 1, "%s -c \"%s %s %s\"", "/bin/sh", "/bin/ls", + (void) snprintf(cmd, sizeof(cmd) - 1, "%s -c \"%s %s %s\"", "sh", "ls", "-d", pattern); cmd[sizeof(cmd) - 1] = '\0'; #else - (void) sprintf(cmd, "%s -c \"%s %s %s\"", "/bin/sh", "/bin/ls", + (void) sprintf(cmd, "%s -c \"%s %s %s\"", "sh", "ls", "-d", pattern); #endif diff --git a/ncftp/cmds.c b/ncftp/cmds.c index 241c7c5..228fb0a 100644 --- a/ncftp/cmds.c +++ b/ncftp/cmds.c @@ -2031,7 +2031,7 @@ LocalListCmd(const int argc, char **const argv, const CommandPtr cmdp, const Arg (void) fflush(stdin); outfp = OpenPager(); - (void) STRNCPY(incmd, "/bin/ls"); + (void) STRNCPY(incmd, "ls"); for (i=1, dashopts=0; i