mirror of
https://github.com/lxsang/antd-lua-plugin
synced 2024-12-27 09:58:21 +01:00
fix security bug
This commit is contained in:
parent
68c9177508
commit
5e5b76a267
BIN
dist/lua-0.5.2b.tar.gz
vendored
BIN
dist/lua-0.5.2b.tar.gz
vendored
Binary file not shown.
@ -145,7 +145,7 @@ static int l_setuid(lua_State* L)
|
||||
uid_t uid = (uid_t) luaL_checknumber(L,1);
|
||||
if((int)uid != -1)
|
||||
{
|
||||
if(seteuid(uid) < 0)
|
||||
if(setuid(uid) < 0)
|
||||
{
|
||||
printf("UID set problem: %s\n", strerror(errno));
|
||||
lua_pushboolean(L,0);
|
||||
@ -165,7 +165,7 @@ static int l_setgid(lua_State* L)
|
||||
uid_t gid = (uid_t) luaL_checknumber(L,1);
|
||||
if((int)gid != -1)
|
||||
{
|
||||
if(setegid(gid) < 0)
|
||||
if(setgid(gid) < 0)
|
||||
{
|
||||
printf("GID set problem: %s\n", strerror(errno));
|
||||
lua_pushboolean(L,0);
|
||||
|
Loading…
Reference in New Issue
Block a user