summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-07-20 21:57:28 +0000
committerBram Moolenaar <Bram@vim.org>2005-07-20 21:57:28 +0000
commit0e634daa954bbdf882575a15a746edf325420cee (patch)
tree9dd396560be39b790082475a1023f57de8fa7d2d /src/os_unix.c
parent84110acb60638c288b4f53aef56353c5559fc05f (diff)
downloadvim-git-0e634daa954bbdf882575a15a746edf325420cee.tar.gz
updated for version 7.0111
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 01b6fad0a..9881d4a80 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5083,14 +5083,16 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
if (!have_wildcard(num_pat, pat))
return save_patterns(num_pat, pat, num_file, file);
+# ifdef HAVE_SANDBOX
+ /* Don't allow any shell command in the sandbox. */
+ if (sandbox != 0 && check_secure())
+ return FAIL;
+# endif
+
/*
* Don't allow the use of backticks in secure and restricted mode.
*/
- if (secure || restricted
-# ifdef HAVE_SANDBOX
- || sandbox != 0
-# endif
- )
+ if (secure || restricted)
for (i = 0; i < num_pat; ++i)
if (vim_strchr(pat[i], '`') != NULL
&& (check_restricted() || check_secure()))