Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions docs/docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4442,35 +4442,25 @@ local doc = {
desc = 'Returns the user ID of the process.',
returns = 'integer',
notes = {
'This is not a libuv function and is not supported on Windows.',
'This is not a libuv function and does not exist when targeting Windows.',
},
warnings = {
[[
Deprecated. Use `uv.os_get_passwd()` instead.
]],
},
},
{
name = 'getgid',
desc = 'Returns the group ID of the process.',
returns = 'integer',
notes = {
'This is not a libuv function and is not supported on Windows.',
},
},
{
name = 'setuid',
desc = 'Sets the user ID of the process with the integer `id`.',
params = {
{ name = 'id', type = 'integer' },
},
notes = {
'This is not a libuv function and is not supported on Windows.',
},
},
{
name = 'setgid',
desc = 'Sets the group ID of the process with the integer `id`.',
params = {
{ name = 'id', type = 'integer' },
'This is not a libuv function and does not exist when targeting Windows.',
},
notes = {
'This is not a libuv function and is not supported on Windows.',
warnings = {
[[
Deprecated. Use `uv.os_get_passwd()` instead.
]],
},
},
{
Expand Down
28 changes: 5 additions & 23 deletions docs/docs.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 6 additions & 14 deletions docs/meta.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/luv.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,7 @@ static const luaL_Reg luv_functions[] = {
{"getpid", luv_getpid},
#ifndef _WIN32
{"getuid", luv_getuid},
{"setuid", luv_setuid},
{"getgid", luv_getgid},
{"setgid", luv_setgid},
#endif
{"getrusage", luv_getrusage},
#if LUV_UV_VERSION_GEQ(1, 50, 0)
Expand Down
18 changes: 0 additions & 18 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,24 +473,6 @@ static int luv_getgid(lua_State* L){
return 1;
}

static int luv_setuid(lua_State* L){
int uid = luaL_checkinteger(L, 1);
int r = setuid(uid);
if (-1 == r) {
luaL_error(L, "Error setting UID");
}
return 0;
}

static int luv_setgid(lua_State* L){
int gid = luaL_checkinteger(L, 1);
int r = setgid(gid);
if (-1 == r) {
luaL_error(L, "Error setting GID");
}
return 0;
}

#if LUV_UV_VERSION_GEQ(1, 8, 0)
static int luv_print_all_handles(lua_State* L){
luv_ctx_t* ctx = luv_context(L);
Expand Down
Loading