From edd59d9e0f698aca04841365400853a3aa03b47f Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sun, 2 Oct 2011 11:32:24 +0000 Subject: Sync OpenBSD patchset 960: Reject $SHELL if it is not a full path. --- window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'window.c') diff --git a/window.c b/window.c index d589405b..8b82c06e 100644 --- a/window.c +++ b/window.c @@ -694,7 +694,7 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell, if (*wp->cmd != '\0') { /* Set SHELL but only if it is currently not useful. */ shell = getenv("SHELL"); - if (shell == NULL || *shell == '\0' || areshell(shell)) + if (checkshell(shell)) setenv("SHELL", wp->shell, 1); execl(_PATH_BSHELL, "sh", "-c", wp->cmd, (char *) NULL); -- cgit