summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-09-25 18:53:05 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-09-25 18:53:05 +0000
commit942df656efbbe3dad1888c2ae8de8c3fb7cd2a92 (patch)
tree66057bb194a06454e8a50e2396ad50f912b62d2f /usr.bin/tmux/window.c
parent1012776fffc6d95cc3230978b48367799c5df9a2 (diff)
Reject $SHELL if it is not a full path.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r--usr.bin/tmux/window.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index cc878b60cd0..f4d0da653c7 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.67 2011/08/24 10:29:57 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.68 2011/09/25 18:53:04 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -697,7 +697,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);