diff --git a/source/texk/web2c/luatexdir/lua/luainit.w b/source/texk/web2c/luatexdir/lua/luainit.w
index ca7556420389e0ee5be0115cbd6390f96980bbd1..1cd555302bd78aeeb29c45bba3dc993245dc39a3 100644
--- a/source/texk/web2c/luatexdir/lua/luainit.w
+++ b/source/texk/web2c/luatexdir/lua/luainit.w
@@ -1,6 +1,6 @@
 % luainit.w
 %
-% Copyright 2006-2016 Taco Hoekwater <taco@@luatex.org>
+% Copyright 2006-2017 Taco Hoekwater <taco@@luatex.org>
 %
 % This file is part of LuaTeX.
 %
@@ -417,7 +417,7 @@ static void parse_options(int ac, char **av)
                  "the terms of the GNU General Public License, version 2 or (at your option)\n"
                  "any later version. For more information about these matters, see the file\n"
                  "named COPYING and the LuaTeX source.\n\n"
-                 "LuaTeX is Copyright 2016 Taco Hoekwater and the LuaTeX Team.\n");
+                 "LuaTeX is Copyright 2017 Taco Hoekwater and the LuaTeX Team.\n");
             /* *INDENT-ON* */
             uexit(0);
         } else if (ARGUMENT_IS("credits")) {
diff --git a/source/texk/web2c/luatexdir/lua/luajitstuff.w b/source/texk/web2c/luatexdir/lua/luajitstuff.w
index f219d5bd6542879a8c7c1d1c8dc71a0429e0040a..b29de18c9b7fcd41571265e259f0f0a02a819041 100644
--- a/source/texk/web2c/luatexdir/lua/luajitstuff.w
+++ b/source/texk/web2c/luatexdir/lua/luajitstuff.w
@@ -349,6 +349,10 @@ void luainterpreter(void)
         (void) hide_lua_value(L, "lfs", "rmdir");
         (void) hide_lua_value(L, "lfs", "mkdir");
     }
+    /* Maybe we can extend this way to the others tables, using luac. */
+    if ( safer_option || ((shellenabledp == 0) || (shellenabledp == 1 && restrictedshell == 1)) ) {
+       (void)   luaL_dostring(L,"ffi=require[[ffi]]; for k,_ in pairs(ffi) do if k~='gc' then ffi[k]=nil end ;end; ffi=nil;");
+    }  
     /* fprintf(stdout, "\nLuajitTeX default hash function type:%s\n", */
     /* 		                                jithash_hashname); */
     Luas = L;
diff --git a/source/texk/web2c/luatexdir/lua/luastuff.w b/source/texk/web2c/luatexdir/lua/luastuff.w
index 914730375fe89e9f6504482819dafb5c99b75664..f90f0e180e8d042c58f9e1745bf6d63236b29678 100644
--- a/source/texk/web2c/luatexdir/lua/luastuff.w
+++ b/source/texk/web2c/luatexdir/lua/luastuff.w
@@ -310,6 +310,10 @@ void luainterpreter(void)
         (void) hide_lua_value(L, "lfs", "rmdir");
         (void) hide_lua_value(L, "lfs", "mkdir");
     }
+    /* Maybe we can extend this way to the others tables, using luac. */
+    if ( safer_option || ((shellenabledp == 0) || (shellenabledp == 1 && restrictedshell == 1)) ) {
+       (void)   luaL_dostring(L,"ffi=require[[ffi]]; for k,_ in pairs(ffi) do if k~='gc' then ffi[k]=nil end; end; ffi=nil;");
+    }  
     Luas = L;
 }