From e92d3ea99892b6e2c5caa45abcccee7b550861ae Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 13 Sep 2023 03:03:46 -0500 Subject: [PATCH] Don't exec NOFORK commands. --- toys/pending/sh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toys/pending/sh.c b/toys/pending/sh.c index 1dd1e0fd..86a38613 100644 --- a/toys/pending/sh.c +++ b/toys/pending/sh.c @@ -2714,7 +2714,7 @@ static void sh_exec(char **argv) errno = ENOENT; if (strchr(ss, '/')) { if (access(ss, X_OK)) ss = 0; - } else if (CFG_TOYBOX_NORECURSE || !toys.stacktop || !(tl = toy_find(ss))) + } else if (CFG_TOYBOX_NORECURSE || !toys.stacktop || TT.isexec || !(tl = toy_find(ss))) for (sl = find_in_path(pp, ss); sl || (ss = 0); free(llist_pop(&sl))) if (!access(ss = sl->str, X_OK)) break; -- 2.39.2