Mercurial > vim
diff src/testdir/test_restricted.vim @ 27509:ef32ea9fbe6c v8.2.4282
patch 8.2.4282: restricted mode requires the -Z command line option
Commit: https://github.com/vim/vim/commit/adbb1bf21dad5697cd82d46d9dd9e8e8d0f647e6
Author: matveyt <matthewtarasov@gmail.com>
Date: Tue Feb 1 17:26:12 2022 +0000
patch 8.2.4282: restricted mode requires the -Z command line option
Problem: Restricted mode requires the -Z command line option.
Solution: Use restricted mode when $SHELL ends in "nologin" or "false".
(closes #9681)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 01 Feb 2022 18:30:05 +0100 |
parents | 12518b40c161 |
children | de319bf98a39 |
line wrap: on
line diff
--- 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')