CrewLink icon indicating copy to clipboard operation
CrewLink copied to clipboard

Can you launch Among Us to prevent ptrace security getting in the way?

Open M-Reimer opened this issue 4 years ago • 11 comments

In the README you state that CrewLink does not start Among Us which forces us to disable ptrace security.

So the obvious question would be: Can you actually make CrewLink start Among Us? Or worst case start Steam from CrewLink so Among Us is a child of CrewLink.

M-Reimer avatar Dec 29 '20 10:12 M-Reimer

Not the Author, but I tried doing this on my branch, I couldn't launch it with steam, the steam command to launch it will be a steam://.... which seems to be disowning the process it launches, it might be possible if we try to use the proton launcher instead but i didn't try that.

ghaith avatar Dec 29 '20 11:12 ghaith

But you could launch steam from CrewLink and then Among Us from steam?

M-Reimer avatar Dec 29 '20 11:12 M-Reimer

https://github.com/ghaith/CrewLink I pushed that here, didn't want to push it to the current PR (#5) since it's not direcly related but is based on it anyway, i'll do a new PR once the original is accepted. You still need to copy the uiohook from your system on that branch to run it.

The differences between my master branch and zbank's is that I started from upstream directly and didn't update the readme yet.

ghaith avatar Dec 29 '20 13:12 ghaith

The easiest way would be to use Steam Launch Options.

Steam Launch Options would be set to /path/to/crewlink -- %command% (Steam expands %command% to the original command used to launch the game) and then crewlink would just spawn a subprocess specified by the args after the --.

jbalme avatar Jan 02 '21 02:01 jbalme

I went digging through my system files at /etc/sysctl.d/10-ptrace.conf and found a reference to a ptrace override:

# For applications launching crash handlers that need PTRACE, exceptions can
# be registered by the debugee by declaring in the segfault handler
# specifically which process will be using PTRACE on the debugee:
#   prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0);

I have yet to figure out how to use it. Looking at documentation at https://linux.die.net/man/2/prctl, I can't tell if it's a launch option or something that needs to be specified at compile time.

Shadow8472 avatar Feb 20 '21 00:02 Shadow8472

I went digging through my system files at /etc/sysctl.d/10-ptrace.conf and found a reference to a ptrace override:

# For applications launching crash handlers that need PTRACE, exceptions can
# be registered by the debugee by declaring in the segfault handler
# specifically which process will be using PTRACE on the debugee:
#   prctl(PR_SET_PTRACER, debugger_pid, 0, 0, 0);

I have yet to figure out how to use it. Looking at documentation at https://linux.die.net/man/2/prctl, I can't tell if it's a launch option or something that needs to be specified at compile time.

Wine would have to call that, not crewlink. That's probably a no go.

Another way around the problem would be to setcap CAP_SYS_PTRACE the electron/crewlink binaries. That has side effects like ignoring LD_LIBRARY_PATH that I'm not sure electron would be happy with. The ideal way is just to launch amongus.

jbalme avatar Feb 20 '21 04:02 jbalme

Is this project dead? I may end up looking into running the original from the same prefix or something.

Shadow8472 avatar Mar 01 '21 01:03 Shadow8472

I think there's another fork of a more recent version of CrewLink

jbalme avatar Mar 01 '21 06:03 jbalme

Where should I look? There are too many forks to search individually, and hardly any say they support Linux. Furthermore, how do I tell if it will be compatible with the root branch?

Shadow8472 avatar Mar 01 '21 23:03 Shadow8472

Where should I look? There are too many forks to search individually, and hardly any say they support Linux. Furthermore, how do I tell if it will be compatible with the root branch?

https://github.com/TheGreatMcPain/CrewLink

Release page for v2.0.1

TheGreatMcPain avatar Mar 01 '21 23:03 TheGreatMcPain

Thanks.

Shadow8472 avatar Mar 01 '21 23:03 Shadow8472