# HG changeset patch # User Christian Brabandt # Date 1502132406 -7200 # Node ID e1001274064fbafee14987cb82819542143e7f67 # Parent 647d218826ad7a464cc2bba1e0bd2785c2575ee0 patch 8.0.0887: can create a logfile in the sandbox commit https://github.com/vim/vim/commit/6d87e9e1c6a580609d48d4aa54a20b26b10c5b77 Author: Bram Moolenaar Date: Mon Aug 7 20:51:51 2017 +0200 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 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1930,6 +1930,9 @@ f_ch_logfile(typval_T *argvars, typval_T 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 --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 887, +/**/ 886, /**/ 885,