0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-01-19 15:42:17 +00:00
2024-05-18 21:13:24 +01:00

35 lines
734 B
Diff

diff --git a/src/strace.c b/src/strace.c
index 1c2e9a8..050e36e 100644
--- a/src/strace.c
+++ b/src/strace.c
@@ -654,11 +654,7 @@ set_cloexec_flag(int fd)
static void
swap_uid(void)
{
- int euid = geteuid(), uid = getuid();
-
- if (euid != uid && setreuid(euid, uid) < 0) {
- perror_msg_and_die("setreuid");
- }
+ return;
}
static FILE *
@@ -1581,6 +1577,8 @@ exec_or_die(void)
if (!use_seize && ptrace(PTRACE_TRACEME, 0L, 0L, 0L) < 0)
perror_msg_and_die("ptrace(PTRACE_TRACEME, ...)");
}
+#ifndef __TERMUX__
+
if (username != NULL) {
/*
@@ -1609,6 +1607,7 @@ exec_or_die(void)
if (setreuid(run_uid, params->run_euid) < 0)
perror_msg_and_die("setreuid");
}
+#endif
if (!daemonized_tracer) {
/*