mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Pledge and unveil redbean's unit tests
This commit is contained in:
parent
513a659dd2
commit
31e4b0867b
21 changed files with 44 additions and 6 deletions
4
third_party/lua/lunix.c
vendored
4
third_party/lua/lunix.c
vendored
|
@ -1382,13 +1382,13 @@ static int LuaUnixPledge(lua_State *L) {
|
|||
pledge(luaL_checkstring(L, 1), luaL_optstring(L, 2, 0)));
|
||||
}
|
||||
|
||||
// sandbox.unveil(path:str, permissions:str)
|
||||
// sandbox.unveil([path:str[, permissions:str]])
|
||||
// ├─→ true
|
||||
// └─→ nil, unix.Errno
|
||||
static int LuaUnixUnveil(lua_State *L) {
|
||||
int olderr = errno;
|
||||
return SysretBool(L, "unveil", olderr,
|
||||
unveil(luaL_checkstring(L, 1), luaL_checkstring(L, 2)));
|
||||
unveil(luaL_optstring(L, 1, 0), luaL_optstring(L, 2, 0)));
|
||||
}
|
||||
|
||||
// unix.gethostname()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue