Merge pull request #20 from serghey-rodin/master

update from official vesta
This commit is contained in:
myvesta 2018-10-18 12:04:37 +02:00 committed by GitHub
commit c04eda5e09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 122 additions and 71 deletions

View file

@ -35,6 +35,11 @@ if [ ! -z "$src_file" ]; then
echo "Error: invalid source path $src_file" echo "Error: invalid source path $src_file"
exit 2 exit 2
fi fi
spath=$(echo "$rpath" |egrep "/etc|/var/lib")
if [ -z "$spath" ]; then
echo "Error: invalid source path $src_file"
exit 2
fi
fi fi
# Reading conf # Reading conf

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -4,5 +4,5 @@ Defaults:admin !syslog
Defaults:admin !requiretty Defaults:admin !requiretty
Defaults:root !requiretty Defaults:root !requiretty
admin ALL=(ALL) ALL # sudo is limited to vesta scripts
admin ALL=NOPASSWD:/usr/local/vesta/bin/* admin ALL=NOPASSWD:/usr/local/vesta/bin/*

View file

@ -1008,8 +1008,9 @@ if [ "$mysql" = 'yes' ]; then
fi fi
# Securing MySQL installation # Securing MySQL installation
mysqladmin -u root password $vpass mpass=$(gen_pass)
echo -e "[client]\npassword='$vpass'\n" > /root/.my.cnf mysqladmin -u root password $mpass
echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
chmod 600 /root/.my.cnf chmod 600 /root/.my.cnf
mysql -e "DELETE FROM mysql.user WHERE User=''" mysql -e "DELETE FROM mysql.user WHERE User=''"
mysql -e "DROP DATABASE test" >/dev/null 2>&1 mysql -e "DROP DATABASE test" >/dev/null 2>&1
@ -1031,9 +1032,10 @@ fi
#----------------------------------------------------------# #----------------------------------------------------------#
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
ppass=$(gen_pass)
if [ $release -eq 5 ]; then if [ $release -eq 5 ]; then
service postgresql start service postgresql start
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
service postgresql stop service postgresql stop
cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/ cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/
service postgresql start service postgresql start
@ -1041,7 +1043,7 @@ if [ "$postgresql" = 'yes' ]; then
service postgresql initdb service postgresql initdb
cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/ cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/
service postgresql start service postgresql start
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
fi fi
# Configuring phpPgAdmin # Configuring phpPgAdmin
if [ "$apache" = 'yes' ]; then if [ "$apache" = 'yes' ]; then
@ -1272,13 +1274,13 @@ fi
# Configuring MySQL host # Configuring MySQL host
if [ "$mysql" = 'yes' ]; then if [ "$mysql" = 'yes' ]; then
$VESTA/bin/v-add-database-host mysql localhost root $vpass $VESTA/bin/v-add-database-host mysql localhost root $mpass
$VESTA/bin/v-add-database admin default default $(gen_pass) mysql $VESTA/bin/v-add-database admin default default $(gen_pass) mysql
fi fi
# Configuring PostgreSQL host # Configuring PostgreSQL host
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
$VESTA/bin/v-add-database-host pgsql localhost postgres $vpass $VESTA/bin/v-add-database-host pgsql localhost postgres $ppass
$VESTA/bin/v-add-database admin db db $(gen_pass) pgsql $VESTA/bin/v-add-database admin db db $(gen_pass) pgsql
fi fi
@ -1332,9 +1334,6 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
# Vesta Access Info # # Vesta Access Info #
#----------------------------------------------------------# #----------------------------------------------------------#
# Sending install notification to vestacp.com
wget vestacp.com/notify/?$codename -O /dev/null -q
# Comparing hostname and IP # Comparing hostname and IP
host_ip=$(host $servername |head -n 1 |awk '{print $NF}') host_ip=$(host $servername |head -n 1 |awk '{print $NF}')
if [ "$host_ip" = "$ip" ]; then if [ "$host_ip" = "$ip" ]; then

View file

@ -985,8 +985,9 @@ if [ "$mysql" = 'yes' ]; then
check_result $? "mysql start failed" check_result $? "mysql start failed"
# Securing MySQL installation # Securing MySQL installation
mysqladmin -u root password $vpass mpass=$(gen_pass)
echo -e "[client]\npassword='$vpass'\n" > /root/.my.cnf mysqladmin -u root password $mpass
echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
chmod 600 /root/.my.cnf chmod 600 /root/.my.cnf
mysql -e "DELETE FROM mysql.user WHERE User=''" mysql -e "DELETE FROM mysql.user WHERE User=''"
mysql -e "DROP DATABASE test" >/dev/null 2>&1 mysql -e "DROP DATABASE test" >/dev/null 2>&1
@ -1008,9 +1009,10 @@ fi
#----------------------------------------------------------# #----------------------------------------------------------#
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
ppass=$(gen_pass)
wget $vestacp/postgresql/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf wget $vestacp/postgresql/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf
service postgresql restart service postgresql restart
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
# Configuring phpPgAdmin # Configuring phpPgAdmin
if [ "$apache" = 'yes' ]; then if [ "$apache" = 'yes' ]; then
@ -1298,13 +1300,13 @@ fi
# Configuring mysql host # Configuring mysql host
if [ "$mysql" = 'yes' ]; then if [ "$mysql" = 'yes' ]; then
$VESTA/bin/v-add-database-host mysql localhost root $vpass $VESTA/bin/v-add-database-host mysql localhost root $mpass
$VESTA/bin/v-add-database admin default default $(gen_pass) mysql $VESTA/bin/v-add-database admin default default $(gen_pass) mysql
fi fi
# Configuring pgsql host # Configuring pgsql host
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
$VESTA/bin/v-add-database-host pgsql localhost postgres $vpass $VESTA/bin/v-add-database-host pgsql localhost postgres $ppass
$VESTA/bin/v-add-database admin db db $(gen_pass) pgsql $VESTA/bin/v-add-database admin db db $(gen_pass) pgsql
fi fi
@ -1359,9 +1361,6 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
# Vesta Access Info # # Vesta Access Info #
#----------------------------------------------------------# #----------------------------------------------------------#
# Sending install notification to vestacp.com
wget vestacp.com/notify/?$codename -O /dev/null -q
# Comparing hostname and ip # Comparing hostname and ip
host_ip=$(host $servername| head -n 1 | awk '{print $NF}') host_ip=$(host $servername| head -n 1 | awk '{print $NF}')
if [ "$host_ip" = "$ip" ]; then if [ "$host_ip" = "$ip" ]; then

View file

@ -1024,8 +1024,9 @@ if [ "$mysql" = 'yes' ]; then
fi fi
# Securing MySQL installation # Securing MySQL installation
mysqladmin -u root password $vpass mpass=$(gen_pass)
echo -e "[client]\npassword='$vpass'\n" > /root/.my.cnf mysqladmin -u root password $mpass
echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
chmod 600 /root/.my.cnf chmod 600 /root/.my.cnf
mysql -e "DELETE FROM mysql.user WHERE User=''" mysql -e "DELETE FROM mysql.user WHERE User=''"
mysql -e "DROP DATABASE test" >/dev/null 2>&1 mysql -e "DROP DATABASE test" >/dev/null 2>&1
@ -1047,9 +1048,10 @@ fi
#----------------------------------------------------------# #----------------------------------------------------------#
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
ppass=$(gen_pass)
if [ $release -eq 5 ]; then if [ $release -eq 5 ]; then
service postgresql start service postgresql start
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
service postgresql stop service postgresql stop
cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/ cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/
service postgresql start service postgresql start
@ -1057,7 +1059,7 @@ if [ "$postgresql" = 'yes' ]; then
service postgresql initdb service postgresql initdb
cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/ cp -f $vestacp/postgresql/pg_hba.conf /var/lib/pgsql/data/
service postgresql start service postgresql start
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
fi fi
# Configuring phpPgAdmin # Configuring phpPgAdmin
if [ "$apache" = 'yes' ]; then if [ "$apache" = 'yes' ]; then
@ -1289,13 +1291,13 @@ fi
# Configuring MySQL/MariaDB host # Configuring MySQL/MariaDB host
if [ "$mysql" = 'yes' ]; then if [ "$mysql" = 'yes' ]; then
$VESTA/bin/v-add-database-host mysql localhost root $vpass $VESTA/bin/v-add-database-host mysql localhost root $mpass
$VESTA/bin/v-add-database admin default default $(gen_pass) mysql $VESTA/bin/v-add-database admin default default $(gen_pass) mysql
fi fi
# Configuring PostgreSQL host # Configuring PostgreSQL host
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
$VESTA/bin/v-add-database-host pgsql localhost postgres $vpass $VESTA/bin/v-add-database-host pgsql localhost postgres $ppass
$VESTA/bin/v-add-database admin db db $(gen_pass) pgsql $VESTA/bin/v-add-database admin db db $(gen_pass) pgsql
fi fi
@ -1349,9 +1351,6 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
# Vesta Access Info # # Vesta Access Info #
#----------------------------------------------------------# #----------------------------------------------------------#
# Sending install notification to vestacp.com
wget vestacp.com/notify/?$codename -O /dev/null -q
# Comparing hostname and IP # Comparing hostname and IP
host_ip=$(host $servername |head -n 1 |awk '{print $NF}') host_ip=$(host $servername |head -n 1 |awk '{print $NF}')
if [ "$host_ip" = "$ip" ]; then if [ "$host_ip" = "$ip" ]; then

View file

@ -977,8 +977,9 @@ if [ "$mysql" = 'yes' ]; then
check_result $? "mysql start failed" check_result $? "mysql start failed"
# Securing MySQL/MariaDB installation # Securing MySQL/MariaDB installation
mysqladmin -u root password $vpass mpass=$(gen_pass)
echo -e "[client]\npassword='$vpass'\n" > /root/.my.cnf mysqladmin -u root password $mpass
echo -e "[client]\npassword='$mpass'\n" > /root/.my.cnf
chmod 600 /root/.my.cnf chmod 600 /root/.my.cnf
mysql -e "DELETE FROM mysql.user WHERE User=''" mysql -e "DELETE FROM mysql.user WHERE User=''"
mysql -e "DROP DATABASE test" >/dev/null 2>&1 mysql -e "DROP DATABASE test" >/dev/null 2>&1
@ -1000,9 +1001,10 @@ fi
#----------------------------------------------------------# #----------------------------------------------------------#
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
ppass=$(gen_pass)
cp -f $vestacp/postgresql/pg_hba.conf /etc/postgresql/*/main/ cp -f $vestacp/postgresql/pg_hba.conf /etc/postgresql/*/main/
service postgresql restart service postgresql restart
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$vpass'" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
# Configuring phpPgAdmin # Configuring phpPgAdmin
if [ "$apache" = 'yes' ]; then if [ "$apache" = 'yes' ]; then
@ -1235,13 +1237,13 @@ fi
# Configuring MySQL/MariaDB host # Configuring MySQL/MariaDB host
if [ "$mysql" = 'yes' ]; then if [ "$mysql" = 'yes' ]; then
$VESTA/bin/v-add-database-host mysql localhost root $vpass $VESTA/bin/v-add-database-host mysql localhost root $mpass
$VESTA/bin/v-add-database admin default default $(gen_pass) mysql $VESTA/bin/v-add-database admin default default $(gen_pass) mysql
fi fi
# Configuring PostgreSQL host # Configuring PostgreSQL host
if [ "$postgresql" = 'yes' ]; then if [ "$postgresql" = 'yes' ]; then
$VESTA/bin/v-add-database-host pgsql localhost postgres $vpass $VESTA/bin/v-add-database-host pgsql localhost postgres $ppass
$VESTA/bin/v-add-database admin db db $(gen_pass) pgsql $VESTA/bin/v-add-database admin db db $(gen_pass) pgsql
fi fi
@ -1295,9 +1297,6 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
# Vesta Access Info # # Vesta Access Info #
#----------------------------------------------------------# #----------------------------------------------------------#
# Sending install notification to vestacp.com
wget vestacp.com/notify/?$codename -O /dev/null -q
# Comparing hostname and IP # Comparing hostname and IP
host_ip=$(host $servername| head -n 1 |awk '{print $NF}') host_ip=$(host $servername| head -n 1 |awk '{print $NF}')
if [ "$host_ip" = "$ip" ]; then if [ "$host_ip" = "$ip" ]; then

View file

@ -1,7 +1,7 @@
Source: vesta-ioncube Source: vesta-ioncube
Package: vesta-ioncube Package: vesta-ioncube
Priority: optional Priority: optional
Version: 0.9.8-22 Version: 0.9.8-23
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: https://www.ioncube.com Homepage: https://www.ioncube.com

View file

@ -1,7 +1,7 @@
Source: vesta-nginx Source: vesta-nginx
Package: vesta-nginx Package: vesta-nginx
Priority: optional Priority: optional
Version: 0.9.8-22 Version: 0.9.8-23
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: http://vestacp.com Homepage: http://vestacp.com

View file

@ -1,7 +1,7 @@
Source: vesta-php Source: vesta-php
Package: vesta-php Package: vesta-php
Priority: optional Priority: optional
Version: 0.9.8-22 Version: 0.9.8-23
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: http://vestacp.com Homepage: http://vestacp.com

View file

@ -1,7 +1,7 @@
Source: vesta-softaculous Source: vesta-softaculous
Package: vesta-softaculous Package: vesta-softaculous
Priority: optional Priority: optional
Version: 0.9.8-22 Version: 0.9.8-23
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: https://www.softaculous.com Homepage: https://www.softaculous.com

View file

@ -1,7 +1,7 @@
Source: vesta Source: vesta
Package: vesta Package: vesta
Priority: optional Priority: optional
Version: 0.9.8-22 Version: 0.9.8-23
Section: admin Section: admin
Maintainer: Serghey Rodin <skid@vestacp.com> Maintainer: Serghey Rodin <skid@vestacp.com>
Homepage: http://vestacp.com Homepage: http://vestacp.com

View file

@ -28,4 +28,12 @@ if [ -x /usr/local/vesta/upd/fix_roundcube.sh ]; then
/usr/local/vesta/upd/fix_roundcube.sh /usr/local/vesta/upd/fix_roundcube.sh
fi fi
if [ -x /usr/local/vesta/upd/limit_sudo.sh ]; then
/usr/local/vesta/upd/limit_sudo.sh
fi
if [ -x /usr/local/vesta/upd/fix_dhcprenew.sh ]; then
/usr/local/vesta/upd/fix_dhcprenew.sh
fi
exit 0 exit 0

View file

@ -1,6 +1,6 @@
Name: vesta-ioncube Name: vesta-ioncube
Version: 0.9.8 Version: 0.9.8
Release: 22 Release: 23
Summary: ionCube Loader Summary: ionCube Loader
Group: System Environment/Base Group: System Environment/Base
License: "Freely redistributable without restriction" License: "Freely redistributable without restriction"

View file

@ -1,6 +1,6 @@
Name: vesta-nginx Name: vesta-nginx
Version: 0.9.8 Version: 0.9.8
Release: 22 Release: 23
Summary: Vesta Control Panel Summary: Vesta Control Panel
Group: System Environment/Base Group: System Environment/Base
License: BSD-like License: BSD-like

View file

@ -1,6 +1,6 @@
Name: vesta-php Name: vesta-php
Version: 0.9.8 Version: 0.9.8
Release: 22 Release: 23
Summary: Vesta Control Panel Summary: Vesta Control Panel
Group: System Environment/Base Group: System Environment/Base
License: GPL License: GPL

View file

@ -1,6 +1,6 @@
Name: vesta-softaculous Name: vesta-softaculous
Version: 0.9.8 Version: 0.9.8
Release: 22 Release: 23
Summary: Vesta Control Panel Summary: Vesta Control Panel
Group: System Environment/Base Group: System Environment/Base
License: Softaculous License License: Softaculous License

View file

@ -1,6 +1,6 @@
Name: vesta Name: vesta
Version: 0.9.8 Version: 0.9.8
Release: 22 Release: 23
Summary: Vesta Control Panel Summary: Vesta Control Panel
Group: System Environment/Base Group: System Environment/Base
License: GPL License: GPL
@ -45,6 +45,15 @@ if [ $1 -ge 2 ]; then
if [ -x /usr/local/vesta/upd/fix_roundcube.sh ]; then if [ -x /usr/local/vesta/upd/fix_roundcube.sh ]; then
/usr/local/vesta/upd/fix_roundcube.sh /usr/local/vesta/upd/fix_roundcube.sh
fi fi
if [ -x /usr/local/vesta/upd/limit_sudo.sh ]; then
/usr/local/vesta/upd/limit_sudo.sh
fi
if [ -x /usr/local/vesta/upd/fix_dhcprenew.sh ]; then
/usr/local/vesta/upd/fix_dhcprenew.sh
fi
fi fi
%files %files
%{_vestadir} %{_vestadir}
@ -59,6 +68,12 @@ fi
%config(noreplace) %{_vestadir}/web/css/uploadify.css %config(noreplace) %{_vestadir}/web/css/uploadify.css
%changelog %changelog
* Thu Oct 18 2018 Serghey Rodin <builder@vestacp.com> - 0.9.8-23
- Security fixes
* Wed Jun 27 2018 Serghey Rodin <builder@vestacp.com> - 0.9.8-22
- Security fixes
* Fri May 11 2018 Serghey Rodin <builder@vestacp.com> - 0.9.8-21 * Fri May 11 2018 Serghey Rodin <builder@vestacp.com> - 0.9.8-21
- Additional security fixes - Additional security fixes

View file

@ -5,5 +5,5 @@ rm -f /usr/local/vesta/data/users/admin/notifications.conf
/usr/local/vesta/bin/v-add-user-notification admin "File Manager" "Browse, copy, edit, view, and retrieve all your web domain files using a fully featured <a href='http://vestacp.com/features/#filemanager'>File Manager</a>. Plugin is available for <a href='/edit/server/?lead=filemanager#module-filemanager'>purchase</a>." 'filemanager' /usr/local/vesta/bin/v-add-user-notification admin "File Manager" "Browse, copy, edit, view, and retrieve all your web domain files using a fully featured <a href='http://vestacp.com/features/#filemanager'>File Manager</a>. Plugin is available for <a href='/edit/server/?lead=filemanager#module-filemanager'>purchase</a>." 'filemanager'
/usr/local/vesta/bin/v-add-user-notification admin "Chroot SFTP" "If you want to have SFTP accounts that will be used only to transfer files (and not to SSH), you can <a href='/edit/server/?lead=sftp#module-sftp'>purchase</a> and enable <a href='http://vestacp.com/features/#sftpchroot'>SFTP Chroot</a>" /usr/local/vesta/bin/v-add-user-notification admin "Chroot SFTP" "If you want to have SFTP accounts that will be used only to transfer files (and not to SSH), you can <a href='/edit/server/?lead=sftp#module-sftp'>purchase</a> and enable <a href='http://vestacp.com/features/#sftpchroot'>SFTP Chroot</a>"
/usr/local/vesta/bin/v-add-user-notification admin "Softaculous" "Softaculous is one of the best Auto Installers and it is finally <a href='/edit/server/?lead=sftp#module-softaculous'>available</a>" /usr/local/vesta/bin/v-add-user-notification admin "Softaculous" "Softaculous is one of the best Auto Installers and it is finally <a href='/edit/server/?lead=sftp#module-softaculous'>available</a>"
/usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-19" "We've made 1478 commits, fixed 29 bugs and merged 141 pull request. As always for more information please read <a href='http://vestacp.com/roadmap/#0.9.8-18'>release notes</a>" /usr/local/vesta/bin/v-add-user-notification admin "Release 0.9.8-23" "We've made 1478 commits, fixed 29 bugs and merged 141 pull request. As always for more information please read <a href='http://vestacp.com/roadmap/#0.9.8-23'>release notes</a>"

20
upd/fix_dhcprenew.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
if [ -e "/usr/bin/dhcprenew" ]; then
mv /usr/bin/dhcprenew /usr/bin/dhcprenew.disabled
# Notify admin via control panel
rm /usr/local/vesta/data/users/admin/notifications.conf
touch /usr/local/vesta/data/users/admin/notifications.conf
/usr/local/vesta/bin/v-add-user-notification admin \
"Security Check" "Your server was compromised please contact us at info@vestacp.com to get help."
# Send email notification
send_mail="/usr/local/vesta/web/inc/mail-wrapper.php"
email=$(grep CONTACT /usr/local/vesta/data/users/admin/user.conf |cut -f2 -d \')
if [ ! -z "$email" ]; then
echo "Your server $(hostname) was compromised please contact us at info@vestacp.com to get help." |\
$send_mail -s "SECURITY CHECK: Vesta Control Panel" $email
fi
fi

6
upd/limit_sudo.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
if [ -e "/etc/sudoers.d/admin" ]; then
sed -i "s/admin.*ALL=(ALL).*/# sudo is limited to vesta scripts/" \
/etc/sudoers.d/admin
fi

View file

@ -193,11 +193,11 @@ $LANG['es'] = array(
'Mail Accounts' => 'Cuentas de Correo', 'Mail Accounts' => 'Cuentas de Correo',
'Cron Jobs' => 'Tareas Programadas', 'Cron Jobs' => 'Tareas Programadas',
'SSH Access' => 'Acceso SSH', 'SSH Access' => 'Acceso SSH',
'IP Address' => 'IP Address', 'IP Address' => 'Dirección IP',
'IP Addresses' => 'Dirección IP', 'IP Addresses' => 'Direcciones IP',
'Backups' => 'Respaldos', 'Backups' => 'Respaldos',
'Backup System' => 'Sistema de Respaldo', 'Backup System' => 'Sistema de Respaldo',
'backup exclusions' => 'respaldos excluídos', 'backup exclusions' => 'configurar exlusiones',
'template' => 'plantilla', 'template' => 'plantilla',
'SSL Support' => 'Soportar SSL', 'SSL Support' => 'Soportar SSL',
'SSL Home Directory' => 'Directorio local del SSL', 'SSL Home Directory' => 'Directorio local del SSL',
@ -248,8 +248,8 @@ $LANG['es'] = array(
'SYS' => 'SYS', 'SYS' => 'SYS',
'Domains' => 'Dominios', 'Domains' => 'Dominios',
'Status' => 'Estado', 'Status' => 'Estado',
'shared' => 'compartido', 'shared' => 'compartida',
'dedicated' => 'dedicado', 'dedicated' => 'dedicada',
'Owner' => 'Dueño', 'Owner' => 'Dueño',
'Users' => 'Usuarios', 'Users' => 'Usuarios',
'Load Average' => 'Promedio de carga', 'Load Average' => 'Promedio de carga',
@ -332,7 +332,7 @@ $LANG['es'] = array(
'Package Name' => 'Nombre del Plan', 'Package Name' => 'Nombre del Plan',
'Netmask' => 'Máscara de Red', 'Netmask' => 'Máscara de Red',
'Interface' => 'Interfaz', 'Interface' => 'Interfaz',
'Shared' => 'Compartido', 'Shared' => 'Compartida',
'Assigned user' => 'Usuario asignado', 'Assigned user' => 'Usuario asignado',
'Assigned domain' => 'Dominio asignado', 'Assigned domain' => 'Dominio asignado',
'NAT IP association' => 'Asociación NAT IP', 'NAT IP association' => 'Asociación NAT IP',
@ -762,4 +762,5 @@ $LANG['es'] = array(
'maximum characters length, including prefix' => 'usar un máximo de %s caracteres, incluyendo prefijo', 'maximum characters length, including prefix' => 'usar un máximo de %s caracteres, incluyendo prefijo',
'Email Credentials' => 'Email Credentials', 'Email Credentials' => 'Email Credentials',
); );

View file

@ -48,7 +48,7 @@ if ((!empty($_POST['user'])) && (!empty($_POST['code'])) && (!empty($_POST['pass
if ( $return_var == 0 ) { if ( $return_var == 0 ) {
$data = json_decode(implode('', $output), true); $data = json_decode(implode('', $output), true);
$rkey = $data[$user]['RKEY']; $rkey = $data[$user]['RKEY'];
if ($rkey == $_POST['code']) { if (hash_equals($rkey, $_POST['code'])) {
$v_password = tempnam("/tmp","vst"); $v_password = tempnam("/tmp","vst");
$fp = fopen($v_password, "w"); $fp = fopen($v_password, "w");
fwrite($fp, $_POST['password']."\n"); fwrite($fp, $_POST['password']."\n");