From bf88879b0d1a801aa4fd3e804dc5071f2e710a06 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Fri, 23 Dec 2016 14:43:22 +0900 Subject: [PATCH] Revert "exec: prevent a command in a current dirctory from being executed" This reverts commit 1b4d572b777b508db33d819288dd4ea188e65aa8. An empty path is treated as a current directory in Unix, too. --- exec.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/exec.c b/exec.c index 0c9ca77..e674d87 100644 --- a/exec.c +++ b/exec.c @@ -1332,15 +1332,6 @@ search_path(const char *name, const char *lpath, sp = p; XcheckN(xs, xp, namelen); memcpy(xp, name, namelen); -#ifdef __OS2__ - /* - * Skip path without a directory part to prevent from searching the - * current directory. For example, PATH=;...;;...; - */ - if (!mksh_vdirsep(Xstring(xs, xp))) - /* nothing */; - else -#endif if ((ev = search_access(Xstring(xs, xp), mode)) == 0) { name = Xclose(xs, xp + namelen); goto search_path_ok;