Set sticky bits
This commit is contained in:
parent
3f58fc17d2
commit
5c79c584fc
|
@ -416,6 +416,14 @@ function remove_serial_logins {
|
||||||
fi
|
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 {
|
function lockdown_permissions {
|
||||||
if [ -d /bin ]; then
|
if [ -d /bin ]; then
|
||||||
chown root:root /bin/*
|
chown root:root /bin/*
|
||||||
|
@ -466,6 +474,8 @@ function lockdown_permissions {
|
||||||
if [ -f /usr/sbin/exim4 ]; then
|
if [ -f /usr/sbin/exim4 ]; then
|
||||||
chmod u+s /usr/sbin/exim4
|
chmod u+s /usr/sbin/exim4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set_sticky_bits
|
||||||
}
|
}
|
||||||
|
|
||||||
function disable_core_dumps {
|
function disable_core_dumps {
|
||||||
|
|
Loading…
Reference in New Issue