Set sticky bits
This commit is contained in:
parent
3f58fc17d2
commit
5c79c584fc
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue