mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
apparmor rules for bind9
This commit is contained in:
parent
7d08a3a614
commit
6eca748bce
2 changed files with 12 additions and 8 deletions
|
@ -606,9 +606,6 @@ rm -f /usr/sbin/policy-rc.d
|
||||||
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
|
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
|
||||||
service ssh restart
|
service ssh restart
|
||||||
|
|
||||||
# AppArmor
|
|
||||||
#aa-complain /usr/sbin/named
|
|
||||||
|
|
||||||
# Disable awstats cron
|
# Disable awstats cron
|
||||||
rm -f /etc/cron.d/awstats
|
rm -f /etc/cron.d/awstats
|
||||||
|
|
||||||
|
@ -965,6 +962,12 @@ if [ "$named" = 'yes' ]; then
|
||||||
sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
|
sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
|
||||||
chown root:bind /etc/bind/named.conf
|
chown root:bind /etc/bind/named.conf
|
||||||
chmod 640 /etc/bind/named.conf
|
chmod 640 /etc/bind/named.conf
|
||||||
|
aa-complain /usr/sbin/named 2>/dev/null
|
||||||
|
echo "/home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named 2>/dev/null
|
||||||
|
service apparmor status >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
service apparmor restart
|
||||||
|
fi
|
||||||
update-rc.d bind9 defaults
|
update-rc.d bind9 defaults
|
||||||
service bind9 start
|
service bind9 start
|
||||||
check_result $? "bind9 start failed"
|
check_result $? "bind9 start failed"
|
||||||
|
|
|
@ -595,9 +595,6 @@ rm -f /usr/sbin/policy-rc.d
|
||||||
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
|
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
|
||||||
service ssh restart
|
service ssh restart
|
||||||
|
|
||||||
# AppArmor
|
|
||||||
#aa-complain /usr/sbin/named
|
|
||||||
|
|
||||||
# Disable awstats cron
|
# Disable awstats cron
|
||||||
rm -f /etc/cron.d/awstats
|
rm -f /etc/cron.d/awstats
|
||||||
|
|
||||||
|
@ -627,8 +624,6 @@ chmod 755 /usr/bin/rssh
|
||||||
# Configure VESTA #
|
# Configure VESTA #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# AppArmor
|
|
||||||
aa-complain /usr/sbin/named 2>/dev/null
|
|
||||||
|
|
||||||
# Downlading sudo configuration
|
# Downlading sudo configuration
|
||||||
mkdir -p /etc/sudoers.d
|
mkdir -p /etc/sudoers.d
|
||||||
|
@ -957,6 +952,12 @@ if [ "$named" = 'yes' ]; then
|
||||||
sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
|
sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
|
||||||
chown root:bind /etc/bind/named.conf
|
chown root:bind /etc/bind/named.conf
|
||||||
chmod 640 /etc/bind/named.conf
|
chmod 640 /etc/bind/named.conf
|
||||||
|
aa-complain /usr/sbin/named 2>/dev/null
|
||||||
|
echo "/home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named 2>/dev/null
|
||||||
|
service apparmor status >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
service apparmor restart
|
||||||
|
fi
|
||||||
update-rc.d bind9 defaults
|
update-rc.d bind9 defaults
|
||||||
service bind9 start
|
service bind9 start
|
||||||
check_result $? "bind9 start failed"
|
check_result $? "bind9 start failed"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue