Skip to content
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

New elevate system #493

Merged
merged 5 commits into from
Jul 21, 2023
Merged

New elevate system #493

merged 5 commits into from
Jul 21, 2023

Conversation

lievenhey
Copy link
Contributor

@lievenhey lievenhey commented Jun 30, 2023

I updated the original pr by @zeno-endemann-kdab but I can't edit the original, so I had to recreate it.

Copy link
Member

@milianw milianw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some small nits, mostly around error handling, otherwise this lgtm and can go in then

src/perfcontrolfifowrapper.cpp Outdated Show resolved Hide resolved
src/perfcontrolfifowrapper.cpp Outdated Show resolved Hide resolved
src/perfcontrolfifowrapper.cpp Outdated Show resolved Hide resolved
src/perfcontrolfifowrapper.cpp Outdated Show resolved Hide resolved
src/perfcontrolfifowrapper.cpp Outdated Show resolved Hide resolved
src/initiallystoppedprocess.cpp Outdated Show resolved Hide resolved
src/initiallystoppedprocess.cpp Outdated Show resolved Hide resolved
src/initiallystoppedprocess.cpp Outdated Show resolved Hide resolved
src/perfcontrolfifowrapper.h Show resolved Hide resolved
src/perfrecord.cpp Outdated Show resolved Hide resolved
zeno-endemann-kdab and others added 5 commits July 21, 2023 14:37
For running perf with pkexec we need to get the full path to the binary,
so handle this consistently. This has the nice side effect of showing
clearly which perf binary is being used in the output console.
The new previlige handling will call perf directly without a helper, so
KAuth does not make sense for that anymore.
Instead of using a script that changes system configuration
temporarily, just run perf as root.

To properly synchronize with a launched app (that itself should not
run as root), launch the app in a separate, initially stopped process,
and use the control fifo feature of perf to properly synchronize with
it.

The control fifos are also needed to be able to stop sudo-perf, as one
does not have permission to SIGINT it anymore.
The new elevation system is not prone to the security issues of
the old system, as such we no longer need to have users opt-in
to this functionality anymore.
We now always use pkexec, so we shouldn't even mention kdesu/kdesudo
anywhere.
@milianw milianw merged commit 867fff9 into master Jul 21, 2023
19 checks passed
@milianw milianw deleted the new-elevate-system branch July 21, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants