Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
s_security.h File Reference
#include "cpp_api/s_base.h"
+ Include dependency graph for s_security.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ScriptApiSecurity
 

Macros

#define CHECK_SECURE_PATH_INTERNAL(L, path, write_required, ptr)
 
#define CHECK_SECURE_PATH(L, path, write_required)
 
#define CHECK_SECURE_PATH_POSSIBLE_WRITE(L, path, ptr)
 

Macro Definition Documentation

◆ CHECK_SECURE_PATH

◆ CHECK_SECURE_PATH_INTERNAL

#define CHECK_SECURE_PATH_INTERNAL ( L,
path,
write_required,
ptr )
Value:
if (!ScriptApiSecurity::checkPath(L, path, write_required, ptr)) { \
throw LuaError(std::string("Mod security: Blocked attempted ") + \
(write_required ? "write to " : "read from ") + path); \
}
Definition c_types.h:40
static bool checkPath(lua_State *L, const char *path, bool write_required, bool *write_allowed=NULL)
Definition s_security.cpp:525

Referenced by ScriptApiSecurity::sl_g_loadfile(), ScriptApiSecurity::sl_io_input(), ScriptApiSecurity::sl_io_lines(), ScriptApiSecurity::sl_io_open(), ScriptApiSecurity::sl_io_output(), ScriptApiSecurity::sl_os_remove(), and ScriptApiSecurity::sl_os_rename().

◆ CHECK_SECURE_PATH_POSSIBLE_WRITE

#define CHECK_SECURE_PATH_POSSIBLE_WRITE ( L,
path,
ptr )
Value:
CHECK_SECURE_PATH_INTERNAL(L, path, false, ptr); \
}

Referenced by LuaSettings::create_object().