summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-10-02 11:32:24 +0000
committerTiago Cunha <tcunha@gmx.com>2011-10-02 11:32:24 +0000
commitedd59d9e0f698aca04841365400853a3aa03b47f (patch)
tree1ac9130209b5d7590dd08c9e6f996befe534a1a0 /tmux.c
parent326c5bf1b41add03287539c16b8b4192914fb3b5 (diff)
Sync OpenBSD patchset 960:
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 d5992e3a..bf9ee037 100644
--- a/tmux.c
+++ b/tmux.c
@@ -101,7 +101,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);