mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
fix(fex): x86-64 DwarFS AppImages start and GLib programs reach D-Bus (#3162)
* fix(fex): a program run from a descriptor keeps its argv[0] and an absolute /proc/self/exe * fix(fex): 64-bit programs send their socket credentials through the hook D-Bus clients fill SCM_CREDENTIALS with getuid(), which is 0 under the guest. FEX sent x86-64 sendmsg straight to the kernel, which refused the fake root uid with EPERM, so GLib programs lost the session bus and every portal. sendmsg, recvmsg and getsockopt now go through libc like the identity calls, so the hook puts in the real ids and shows the peer as root.
This commit is contained in:
1 parent
5ca0575e67
commit
afe81ea69f
5 files changed
+241
No files matched your search
@@ -724,6 +724,21 @@ long syscall(long number, ...) {
|
||||
return (long)bind((int)arg1, (const struct sockaddr *)arg2, (socklen_t)arg3);
|
||||
}
|
||||
#endif
|
||||
#if defined(__NR_sendmsg)
|
||||
if (number == __NR_sendmsg) {
|
||||
return (long)sendmsg((int)arg1, (const struct msghdr *)arg2, (int)arg3);
|
||||
}
|
||||
#endif
|
||||
#if defined(__NR_recvmsg)
|
||||
if (number == __NR_recvmsg) {
|
||||
return (long)recvmsg((int)arg1, (struct msghdr *)arg2, (int)arg3);
|
||||
}
|
||||
#endif
|
||||
#if defined(__NR_getsockopt)
|
||||
if (number == __NR_getsockopt) {
|
||||
return (long)getsockopt((int)arg1, (int)arg2, (int)arg3, (void *)arg4, (socklen_t *)arg5);
|
||||
}
|
||||
#endif
|
||||
#if defined(__NR_truncate)
|
||||
if (number == __NR_truncate) {
|
||||
return (long)truncate((const char *)arg1, (off_t)arg2);
|
||||
|
||||
Reference in new issue
Block a user