diff options
author | 2011-09-25 18:53:04 +0000 | |
---|---|---|
committer | 2011-09-25 18:53:04 +0000 | |
commit | a89a0cee0e4b7c85d8511ad444f84653c2a41d82 (patch) | |
tree | 609df78d18d44a493ca7fd7437561eee5d6a5440 /usr.bin/tmux/tmux.c | |
parent | tweak previous; ok schwarze (diff) | |
download | wireguard-openbsd-a89a0cee0e4b7c85d8511ad444f84653c2a41d82.tar.xz wireguard-openbsd-a89a0cee0e4b7c85d8511ad444f84653c2a41d82.zip |
Reject $SHELL if it is not a full path.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r-- | usr.bin/tmux/tmux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c index b12a8fbbb52..d5320ea1d18 100644 --- a/usr.bin/tmux/tmux.c +++ b/usr.bin/tmux/tmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.c,v 1.104 2011/03/04 23:26:44 nicm Exp $ */ +/* $OpenBSD: tmux.c,v 1.105 2011/09/25 18:53:04 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |