summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-09-25 18:53:04 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-09-25 18:53:04 +0000
commite6a59c4bee6ab5da56e3ff6b27a5e16d868d638f (patch)
tree1931f001e5ce375bfde5717a5c1c4b5f4d784586 /tmux.c
parentf14da260c8903a37215a220f4d22965f6fd1820b (diff)
Reject $SHELL if it is not a full path.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tmux.c b/tmux.c
index 196edf6c..5d4fda72 100644
--- a/tmux.c
+++ b/tmux.c
@@ -98,7 +98,9 @@ getshell(void)
int
checkshell(const char *shell)
{
- if (shell == NULL || *shell == '\0' || areshell(shell))
+ if (shell == NULL || *shell == '\0' || *shell != '/')
+ return (0);
+ if (areshell(shell))
return (0);
if (access(shell, X_OK) != 0)
return (0);