-
-
Notifications
You must be signed in to change notification settings - Fork 676
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
Question: needed linux capabilities instead of sudo #861
Comments
|
Have tried it before, but I unfortunately really need the current user as the executer (The program uses IPC communication with other programs and those need to be started with the current user, too) But thanks for the fast response! |
On Linux you can just run the application with no extra privileges and you will get the performance data for the process (but not for any other process on the system). The android section of the manual specifies some commands that take down the security measures to allow non-privileged users to capture system-wide performance data, such as context switches. It almost works, as you need access to |
ah, thanks for the tip. But the program needs still the capabilities |
As the documentation states, it is needed to start the application to be analyzed with elevated permissions. However since this changes the user under linux (exec with sudo) and I need the current user, I've tried to set the possible needed permissions to the application:
sudo setcap 'CAP_PERFMON=eip CAP_SYS_PTRACE=eip CAP_SYS_ADMIN=eip CAP_SYS_RAWIO=eip CAP_SYSLOG=eip CAP_SYS_NICE=eip' myapp
(just set a whole range of caps, to try to get the same behavior as with sudo). But unfortunately I'm not getting the advanced traces as withsudo
.Does anyone has ever tried it and could help me, which capabilities I need to set to get the same behavior as with
sudo
?The text was updated successfully, but these errors were encountered: