+cp_check_and_sed ';[[:space:]]*security = user' \
+ 's/;[[:space:]]*security = user/ security = user/g' \
+ /etc/samba/smb.conf || true
+
+cp_get_netaddr || true
+net="$RET"
+if ! grep -q '^[[:space:]]*hosts allow' /etc/samba/smb.conf; then
+ echo " hosts allow = $net 127.0.0.1" >> /etc/samba/smb.conf
+fi
+if ! grep -q '^[[:space:]]*hosts deny' /etc/samba/smb.conf; then
+ echo " hosts deny = ALL" >> /etc/samba/smb.conf
+fi
+