Changeset 1286

Show
Ignore:
Timestamp:
07/21/08 11:18:05 (4 months ago)
Author:
scitech
Message:

Fixed #1434: rootkit.log.php. Fixed: Subdomains and aliases emails were not removed when reseller/admin remove parent domain

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1285 r1286  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-07-21 Daniel Andreca 
     5        - GUI: 
     6                * Fixed #1434: rootkit.log.php 
     7        - ENGINE: 
     8                * Subdomains and aliases emails were not removed when reseller/admin remove parent domain 
    39 
    4102008-07-20 Daniel Andreca 
  • trunk/engine/ispcp-rqst-mngr

    r1148 r1286  
    184184    } 
    185185 
     186    $sql = "select mail_id, mail_acc, status from mail_users where status != 'ok' and status != 'ordered' order by mail_id"; 
     187 
     188    ($rs, $rdata) = doSQL($sql); 
     189 
     190    my $mail_count = @$rdata; 
     191 
     192    if ($mail_count > 0) { 
     193 
     194        foreach (@$rdata) { 
     195 
     196            my $row = $_; 
     197 
     198            my ($mail_id, $mail_acc, $mail_status) = (@$row[0], @$row[1], @$row[2]); 
     199 
     200            if ($mail_status eq "toadd" || $mail_status eq "change" || $mail_status eq "delete") { 
     201 
     202                if (defined($main::engine_debug)) { 
     203 
     204                    push_el(\@main::el, 'mngr_engine()', "processing $mail_id, $mail_acc, $mail_status."); 
     205 
     206                } 
     207 
     208            } 
     209 
     210            $rs = sys_command("$main::ispcp_mbox_mngr $mail_id 1>>$main::ispcp_mbox_mngr_stdout 2>>$main::ispcp_mbox_mngr_stderr"); 
     211 
     212            if ($rs != 0) { 
     213 
     214                if (-e $main::ispcp_mbox_mngr_el) { 
     215 
     216                    my $rs1 = undef; 
     217 
     218                    pop_el(\@main::el); # removing 'sys_command()' error message; 
     219 
     220                    ($rs1, $rdata) = get_el_error($main::ispcp_mbox_mngr_el); 
     221 
     222                    return $rs1 if ($rs1 != 0); 
     223 
     224                    push_el(\@main::el, $main::ispcp_mbox_mngr, $rdata); 
     225 
     226                } 
     227 
     228                if (!defined($main::engine_debug)) { 
     229 
     230                    del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); 
     231 
     232                } 
     233 
     234                return $rs; 
     235 
     236            } 
     237 
     238            if (!defined($main::engine_debug)) { 
     239 
     240                del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); 
     241 
     242            } 
     243 
     244        } 
     245 
     246    } 
     247 
    186248    $sql = "select subdomain_id, subdomain_name, subdomain_status from subdomain where subdomain_status != 'ok' order by subdomain_id"; 
    187249 
     
    302364                } 
    303365 
    304  
    305             } 
    306  
    307         } 
    308  
    309     } 
    310  
    311     $sql = "select mail_id, mail_acc, status from mail_users where status != 'ok' and status != 'ordered' order by mail_id"; 
    312  
    313     ($rs, $rdata) = doSQL($sql); 
    314  
    315     my $mail_count = @$rdata; 
    316  
    317     if ($mail_count > 0) { 
    318  
    319         foreach (@$rdata) { 
    320  
    321             my $row = $_; 
    322  
    323             my ($mail_id, $mail_acc, $mail_status) = (@$row[0], @$row[1], @$row[2]); 
    324  
    325             if ($mail_status eq "toadd" || $mail_status eq "change" || $mail_status eq "delete") { 
    326  
    327                 if (defined($main::engine_debug)) { 
    328  
    329                     push_el(\@main::el, 'mngr_engine()', "processing $mail_id, $mail_acc, $mail_status."); 
    330  
    331                 } 
    332  
    333             } 
    334  
    335             $rs = sys_command("$main::ispcp_mbox_mngr $mail_id 1>$main::ispcp_mbox_mngr_stdout 2>$main::ispcp_mbox_mngr_stderr"); 
    336  
    337             if ($rs != 0) { 
    338  
    339                 if (-e $main::ispcp_mbox_mngr_el) { 
    340  
    341                     my $rs1 = undef; 
    342  
    343                     pop_el(\@main::el); # removing 'sys_command()' error message; 
    344  
    345                     ($rs1, $rdata) = get_el_error($main::ispcp_mbox_mngr_el); 
    346  
    347                     return $rs1 if ($rs1 != 0); 
    348  
    349                     push_el(\@main::el, $main::ispcp_mbox_mngr, $rdata); 
    350  
    351                 } 
    352  
    353                 if (!defined($main::engine_debug)) { 
    354  
    355                     del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); 
    356  
    357                 } 
    358  
    359                 return $rs; 
    360  
    361             } 
    362  
    363             if (!defined($main::engine_debug)) { 
    364  
    365                 del_file($main::ispcp_mbox_mngr_stdout); del_file($main::ispcp_mbox_mngr_stderr); 
    366366 
    367367            } 
  • trunk/gui/admin/rootkit_log.php

    r1241 r1286  
    5454        $contents = ''; 
    5555 
    56         if (file_exists($filename) && is_readable($filename)) { 
     56        if (file_exists($filename) && is_readable($filename) && filesize($filename)>0) { 
    5757                $handle = fopen($filename, 'r'); 
    5858