-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graftcp sudo does not work #11
Comments
|
By the way, if the |
Thanks for your reply!
|
You can try this: $ sudo graftcp bash # or zsh, fish...
$ whoami
root
$ yay As a root, do anything you wanna do 😁 |
Hmmmm, yes it could work on some programs. But some forces to run as a non-root, if you run it as root, it will give error immediately. |
Do you mean that the root's environment does not match the non-root's environment, so that it cause the environmental dependency error? You can try |
Sorry, but I don't understand.
|
@hellobbn Thank you for your example. $ sudo chown root:root graftcp
$ sudo chmod a+s graftcp
# Then you can use graftcp to trace sudo...
$ graftcp bash
➜ makepkg |
Hi, hmgle.
|
However, this workaround works well in almost every case. To make it easier, you can write a shell script
Then you just need to use |
can i use graftcp on alpine? |
Hi,
In this commit ,the A workaround:
Remove these lines, and run command like this, which run
|
Thank you for your feedback. Introducing
|
When tracing a process that needs to execute setuid(2) or similar operations that require privilege escalation (e.g., sudo), it is necessary to avoid calling prctl(PR_SET_NO_NEW_PRIVS, 1). This call would prevent the tracee process from gaining the required privileges, leading to failures. Related issue #11 #11 (comment)
@fangzhen I saw the solution implemented in strace and copied the code over. Now the command can be executed perfectly. Thanks to strace. |
Describe the bug
graftcp sudo
does not work, sograftcp yay
which uses it will cause error.To Reproduce
Try command
graftcp sudo
orgraftcp yay
Additional context
I found some notes here
So maybe this will not be fixed? (I am not familiar with this)
The text was updated successfully, but these errors were encountered: