Skip to content

Commit

Permalink
Add ptrace_scope check to dependency checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewd18 committed Sep 30, 2013
1 parent 18ecec0 commit 9cf3a8c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions df-lnp-installer.sh
Expand Up @@ -223,6 +223,14 @@ check_install_dir_is_empty () {
fi
}

check_ptrace_protection () {
local PTRACE_PROTECTION="$(cat /proc/sys/kernel/yama/ptrace_scope)"

if [ "$PTRACE_PROTECTION" = "1" ]; then
exit_with_error "Your kernel has ptrace protection enabled. DwarfTherapist will not operate properly. Either run 'echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope' or use --skip-deps to override."
fi
}

checksum_all () {
# Check for file validity.
sha1sum -c sha1sums
Expand Down Expand Up @@ -881,6 +889,7 @@ fi

if [ "$SKIP_DEPS" = "0" ]; then
check_dependencies
check_ptrace_protection
fi

ask_for_preferred_install_dir
Expand Down

0 comments on commit 9cf3a8c

Please sign in to comment.