POL_Test_ptrace
Informations
Creator | Message |
---|---|
petch
|
InformationThis installer has been approved by the team. InformationsPlatforms: Feedbacks0 0 DescriptionCheck whether wineserver process is able to use ptrace().
Source code#!/bin/bash # Check Kernel ptrace # Without Yama patch, we assume ptrace is allowed from anywhere if [ -e /proc/sys/kernel/yama/ptrace_scope ]; then NEED_WINESERVER_RESTART='' while true; do [ "$(cat /proc/sys/kernel/yama/ptrace_scope)" = 0 ] && break if setcap -q -v cap_sys_ptrace=ep "$(which wineserver)"; then [ -n "$NEED_WINESERVER_RESTART" ] && wineserver -k break fi NEED_WINESERVER_RESTART=1 POL_SetupWindow_Init POL_SetupWindow_menu_num "$(eval_gettext 'The program needs access to ptrace() to proceed:')" "$TITLE" "$(eval_gettext 'Give the capability to wineserver executable')~$(eval_gettext 'Enable ptrace() globally')~$(eval_gettext 'I fixed it myself, just retest')~$(eval_gettext 'Abort installation')" "~" case "$APP_ANSWER" in 0) POL_Call POL_Function_RootCommand 'sudo setcap cap_sys_ptrace=ep "'"$(which wineserver)"'"' ;; 1) POL_Call POL_Function_RootCommand 'echo 0|sudo tee "/proc/sys/kernel/yama/ptrace_scope"' ;; 2) ;; *) NOBUGREPORT="TRUE" POL_Debug_Fatal "$(eval_gettext 'User abort')" ;; esac done fi POL_SetupWindow_Close exit 0 |
Contributions
Filters:
ContributeMember | Message |
This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com