Minetest 5.9.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

#define CHECK_SECURE_PATH (   L,
  path,
  write_required 
)
Value:
CHECK_SECURE_PATH_INTERNAL(L, path, write_required, NULL); \
}
static bool isSecure(lua_State *L)
Definition: s_security.cpp:414

◆ 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:55
static bool checkPath(lua_State *L, const char *path, bool write_required, bool *write_allowed=NULL)
Definition: s_security.cpp:530

◆ CHECK_SECURE_PATH_POSSIBLE_WRITE

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