]> granicus.if.org Git - vim/commitdiff
updated for version 7.0111
authorBram Moolenaar <Bram@vim.org>
Wed, 20 Jul 2005 21:57:28 +0000 (21:57 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 20 Jul 2005 21:57:28 +0000 (21:57 +0000)
src/os_unix.c

index 01b6fad0a3d4029aa46ec7f55270d423f6758fd1..9881d4a8070266f8bc874702eedf376171d7d31d 100644 (file)
@@ -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()))