From 30bc867aecc59265b6e315acf459f8d79c423bca Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 14 Mar 2024 13:45:48 +0800 Subject: Improve /proc/self/exe substitution on Android * exec/configure.ac (USER_SWORD): New macro. * exec/exec.c (format_pid): Export this function. * exec/exec.h: * exec/trace.c (canon_path): New function. (handle_readlinkat, handle_openat): Test complete file name against /proc/self/exe, and further check for /proc/pid/exe. --- exec/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exec/exec.c') diff --git a/exec/exec.c b/exec/exec.c index 254a983f25f..cbe22d4f18c 100644 --- a/exec/exec.c +++ b/exec/exec.c @@ -865,7 +865,7 @@ insert_args (struct exec_tracee *tracee, USER_REGS_STRUCT *regs, result in *IN, and return a pointer to the byte after the result. REM should be NULL. */ -static char * +char * format_pid (char *in, unsigned int pid) { unsigned int digits[32], *fill; -- cgit v1.2.1