diff options
author | matveyt <matthewtarasov@gmail.com> | 2022-02-01 17:26:12 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-01 17:26:12 +0000 |
commit | adbb1bf21dad5697cd82d46d9dd9e8e8d0f647e6 (patch) | |
tree | 4d33ea62fadc04d671829e15a0b8edf130fcc8e3 /src/testdir/test_restricted.vim | |
parent | 9b4a80a66544f2782040b641498754bcb5b8d461 (diff) | |
download | vim-git-adbb1bf21dad5697cd82d46d9dd9e8e8d0f647e6.tar.gz |
patch 8.2.4282: restricted mode requires the -Z command line optionv8.2.4282
Problem: Restricted mode requires the -Z command line option.
Solution: Use restricted mode when $SHELL ends in "nologin" or "false".
(closes #9681)
Diffstat (limited to 'src/testdir/test_restricted.vim')
-rw-r--r-- | src/testdir/test_restricted.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_restricted.vim b/src/testdir/test_restricted.vim index 22ca2f80c..f743fbf3e 100644 --- a/src/testdir/test_restricted.vim +++ b/src/testdir/test_restricted.vim @@ -105,6 +105,14 @@ func Test_restricted_mode() if RunVim([], [], '-Z --clean -S Xrestricted') call assert_equal([], readfile('Xresult')) endif + call delete('Xresult') + if has('unix') && RunVimPiped([], [], '--clean -S Xrestricted', 'SHELL=/bin/false ') + call assert_equal([], readfile('Xresult')) + endif + call delete('Xresult') + if has('unix') && RunVimPiped([], [], '--clean -S Xrestricted', 'SHELL=/sbin/nologin') + call assert_equal([], readfile('Xresult')) + endif call delete('Xrestricted') call delete('Xresult') |