$OpenBSD: patch-src_scripting_c,v 1.3 2013/11/29 08:32:24 dcoppa Exp $

Remove dofile() from Redis Lua scripting, because it allows an
attacker to enumerate filesystem contents. See:
http://blog.liftsecurity.io/post/35714931664/filesystem-enumeration-using-redis-and-lua

--- src/scripting.c.orig	Mon Nov 25 11:21:49 2013
+++ src/scripting.c	Wed Nov 27 14:56:38 2013
@@ -492,6 +492,8 @@ void luaLoadLibraries(lua_State *lua) {
 void luaRemoveUnsupportedFunctions(lua_State *lua) {
     lua_pushnil(lua);
     lua_setglobal(lua,"loadfile");
+    lua_pushnil(lua);
+    lua_setglobal(lua,"dofile");
 }
 
 /* This function installs metamethods in the global table _G that prevent
