Sync OpenBSD patchset 960:

Reject $SHELL if it is not a full path.
This commit is contained in:
Tiago Cunha
2011-10-02 11:32:24 +00:00
parent 326c5bf1b4
commit edd59d9e0f
2 changed files with 4 additions and 2 deletions

4
tmux.c
View File

@ -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);