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 elevated privilege system #484

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ find_package(
)

find_package(KF5Archive 5.85.0 CONFIG)
find_package(KF5Auth CONFIG)
find_package(KF5SyntaxHighlighting CONFIG)
find_package(KDDockWidgets CONFIG)
set_package_properties(
Expand Down Expand Up @@ -145,7 +144,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

add_subdirectory(3rdparty)
add_subdirectory(scripts)

include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(src)
Expand Down
2 changes: 0 additions & 2 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ As of now, you will need the following dependencies to build this project:
- iconthemes
- parts
- archive (optional)
- kauth (optional)
- [KDDockWidgets](https://github.com/KDAB/KDDockWidgets)
- this library is not yet packaged on most distributions, you'll have to compile it yourself from source

Expand Down Expand Up @@ -124,7 +123,6 @@ make
# or `make install` it and launch it from your $PATH
```

If you want to use KAuth, you need to add `-DCMAKE_INSTALL_PREFIX=/usr/` to the cmake call. Otherwise KAuth won't work.
If you need help building this project for your platform, [contact us for help](https://www.kdab.com/about/contact/).

## Debugging the AppImage
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,7 @@ Consider tweaking /proc/sys/kernel/perf_event_paranoid:
2 - Disallow kernel profiling for unpriv
```

To workaround this limitation, hotspot can temporarily elevate the perf privileges.
This is achieved by applying
[these steps](https://superuser.com/questions/980632/run-perf-without-root-right),
bundled into [a script](scripts/elevate_perf_privileges.sh) that is run via `pkexec`, `kdesudo` or `kdesu`.
The resulting elevated privileges are also required for kernel tracing in general and Off-CPU profiling in
particular.
To workaround this limitation, hotspot can run perf itself with elevated privileges.

### Export File Format

Expand Down
2 changes: 0 additions & 2 deletions hotspot-config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

#cmakedefine01 Zstd_FOUND

#cmakedefine01 KF5Auth_FOUND

#cmakedefine01 KF5Archive_FOUND

#cmakedefine01 QCustomPlot_FOUND
Expand Down
8 changes: 0 additions & 8 deletions scripts/CMakeLists.txt

This file was deleted.

65 changes: 0 additions & 65 deletions scripts/elevate_perf_privileges.sh

This file was deleted.

16 changes: 1 addition & 15 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ set(HOTSPOT_SRCS
perfoutputwidgettext.cpp
perfoutputwidgetkonsole.cpp
costcontextmenu.cpp
elevateprivilegeshelper.cpp
# ui files:
mainwindow.ui
aboutdialog.ui
Expand Down Expand Up @@ -132,18 +133,3 @@ install(
FILES hotspot.notifyrc
DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR}
)

if(KF5Auth_FOUND)
target_link_libraries(hotspot KF5::AuthCore)

add_executable(hotspot-auth-helper authhelper.cpp)
target_link_libraries(hotspot-auth-helper KF5::AuthCore)

option(INSTALL_KAUTH_HELPER "Install the KAuth helper, disable when you install to a custom prefix" ON)
if(INSTALL_KAUTH_HELPER)
install(TARGETS hotspot-auth-helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})

kauth_install_helper_files(hotspot-auth-helper com.kdab.hotspot.perf root)
kauth_install_actions(com.kdab.hotspot.perf hotspot-perf-authhelper.actions)
endif()
endif()
91 changes: 0 additions & 91 deletions src/authhelper.cpp

This file was deleted.

Loading