[fix] Cleans up the removal of du.pl

This commit is contained in:
alban 2017-10-08 09:15:37 +02:00
parent e6377f0b98
commit f6db9e263a
4 changed files with 4 additions and 8 deletions

View File

@ -1,9 +1,7 @@
alternc-slave: setuid-binary usr/lib/alternc/du.pl 4750 root/www-data
alternc-slave: setuid-binary usr/lib/alternc/mem_add 4750 root/www-data
alternc-slave: setuid-binary usr/lib/alternc/mem_del 4750 root/www-data
alternc-slave: setuid-binary usr/lib/alternc/quota_edit 4750 root/www-data
alternc-slave: setuid-binary usr/lib/alternc/quota_get 4750 root/www-data
alternc-slave: executable-is-not-world-readable usr/lib/alternc/du.pl 4750
alternc-slave: executable-is-not-world-readable usr/lib/alternc/fixperms.sh 0750 != 0755
alternc-slave: executable-is-not-world-readable usr/lib/alternc/mem_add 4750
alternc-slave: executable-is-not-world-readable usr/lib/alternc/mem_del 4750

View File

@ -6,7 +6,6 @@ alternc: setuid-binary usr/lib/alternc/quota_get 4750 root/www-data
alternc: setuid-binary usr/lib/alternc/mem_add 4750 root/www-data
alternc: setuid-binary usr/lib/alternc/mem_del 4750 root/www-data
alternc: setuid-binary usr/lib/alternc/db_create 4750 root/www-data
alternc: setuid-binary usr/lib/alternc/du.pl 4750 root/www-data
alternc: non-standard-executable-perm usr/lib/alternc/quota_edit.sh 0750 != 0755
alternc: non-standard-executable-perm usr/lib/alternc/quota_get.sh 0750 != 0755
alternc: non-standard-executable-perm usr/lib/alternc/sqlbackup.sh 0750 != 0755
@ -36,7 +35,6 @@ alternc: executable-is-not-world-readable usr/lib/alternc/slave_dns 0750 != 0755
alternc: executable-is-not-world-readable usr/lib/alternc/update_domains.sh 0750 != 0755
alternc: executable-is-not-world-readable usr/lib/alternc/functions_hosting.sh 0750 != 0755
alternc: executable-is-not-world-readable usr/lib/alternc/functions_dns.sh 0750 != 0755
alternc: executable-is-not-world-readable usr/lib/alternc/du.pl 4750
alternc: executable-is-not-world-readable usr/lib/alternc/quota_init 0750 != 0755
alternc: executable-is-not-world-readable usr/lib/alternc/spoolsize.php 0750 != 0755
alternc: executable-is-not-world-readable usr/lib/alternc/rawstat.daily 0750 != 0755

View File

@ -1,2 +1,2 @@
alterncpanel ALL = NOPASSWD : /usr/bin/quota, /usr/sbin/setquota, /usr/lib/alternc/fixperms.sh, /usr/lib/alternc/mem_add, /usr/lib/alternc/mem_del, /usr/lib/alternc/quota_edit, /usr/lib/alternc/quota_get, /usr/lib/alternc/du.pl, /usr/lib/alternc/update_mails.sh, /usr/sbin/repquota
alterncpanel ALL = NOPASSWD : /usr/bin/quota, /usr/sbin/setquota, /usr/lib/alternc/fixperms.sh, /usr/lib/alternc/mem_add, /usr/lib/alternc/mem_del, /usr/lib/alternc/quota_edit, /usr/lib/alternc/quota_get, /usr/bin/du, /usr/lib/alternc/update_mails.sh, /usr/sbin/repquota
vmail ALL = NOPASSWD : /usr/lib/dovecot/deliver

View File

@ -58,9 +58,9 @@ if ($db->query("SELECT uid, name FROM mailman;")) {
}
foreach ($cc as $c){
echo $c["uid"]."/".$c["name"]; flush();
$size1=exec("sudo /usr/lib/alternc/du.pl ".escapeshellarg("/var/lib/mailman/lists/".$c["name"]));
$size2=exec("sudo /usr/lib/alternc/du.pl ".escapeshellarg("/var/lib/mailman/archives/private/".$c["name"]));
$size3=exec("sudo /usr/lib/alternc/du.pl ".escapeshellarg("/var/lib/mailman/archives/private/".$c["name"].".mbox"));
$size1=exec("sudo /usr/bin/du ".escapeshellarg("/var/lib/mailman/lists/".$c["name"]));
$size2=exec("sudo /usr/bin/du ".escapeshellarg("/var/lib/mailman/archives/private/".$c["name"]));
$size3=exec("sudo /usr/bin/du ".escapeshellarg("/var/lib/mailman/archives/private/".$c["name"].".mbox"));
$size=(intval($size1)+intval($size2)+intval($size3));
$db->query("REPLACE INTO size_mailman SET uid=?,list=?,size=?;",array($c["uid"],$c["name"],$size));
echo " done (".(round($size/1024, 1))." MB) \n"; flush();