patch 8.0.0887: can create a logfile in the sandbox
Problem: Can create a logfile in the sandbox.
Solution: Disable ch_logfile() in the sandbox. (Yasuhiro Matsumoto)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 2377d19..0703b44 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -1930,6 +1930,9 @@
char_u *opt = (char_u *)"";
char_u buf[NUMBUFLEN];
+ /* Don't open a file in restricted mode. */
+ if (check_restricted() || check_secure())
+ return;
fname = get_tv_string(&argvars[0]);
if (argvars[1].v_type == VAR_STRING)
opt = get_tv_string_buf(&argvars[1], buf);
diff --git a/src/version.c b/src/version.c
index 4e78e31..29703ed 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 887,
+/**/
886,
/**/
885,