1
0
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:
lxsang 2020-12-26 14:56:38 +01:00
parent 68c9177508
commit 5e5b76a267
2 changed files with 2 additions and 2 deletions

BIN
dist/lua-0.5.2b.tar.gz vendored

Binary file not shown.

View File

@ -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);