From 2d7c5a2ed4e985c76dd6c08aac8d1d3b0a59930b Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Thu, 18 Feb 2016 15:19:10 +0000 Subject: [PATCH] Stop setuid on htop and alias to `sudo htop` instead. --- .bashrc | 2 +- bin/software-install.sh | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.bashrc b/.bashrc index ab8439b..865bcd8 100644 --- a/.bashrc +++ b/.bashrc @@ -98,7 +98,7 @@ export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a" # Command aliases #-------------------------------------------------------------------------------- alias ll='ls -l' -[[ -x $(which htop 2>/dev/null) ]] && alias top='htop' +[[ -x $(which htop 2>/dev/null) ]] && alias top='sudo htop' #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- diff --git a/bin/software-install.sh b/bin/software-install.sh index 4014f70..e2d77c7 100755 --- a/bin/software-install.sh +++ b/bin/software-install.sh @@ -78,14 +78,6 @@ function install_osx_software { EOF #------------------------------- - #------------------------------- - # Some tools require root set-UID - #------------------------------- - xargs -n1 -I % bash -c 'find $(dirname $(greadlink -f $(which %))) -name $(basename $(which %)) -type f ! \( -perm -u+s -a -user root \) ' <<-EOF | xargs -n 1 -I % sudo bash -c 'chown root: % && chmod u+s %' - htop - EOF - #------------------------------- - #------------------------------- # Clean up #-------------------------------