diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-02-24 14:12:36 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-02-24 14:12:36 +0100 |
| commit | 02caee0c02c75e035ce976d1ffdb29baa6e0a6c5 (patch) | |
| tree | be18434cbdef194f4de797f8286067ce9f085930 /src/wrapped/wrappedlibc.c | |
| parent | 7260da63afd4c9617a420748a5d143de1e6268c5 (diff) | |
| download | box64-02caee0c02c75e035ce976d1ffdb29baa6e0a6c5.tar.gz box64-02caee0c02c75e035ce976d1ffdb29baa6e0a6c5.zip | |
Added some hack to rename wine binary process too (help mesa pick up the correct binary being run)
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 107eeb94..6629585f 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -3437,6 +3437,11 @@ EXPORT int my_prctl(x64emu_t* emu, int option, unsigned long arg2, unsigned long if(option==PR_SET_NAME) { printf_log(LOG_DEBUG, "BOX64: set process name to \"%s\"\n", (char*)arg2); ApplyParams((char*)arg2); + size_t l = strlen((char*)arg2); + if(l>4 && !strcasecmp((char*)arg2+l-4, ".exe")) { + printf_log(LOG_DEBUG, "BOX64: hacking orig command line to \"%s\"\n", (char*)arg2); + strcpy(my_context->orig_argv[0], (char*)arg2); + } } if(option==PR_SET_SECCOMP) { printf_log(LOG_INFO, "BOX64: ignoring prctl(PR_SET_SECCOMP, ...)\n"); |