0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-03-04 04:48:55 +00:00
termux-packages/packages/weechat/no-setuid.patch

49 lines
1.8 KiB
Diff

diff --git a/src/core/hook/hook-process.c b/src/core/hook/hook-process.c
index b0a3c1d..d408c9c 100644
--- a/src/core/hook/hook-process.c
+++ b/src/core/hook/hook-process.c
@@ -693,8 +693,6 @@ hook_process_run (struct t_hook *hook_process)
return;
/* child process */
case 0:
- rc = setuid (getuid ());
- (void) rc;
hook_process_child (hook_process);
/* never executed */
_exit (EXIT_SUCCESS);
diff --git a/src/core/core-network.c b/src/core/core-network.c
index ced066e..0ac5360 100644
--- a/src/core/core-network.c
+++ b/src/core/core-network.c
@@ -1925,8 +1925,6 @@ network_connect_with_fork (struct t_hook *hook_connect)
return;
/* child process */
case 0:
- rc = setuid (getuid ());
- (void) rc;
close (HOOK_CONNECT(hook_connect, child_read));
if (hook_socketpair_ok)
close (HOOK_CONNECT(hook_connect, child_recv));
diff --git a/src/plugins/xfer/xfer-network.c b/src/plugins/xfer/xfer-network.c
index ac23ac619..182953084 100644
--- a/src/plugins/xfer/xfer-network.c
+++ b/src/plugins/xfer/xfer-network.c
@@ -236,8 +236,6 @@ xfer_network_send_file_fork (struct t_xfer *xfer)
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;
case 0: /* child process */
- rc = setuid (getuid ());
- (void) rc;
close (xfer->child_read);
switch (xfer->protocol)
{
@@ -309,8 +307,6 @@ xfer_network_recv_file_fork (struct t_xfer *xfer)
xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE);
return;
case 0: /* child process */
- rc = setuid (getuid ());
- (void) rc;
close (xfer->child_read);
switch (xfer->protocol)
{