Reject $SHELL if it is not a full path.

This commit is contained in:
Nicholas Marriott
2011-09-25 18:53:04 +00:00
parent f14da260c8
commit e6a59c4bee
2 changed files with 4 additions and 2 deletions

4
tmux.c
View File

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