Set sticky bits

This commit is contained in:
Bob Mottram 2016-11-30 13:40:17 +00:00
parent 3f58fc17d2
commit 5c79c584fc
1 changed files with 10 additions and 0 deletions

View File

@ -416,6 +416,14 @@ function remove_serial_logins {
fi
}
function set_sticky_bits {
world_writable=$(find / -xdev -type d -perm -002 \! -perm -1000)
for w in $world_writable; do
echo "Setting sticky bit on $w"
chmod +t $w
done
}
function lockdown_permissions {
if [ -d /bin ]; then
chown root:root /bin/*
@ -466,6 +474,8 @@ function lockdown_permissions {
if [ -f /usr/sbin/exim4 ]; then
chmod u+s /usr/sbin/exim4
fi
set_sticky_bits
}
function disable_core_dumps {