$OpenBSD: patch-src_scripting_c,v 1.4 2014/06/06 11:52:49 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  5 11:02:23 2014
+++ src/scripting.c	Fri Jun  6 13:36:48 2014
@@ -559,6 +559,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
