$OpenBSD: patch-src_scripting_c,v 1.2 2013/07/02 06:03:35 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	Thu Jun 20 10:36:40 2013
+++ src/scripting.c	Tue Jul  2 07:37:57 2013
@@ -481,6 +481,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
