summaryrefslogtreecommitdiff
path: root/core/src/xmake/machine.c
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-23 10:08:10 +0800
committerGitHub <[email protected]>2017-05-23 10:08:10 +0800
commitffa57872e4e1df66db1df8174ffcde4ff0dcd296 (patch)
treeefdfac36b53d06e8f18d12e4abe1d32de85cc67e /core/src/xmake/machine.c
parenta29b2d72f26bc88f64eb44cd14255dad68153e7d (diff)
parent2cb7a91bf266680266de51636ce6620cbecc9362 (diff)
Merge pull request #113 from TitanSnow/root
privilege manage (escalation & degradation) when running as root
Diffstat (limited to 'core/src/xmake/machine.c')
-rw-r--r--core/src/xmake/machine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c
index 753ff579d..ccfd91254 100644
--- a/core/src/xmake/machine.c
+++ b/core/src/xmake/machine.c
@@ -83,6 +83,8 @@ tb_int_t xm_os_getwinsize(lua_State* lua);
tb_int_t xm_os_versioninfo(lua_State* lua);
#ifndef TB_CONFIG_OS_WINDOWS
tb_int_t xm_os_uid(lua_State* lua);
+tb_int_t xm_os_gid(lua_State* lua);
+tb_int_t xm_os_getown(lua_State* lua);
#endif
// the path functions
@@ -146,6 +148,8 @@ static luaL_Reg const g_os_functions[] =
, { "versioninfo", xm_os_versioninfo}
#ifndef TB_CONFIG_OS_WINDOWS
, { "uid", xm_os_uid }
+, { "gid", xm_os_gid }
+, { "getown", xm_os_getown }
#endif
, { tb_null, tb_null }
};