Changeset 2855


Ignore:
Timestamp:
03/06/11 19:06:27 (2 years ago)
Author:
fufroma
Message:

Vaguement :

  • correction de qques identation (et surement rajout d'erreur)
  • supression de apache 1 (c'est plus maintenu, on va pas s'étaler)
  • suppression du mass vhosting
  • corrections de bugs divers et varié
Location:
alternc/trunk
Files:
5 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/admin/dom_edit.php

    r2842 r2855  
    6666<h3><?php printf(_("Editing subdomains of %s"),$domain); ?></h3> 
    6767<?php 
    68         if ($error) { 
     68        if (isset($error) && $error) { 
    6969                echo "<p class=\"error\">$error</p>"; 
    7070        } 
  • alternc/trunk/bureau/admin/index.php

    r2559 r2855  
    5858    </p> 
    5959<p>&nbsp;</p> 
    60 <?php if ($error) echo "<font color=red>$error</font>"; ?> 
     60<?php if (isset($error) && $error) echo "<font color=red>$error</font>"; ?> 
    6161<?php 
    6262/* 
  • alternc/trunk/bureau/class/config.php

    r2838 r2855  
    6565// For people who want to authenticate with HTTP AUTH 
    6666if (isset($_GET['http_auth'])) $http_auth=strval($_GET['http_auth']); 
    67 if ($http_auth) { 
     67if (isset($http_auth) && $http_auth) { 
    6868    if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { 
    6969        header('WWW-Authenticate: Basic realm="Test Authentication System"'); 
     
    9494 
    9595// Redirection si appel à https://(!fqdn)/ 
    96 if ($_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) { 
     96if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) { 
    9797  header("Location: https://$L_FQDN/"); 
    9898} 
  • alternc/trunk/bureau/class/m_admin.php

    r2754 r2855  
    724724      return false; 
    725725    else { 
     726      $res=array(); 
    726727      while($db->next_record()) 
    727         $res[] = $db->Record; 
     728              $res[] = $db->Record; 
    728729      return $res; 
    729730    } 
  • alternc/trunk/bureau/class/m_dom.php

    r2853 r2855  
    6767  var $islocked=false; 
    6868 
    69   var $type_local = "LOCAL"; 
     69  var $type_local = "VHOST"; 
    7070  var $type_url = "URL"; 
    7171  var $type_ip = "IP"; 
     
    224224    if ($db->num_rows()>0) { 
    225225      while ($db->next_record()) { 
    226             $this->domains[]=$db->f("domaine"); 
     226      $this->domains[]=$db->f("domaine"); 
    227227      } 
    228228    } 
     
    348348      $v=checkhostallow($domain,$this->dns); 
    349349      if ($v==-1) { 
    350         $err->raise("dom",7);   // TLD interdit 
    351         return false; 
     350  $err->raise("dom",7);   // TLD interdit 
     351  return false; 
    352352      } 
    353353      if ($dns && $v==-2) { 
    354         $err->raise("dom",12);  // Domaine non trouvé dans le whois 
    355         return false; 
     354  $err->raise("dom",12);   // Domaine non trouvé dans le whois 
     355  return false; 
    356356      } 
    357357      if ($dns && $v==-3) { 
    358         $err->raise("dom",23);  // Domaine non trouvé dans le whois 
    359         return false; 
     358  $err->raise("dom",23);   // Domaine non trouvé dans le whois 
     359  return false; 
    360360      } 
    361361 
     
    366366      // It must be a real domain (no subdomain) 
    367367      if (!$dns) { 
    368         $v=checkhostallow_nodns($domain); 
    369         if ($v) { 
    370           $err->raise("dom",22); 
    371           return false; 
    372         } 
     368  $v=checkhostallow_nodns($domain); 
     369  if ($v) { 
     370    $err->raise("dom",22); 
     371    return false; 
     372  } 
    373373      } 
    374374    } 
     
    386386      $db->next_record(); 
    387387      if (!$db->Record["domaine"]) { 
    388         $err->raise("dom",1,$slavedom); 
    389         $isslave=false; 
     388  $err->raise("dom",1,$slavedom); 
     389  $isslave=false; 
    390390      } 
    391391      // Point to the master domain :  
     
    400400       
    401401      if (! is_dir($dest_root . "/". $domshort)) { 
    402         mkdir($dest_root . "/". $domshort); 
     402  mkdir($dest_root . "/". $domshort); 
    403403      } 
    404404       
     
    413413    foreach($classes as $c) { 
    414414      if (method_exists($GLOBALS[$c],"alternc_add_domain")) { 
    415         $GLOBALS[$c]->alternc_add_domain($domain); 
     415  $GLOBALS[$c]->alternc_add_domain($domain); 
    416416      } 
    417417    } 
    418418    foreach($classes as $c) { 
    419419      if (method_exists($GLOBALS[$c],"alternc_add_mx_domain")) { 
    420         $GLOBALS[$c]->alternc_add_mx_domain($domain); 
     420  $GLOBALS[$c]->alternc_add_mx_domain($domain); 
    421421      } 
    422422    } 
    423423    if ($isslave) { 
    424424      foreach($classes as $c) { 
    425         if (method_exists($GLOBALS[$c],"alternc_add_slave_domain")) { 
    426           $GLOBALS[$c]->alternc_add_slave_domain($domain,$slavedom); 
    427         } 
     425  if (method_exists($GLOBALS[$c],"alternc_add_slave_domain")) { 
     426    $GLOBALS[$c]->alternc_add_slave_domain($domain,$slavedom); 
     427  } 
    428428      }  
    429429    } 
     
    450450    $err->log("dom","whois",$domain); 
    451451    // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 
    452     //  echo "whois : $domain<br />"; 
     452    //  echo "whois : $domain<br />"; 
    453453    ereg(".*\.([^\.]*)",$domain,$out); 
    454454    $ext=$out[1]; 
    455455    // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 
    456     //  echo "ext: $ext<br />"; 
     456    //  echo "ext: $ext<br />"; 
    457457 
    458458    if (($fp=@fsockopen("whois.iana.org", 43))>0) { 
     
    476476    } 
    477477    // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 
    478     //  echo "serveur : $serveur <br />"; 
     478    //  echo "serveur : $serveur <br />"; 
    479479    if (($fp=@fsockopen($serveur, 43))>0) { 
    480480      fputs($fp, "$egal$domain\r\n"); 
     
    482482      $state=0; 
    483483      while (!feof($fp)) { 
    484         $ligne = fgets($fp,128); 
    485         // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 
    486         //      echo "| $ligne<br />"; 
    487         switch($ext) { 
    488         case "org": 
    489         case "com": 
    490         case "net": 
    491         case "info": 
    492         case "biz": 
    493         case "name": 
    494         case "cc": 
    495           if (ereg("Name Server:", $ligne)) { 
    496             $found = true; 
    497             $tmp=strtolower(ereg_replace(chr(10), "",ereg_replace(chr(13),"",ereg_replace(" ","", ereg_replace("Name Server:","", $ligne))))); 
    498             if ($tmp) 
    499               $server[]=$tmp; 
    500           } 
    501           break; 
    502         case "cx": 
    503           $ligne = ereg_replace(chr(10), "",ereg_replace(chr(13),"",ereg_replace(" ","", $ligne))); 
    504           if ($ligne=="" && $state==1) 
    505             $state=2; 
    506           if ($state==1) 
    507             $server[]=strtolower($ligne); 
    508           if ($ligne=="Nameservers:" && $state==0) { 
    509             $state=1; 
    510             $found = true; 
    511           } 
    512           break; 
     484  $ligne = fgets($fp,128); 
     485  // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 
     486  //  echo "| $ligne<br />"; 
     487  switch($ext) { 
     488  case "org": 
     489  case "com": 
     490  case "net": 
     491  case "info": 
     492  case "biz": 
     493  case "name": 
     494  case "cc": 
     495    if (ereg("Name Server:", $ligne)) { 
     496      $found = true; 
     497      $tmp=strtolower(ereg_replace(chr(10), "",ereg_replace(chr(13),"",ereg_replace(" ","", ereg_replace("Name Server:","", $ligne))))); 
     498      if ($tmp) 
     499        $server[]=$tmp; 
     500    } 
     501    break; 
     502  case "cx": 
     503    $ligne = ereg_replace(chr(10), "",ereg_replace(chr(13),"",ereg_replace(" ","", $ligne))); 
     504    if ($ligne=="" && $state==1) 
     505      $state=2; 
     506    if ($state==1) 
     507      $server[]=strtolower($ligne); 
     508    if ($ligne=="Nameservers:" && $state==0) { 
     509      $state=1; 
     510      $found = true; 
     511    } 
     512    break; 
    513513        case "eu": 
    514         case "be": 
     514  case "be": 
    515515          $ligne=preg_replace("/^ *([^ ]*) \(.*\)$/","\\1",trim($ligne)); 
    516516          if($found) 
     
    541541          } 
    542542          break; 
    543         case "fr": 
    544         case "re": 
     543  case "fr": 
     544  case "re": 
    545545          if (ereg("nserver:", $ligne)) { 
    546546            $found=true; 
     
    550550          } 
    551551          break; 
    552         case "ca": 
    553         case "ws"; 
    554           if (ereg('^[[:space:]]*Name servers:[[:space:]]*$', $ligne)) { 
    555                 // found the server 
    556                 $state = 1; 
    557           } elseif ($state) { 
    558                 if (ereg('^[^%]', $ligne) && $ligne = ereg_replace('[[:space:]]', "", $ligne)) { 
    559                   // first non-whitespace line is considered to be the nameservers themselves 
    560                   $found = true; 
    561                   $server[] = $ligne; 
    562                 } 
    563           } 
    564           break; 
     552  case "ca": 
     553  case "ws"; 
     554    if (ereg('^[[:space:]]*Name servers:[[:space:]]*$', $ligne)) { 
     555          // found the server 
     556      $state = 1; 
     557    } elseif ($state) { 
     558      if (ereg('^[^%]', $ligne) && $ligne = ereg_replace('[[:space:]]', "", $ligne)) { 
     559      // first non-whitespace line is considered to be the nameservers themselves 
     560      $found = true; 
     561      $server[] = $ligne; 
     562    } 
     563    } 
     564    break; 
    565565        case "coop": 
    566566          if (preg_match('/Host Name:\s*([^\s]+)/', $ligne, $matches)) { 
     
    568568            $server[] = $matches[1]; 
    569569          } 
    570         } // switch 
     570  } // switch 
    571571      } // while 
    572572      fclose($fp); 
     
    670670    $r["mail"]=$db->Record["gesmx"]; 
    671671    $r["mx"]=$db->Record["mx"]; 
    672     $r[noerase]=$db->Record[noerase]; 
     672    $r['noerase']=$db->Record['noerase']; 
    673673    $db->free(); 
    674674    $db->query("select count(*) as cnt from sub_domaines where compte='$cuid' and domaine='$dom'"); 
     
    691691/* 
    692692      if ($db->Record["type"]==3) { // Webmail 
    693         $this->webmail=1; 
    694         $r["sub"][$i]["dest"]=_("Webmail access"); 
     693  $this->webmail=1; 
     694  $r["sub"][$i]["dest"]=_("Webmail access"); 
    695695      } 
    696696*/ 
     
    755755 
    756756  function check_type_value($type, $value) { 
     757    global $db,$err,$cuid; 
     758 
    757759    // check the type we can have in domaines_type.target 
    758760 
     
    987989      if ($vmx == 1) { 
    988990        // Aucun champ mx de spécifié sur le dns 
    989         $err->raise("dom",25); 
    990         return false; 
     991  $err->raise("dom",25); 
     992  return false; 
    991993      } 
    992994   
    993995      if ($vmx == 2) { 
    994996        // Serveur non spécifié parmi les champx mx 
    995         $err->raise("dom",25); 
    996         return false; 
     997  $err->raise("dom",25); 
     998  return false; 
    997999      } 
    9981000    } 
     
    10031005      // Lancement de add_dom sur les classes domain_sensitive : 
    10041006      foreach($classes as $c) { 
    1005         if (method_exists($GLOBALS[$c],"alternc_add_mx_domain")) { 
    1006         $GLOBALS[$c]->alternc_add_mx_domain($dom); 
    1007         } 
     1007  if (method_exists($GLOBALS[$c],"alternc_add_mx_domain")) { 
     1008  $GLOBALS[$c]->alternc_add_mx_domain($dom); 
     1009  } 
    10081010      } 
    10091011    } 
     
    10121014      // Lancement de del_dom sur les classes domain_sensitive : 
    10131015      foreach($classes as $c) { 
    1014         if (method_exists($GLOBALS[$c],"alternc_del_mx_domain")) { 
    1015           $GLOBALS[$c]->alternc_del_mx_domain($dom); 
    1016         } 
     1016  if (method_exists($GLOBALS[$c],"alternc_del_mx_domain")) { 
     1017    $GLOBALS[$c]->alternc_del_mx_domain($dom); 
     1018  } 
    10171019      } 
    10181020    } 
     
    10351037   */ 
    10361038  function enum_slave_ip() { 
    1037         global $db,$err; 
    1038         $db->query("SELECT * FROM slaveip;"); 
    1039         if (!$db->next_record()) { 
    1040           return false; 
    1041         } 
    1042         do { 
    1043           $res[]=$db->Record; 
    1044         } while ($db->next_record()); 
    1045         return $res; 
     1039  global $db,$err; 
     1040  $db->query("SELECT * FROM slaveip;"); 
     1041  if (!$db->next_record()) { 
     1042    return false; 
     1043  } 
     1044  do { 
     1045    $res[]=$db->Record; 
     1046  } while ($db->next_record()); 
     1047  return $res; 
    10461048  } 
    10471049 
     
    10511053   */ 
    10521054  function add_slave_ip($ip,$class="32") { 
    1053         global $db,$err; 
    1054         if (!checkip($ip)) { 
    1055                 $err->raise("dom",19); 
    1056                 return false; 
    1057         } 
    1058         $class=intval($class); 
    1059         if ($class<8 || $class>32) $class=32; 
    1060         $db->query("SELECT * FROM slaveip WHERE ip='$ip' AND class='$class';"); 
    1061         if ($db->next_record()) { 
    1062           $err->raise("err",22); 
    1063           return false; 
    1064         } 
    1065         $db->query("INSERT INTO slaveip (ip,class) VALUES ('$ip','$class');"); 
    1066         $f=fopen(SLAVE_FLAG,"w"); 
    1067         fputs($f,"yopla"); 
    1068         fclose($f);      
    1069         return true; 
     1055  global $db,$err; 
     1056  if (!checkip($ip)) { 
     1057    $err->raise("dom",19); 
     1058    return false; 
     1059  } 
     1060  $class=intval($class); 
     1061  if ($class<8 || $class>32) $class=32; 
     1062  $db->query("SELECT * FROM slaveip WHERE ip='$ip' AND class='$class';"); 
     1063  if ($db->next_record()) { 
     1064    $err->raise("err",22); 
     1065    return false; 
     1066  } 
     1067  $db->query("INSERT INTO slaveip (ip,class) VALUES ('$ip','$class');"); 
     1068  $f=fopen(SLAVE_FLAG,"w"); 
     1069  fputs($f,"yopla"); 
     1070  fclose($f);   
     1071  return true; 
    10701072  } 
    10711073 
     
    10751077   */ 
    10761078  function del_slave_ip($ip) { 
    1077         global $db,$err; 
    1078         if (!checkip($ip)) { 
    1079                 $err->raise("dom",19); 
    1080                 return false; 
    1081         } 
    1082         $db->query("DELETE FROM slaveip WHERE ip='$ip'"); 
    1083         $f=fopen(SLAVE_FLAG,"w"); 
    1084         fputs($f,"yopla"); 
    1085         fclose($f);      
    1086         return true; 
     1079  global $db,$err; 
     1080  if (!checkip($ip)) { 
     1081    $err->raise("dom",19); 
     1082    return false; 
     1083  } 
     1084  $db->query("DELETE FROM slaveip WHERE ip='$ip'"); 
     1085  $f=fopen(SLAVE_FLAG,"w"); 
     1086  fputs($f,"yopla"); 
     1087  fclose($f);   
     1088  return true; 
    10871089  } 
    10881090 
     
    10941096   */ 
    10951097  function check_slave_account($login,$pass) { 
    1096         global $db,$err; 
    1097         $db->query("SELECT * FROM slaveaccount WHERE login='$login' AND pass='$pass';"); 
    1098         if ($db->next_record()) {  
    1099                 return true; 
    1100         } 
    1101         return false; 
     1098  global $db,$err; 
     1099  $db->query("SELECT * FROM slaveaccount WHERE login='$login' AND pass='$pass';"); 
     1100  if ($db->next_record()) {  
     1101    return true; 
     1102  } 
     1103  return false; 
    11021104  } 
    11031105 
     
    11071109   */ 
    11081110  function echo_domain_list() { 
    1109         global $db,$err; 
    1110         $db->query("SELECT domaine FROM domaines WHERE gesdns=1 ORDER BY domaine"); 
    1111         while ($db->next_record()) { 
    1112                 echo $db->f("domaine")."\n"; 
    1113         } 
    1114         return true; 
     1111  global $db,$err; 
     1112  $db->query("SELECT domaine FROM domaines WHERE gesdns=1 ORDER BY domaine"); 
     1113  while ($db->next_record()) { 
     1114    echo $db->f("domaine")."\n"; 
     1115  } 
     1116  return true; 
    11151117  } 
    11161118 
     
    11211123   */ 
    11221124  function get_domain_list($uid=-1) { 
    1123         global $db,$err; 
    1124         $uid=intval($uid); 
    1125         $res=array(); 
    1126         if ($uid!=-1) { 
    1127           $sql=" AND compte='$uid' "; 
    1128         } 
    1129         $db->query("SELECT domaine FROM domaines WHERE gesdns=1 $sql ORDER BY domaine"); 
    1130         while ($db->next_record()) { 
    1131                 $res[]=$db->f("domaine"); 
    1132         } 
    1133         return $res; 
     1125  global $db,$err; 
     1126  $uid=intval($uid); 
     1127  $res=array(); 
     1128  if ($uid!=-1) { 
     1129    $sql=" AND compte='$uid' "; 
     1130  } 
     1131  $db->query("SELECT domaine FROM domaines WHERE gesdns=1 $sql ORDER BY domaine"); 
     1132  while ($db->next_record()) { 
     1133    $res[]=$db->f("domaine"); 
     1134  } 
     1135  return $res; 
    11341136  } 
    11351137 
     
    11401142   */ 
    11411143  function enum_slave_account() { 
    1142         global $db,$err; 
    1143         $db->query("SELECT * FROM slaveaccount;"); 
    1144         $res=array(); 
    1145         while ($db->next_record()) { 
    1146                 $res[]=$db->Record; 
    1147         } 
    1148         if (!count($res)) return false; 
    1149         return $res; 
     1144  global $db,$err; 
     1145  $db->query("SELECT * FROM slaveaccount;"); 
     1146  $res=array(); 
     1147  while ($db->next_record()) { 
     1148    $res[]=$db->Record; 
     1149  } 
     1150  if (!count($res)) return false; 
     1151  return $res; 
    11501152  } 
    11511153 
     
    11551157   */ 
    11561158  function add_slave_account($login,$pass) { 
    1157         global $db,$err; 
    1158         $db->query("SELECT * FROM slaveaccount WHERE login='$login'"); 
    1159         if ($db->next_record()) { 
    1160           $err->raise("err",23); 
    1161           return false; 
    1162         } 
    1163         $db->query("INSERT INTO slaveaccount (login,pass) VALUES ('$login','$pass')"); 
    1164         return true; 
     1159  global $db,$err; 
     1160  $db->query("SELECT * FROM slaveaccount WHERE login='$login'"); 
     1161  if ($db->next_record()) { 
     1162    $err->raise("err",23); 
     1163    return false; 
     1164  } 
     1165  $db->query("INSERT INTO slaveaccount (login,pass) VALUES ('$login','$pass')"); 
     1166  return true; 
    11651167  } 
    11661168 
     
    11701172   */ 
    11711173  function del_slave_account($login) { 
    1172         global $db,$err; 
    1173         $db->query("DELETE FROM slaveaccount WHERE login='$login'"); 
    1174         return true; 
     1174  global $db,$err; 
     1175  $db->query("DELETE FROM slaveaccount WHERE login='$login'"); 
     1176  return true; 
    11751177  } 
    11761178 
  • alternc/trunk/bureau/class/m_mem.php

    r2847 r2855  
    489489  function show_help($file,$force=false) { 
    490490    global $err; 
    491     $err->log("mem","show_help",$show); 
     491    $err->log("mem","show_help"); 
    492492    if ($this->user["show_help"] || $force) { 
    493493      $hlp=_("hlp_$file"); 
    494494      if ($hlp!="hlp_$file") { 
    495         $hlp=ereg_replace( 
     495              $hlp=ereg_replace( 
    496496                          "HELPID_([0-9]*)", 
    497497                          "<a href=\"javascript:help(\\1);\"><img src=\"/admin/aide/help.png\" width=\"17\" height=\"17\" style=\"vertical-align: middle;\" alt=\""._("Help")."\" /></a>",$hlp); 
    498         echo "<p class=\"hlp\">".$hlp."</p>"; 
    499         return true; 
     498        echo "<p class=\"hlp\">".$hlp."</p>"; 
     499        return true; 
    500500      } 
    501501      return false; 
  • alternc/trunk/debian/alternc-slave.lintian

    r2841 r2855  
    66alternc-slave: setuid-binary usr/lib/alternc/quota_edit 4750 root/www-data 
    77alternc-slave: setuid-binary usr/lib/alternc/quota_get 4750 root/www-data 
    8 alternc-slave: executable-is-not-world-readable usr/lib/alternc/basedir_prot.sh 0750 != 0755 
    98alternc-slave: executable-is-not-world-readable usr/lib/alternc/du.pl 4750 
    109alternc-slave: executable-is-not-world-readable usr/lib/alternc/fixperms.sh 0750 != 0755 
  • alternc/trunk/debian/alternc.dirs

    r2841 r2855  
    1818var/alternc/apache-vhost 
    1919var/alternc/apacheconf 
    20 var/alternc/apacheconf/_ 
    21 var/alternc/apacheconf/0 
    22 var/alternc/apacheconf/1 
    23 var/alternc/apacheconf/2 
    24 var/alternc/apacheconf/3 
    25 var/alternc/apacheconf/4 
    26 var/alternc/apacheconf/5 
    27 var/alternc/apacheconf/6 
    28 var/alternc/apacheconf/7 
    29 var/alternc/apacheconf/8 
    30 var/alternc/apacheconf/9 
    31 var/alternc/apacheconf/a 
    32 var/alternc/apacheconf/b 
    33 var/alternc/apacheconf/c 
    34 var/alternc/apacheconf/d 
    35 var/alternc/apacheconf/e 
    36 var/alternc/apacheconf/f 
    37 var/alternc/apacheconf/g 
    38 var/alternc/apacheconf/h 
    39 var/alternc/apacheconf/i 
    40 var/alternc/apacheconf/j 
    41 var/alternc/apacheconf/k 
    42 var/alternc/apacheconf/l 
    43 var/alternc/apacheconf/m 
    44 var/alternc/apacheconf/n 
    45 var/alternc/apacheconf/o 
    46 var/alternc/apacheconf/p 
    47 var/alternc/apacheconf/q 
    48 var/alternc/apacheconf/r 
    49 var/alternc/apacheconf/s 
    50 var/alternc/apacheconf/t 
    51 var/alternc/apacheconf/u 
    52 var/alternc/apacheconf/v 
    53 var/alternc/apacheconf/w 
    54 var/alternc/apacheconf/x 
    55 var/alternc/apacheconf/y 
    56 var/alternc/apacheconf/z 
    5720var/alternc/bind 
    5821var/alternc/bind/zones 
     
    6124var/alternc/db 
    6225var/alternc/dns 
    63 var/alternc/dns/_ 
    64 var/alternc/dns/0 
    65 var/alternc/dns/1 
    66 var/alternc/dns/2 
    67 var/alternc/dns/3 
    68 var/alternc/dns/4 
    69 var/alternc/dns/5 
    70 var/alternc/dns/6 
    71 var/alternc/dns/7 
    72 var/alternc/dns/8 
    73 var/alternc/dns/9 
    74 var/alternc/dns/a 
    75 var/alternc/dns/b 
    76 var/alternc/dns/c 
    77 var/alternc/dns/d 
    78 var/alternc/dns/e 
    79 var/alternc/dns/f 
    80 var/alternc/dns/g 
    81 var/alternc/dns/h 
    82 var/alternc/dns/i 
    83 var/alternc/dns/j 
    84 var/alternc/dns/k 
    85 var/alternc/dns/l 
    86 var/alternc/dns/m 
    87 var/alternc/dns/n 
    88 var/alternc/dns/o 
    89 var/alternc/dns/p 
    90 var/alternc/dns/q 
    91 var/alternc/dns/r 
    92 var/alternc/dns/redir/_ 
    93 var/alternc/dns/redir/0 
    94 var/alternc/dns/redir/1 
    95 var/alternc/dns/redir/2 
    96 var/alternc/dns/redir/3 
    97 var/alternc/dns/redir/4 
    98 var/alternc/dns/redir/5 
    99 var/alternc/dns/redir/6 
    100 var/alternc/dns/redir/7 
    101 var/alternc/dns/redir/8 
    102 var/alternc/dns/redir/9 
    103 var/alternc/dns/redir/a 
    104 var/alternc/dns/redir/b 
    105 var/alternc/dns/redir/c 
    106 var/alternc/dns/redir/d 
    107 var/alternc/dns/redir/e 
    108 var/alternc/dns/redir/f 
    109 var/alternc/dns/redir/g 
    110 var/alternc/dns/redir/h 
    111 var/alternc/dns/redir/i 
    112 var/alternc/dns/redir/j 
    113 var/alternc/dns/redir/k 
    114 var/alternc/dns/redir/l 
    115 var/alternc/dns/redir/m 
    116 var/alternc/dns/redir/n 
    117 var/alternc/dns/redir/o 
    118 var/alternc/dns/redir/p 
    119 var/alternc/dns/redir/q 
    120 var/alternc/dns/redir/r 
    121 var/alternc/dns/redir/s 
    122 var/alternc/dns/redir/t 
    123 var/alternc/dns/redir/u 
    124 var/alternc/dns/redir/v 
    125 var/alternc/dns/redir/w 
    126 var/alternc/dns/redir/x 
    127 var/alternc/dns/redir/y 
    128 var/alternc/dns/redir/z 
    129 var/alternc/dns/s 
    130 var/alternc/dns/t 
    131 var/alternc/dns/u 
    132 var/alternc/dns/v 
    133 var/alternc/dns/w 
    134 var/alternc/dns/x 
    135 var/alternc/dns/y 
    136 var/alternc/dns/z 
     26var/alternc/dns/redir/ 
    13727var/alternc/exec.usr 
    13828var/alternc/html 
  • alternc/trunk/debian/alternc.lintian

    r2840 r2855  
    1212alternc: non-standard-executable-perm usr/lib/alternc/quota_edit.sh 0750 != 0755 
    1313alternc: non-standard-executable-perm usr/lib/alternc/quota_get.sh 0750 != 0755 
    14 alternc: non-standard-executable-perm usr/lib/alternc/basedir_prot.sh 0750 != 0755 
    1514alternc: non-standard-executable-perm usr/lib/alternc/sqlbackup.sh 0750 != 0755 
    1615alternc: non-standard-executable-perm usr/lib/alternc/rawstat.daily 0750 != 0755 
     
    4241alternc: executable-is-not-world-readable usr/lib/alternc/du.pl 4750 
    4342alternc: executable-is-not-world-readable usr/lib/alternc/quota_init 0750 != 0755 
    44 alternc: executable-is-not-world-readable usr/lib/alternc/basedir_prot.sh 0750 != 0755 
    4543alternc: executable-is-not-world-readable usr/lib/alternc/spoolsize.php 0750 != 0755 
    4644alternc: executable-is-not-world-readable usr/lib/alternc/rawstat.daily 0750 != 0755 
  • alternc/trunk/debian/alternc.postinst

    r2846 r2855  
    193193    if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then 
    194194        rm -f /var/alternc/apacheconf/*/* 
    195         rm -f /var/alternc/apacheconf/override_php.conf 
    196195    fi 
    197196 
     
    215214    find /var/alternc/dns/ -type l -lname /var/alternc/bureau -exec rm {} \; 
    216215 
    217     # Add access to the management panel     
    218     PUBLIC_IP_C=$(echo $PUBLIC_IP|cut -c 1) 
    219     ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN 
    220     mkdir -p /var/alternc/dns/$PUBLIC_IP_C 
    221     ln -nsf /var/alternc/bureau /var/alternc/dns/$PUBLIC_IP_C/$PUBLIC_IP 
    222  
    223216    # Bind stuff 
    224217    touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf 
     
    228221    /usr/lib/alternc/slave_dns 
    229222    # Apache will not start without this file 
    230     touch /var/alternc/apacheconf/override_php.conf 
    231223    touch /var/alternc/apache-vhost/vhosts_all.conf 
    232224 
     
    239231    echo "running alternc.install" 
    240232    alternc.install 
    241  
    242     # Add basedir protection 
    243     /usr/lib/alternc/basedir_prot.sh 
    244233 
    245234    ;; 
  • alternc/trunk/debian/rules

    r2610 r2855  
    6262        chmod a+x debian/alternc/usr/share/alternc/install/alternc.install debian/alternc/usr/share/alternc/install/dopo.sh debian/alternc/usr/share/alternc/install/mysql.sh debian/alternc/usr/share/alternc/install/newone.php debian/alternc/usr/share/alternc/install/reset_root.php debian/alternc/usr/share/alternc/install/upgrade_check.sh debian/alternc/usr/share/alternc/install/upgrades/*.php debian/alternc/usr/share/alternc/install/upgrades/*.sh 
    6363 
    64         for sub in dns dns/redir mail html apacheconf; do \ 
     64        for sub in mail html ; do \ 
    6565                for i in a b c d e f g h i j k l m n o p q r s t u v w x y z _ 0 1 2 3 4 5 6 7 8 9; do \ 
    6666                        mkdir -p debian/alternc/var/alternc/${sub}/${i} ;\ 
  • alternc/trunk/etc/alternc/apache2.conf

    r2854 r2855  
    1212</Directory> 
    1313 
    14  
    1514<Directory /var/alternc> 
    1615        Order allow,deny 
    1716        Allow from none 
     17</Directory> 
     18 
     19<Directory /var/alternc/html> 
     20  AllowOverride AuthConfig FileInfo Limit Options Indexes 
     21  Options Indexes Includes FollowSymLinks MultiViews 
     22  Order allow,deny 
     23  Allow from all 
     24  php_admin_flag safe_mode_gid on 
     25  php_admin_flag safe_mode on 
     26  php_admin_value disable_functions chmod,chown,chgrp,link,symlink 
     27  php_admin_value safe_mode_exec_dir /var/alternc/exec.usr 
     28  php_admin_value disable_functions chgrp,link,symlink 
     29   
     30  php_admin_flag enable_dl off 
     31  php_admin_value upload_tmp_dir /var/alternc/tmp 
     32  php_admin_value sendmail_path /usr/lib/alternc/sendmail 
    1833</Directory> 
    1934 
  • alternc/trunk/etc/alternc/templates/alternc/bureau.conf

    r2854 r2855  
    11<VirtualHost *:80> 
    2         DocumentRoot /var/alternc/bureau 
    3         ServerName %%fqdn%% 
    4          
    5         alias /admin/sql        /usr/share/phpmyadmin 
    6         alias /webmail          /usr/share/squirrelmail 
    7          
    8         <Directory /> 
    9                 Options FollowSymLinks 
    10                 AllowOverride None 
    11         </Directory> 
    12         <Directory /var/alternc/bureau> 
    13                 php_admin_flag safe_mode_gid off 
    14                 php_admin_flag safe_mode off 
    15                     php_admin_flag register_globals on 
    16                 AddDefaultCharset ISO-8859-1 
    17                 php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/ 
    18         </Directory> 
     2  DocumentRoot /var/alternc/bureau 
     3  ServerName %%fqdn%% 
     4   
     5  alias /admin/sql        /usr/share/phpmyadmin 
     6  alias /webmail          /usr/share/squirrelmail 
     7   
     8  <Directory /> 
     9    Options FollowSymLinks 
     10    AllowOverride None 
     11  </Directory> 
     12  <Directory /var/alternc/bureau> 
     13    Order allow,deny 
     14    Allow from all  
     15    php_admin_flag safe_mode_gid off 
     16    php_admin_flag safe_mode off 
     17    php_admin_flag register_globals on 
     18    AddDefaultCharset ISO-8859-1 
     19    php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/ 
     20  </Directory> 
    1921</VirtualHost> 
  • alternc/trunk/etc/alternc/templates/apache2/panel.conf

    r2803 r2855  
    1111        </Directory> 
    1212        <Directory /var/alternc/bureau> 
     13    Order allow,deny 
     14    Allow from all 
     15 
    1316                php_admin_flag safe_mode_gid off 
    1417                php_admin_flag safe_mode off 
     
    1720                php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/ 
    1821        </Directory> 
     22 
     23        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc 
     24  CustomLog /var/log/apache2/access.log alternc 
    1925</VirtualHost> 
  • alternc/trunk/etc/alternc/templates/apache2/redirect.conf

    r2803 r2855  
    11<Virtualhost *:80>  
     2  ServerName %%fqdn%% 
    23 
    3     ServerName %%fqdn%% 
     4  KeepAlive Off  
    45 
    5     KeepAlive Off  
     6  RewriteEngine On  
     7  RewriteRule ^/(.*)$ %%redirect%%/$1 [R=301,L]  
    68 
    7     RewriteEngine On  
    8     RewriteRule ^/(.*)$ %%redirect%%/$1 [R=301,L]  
     9        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc 
     10  CustomLog /var/log/apache2/access.log alternc 
    911</Virtualhost> 
  • alternc/trunk/etc/alternc/templates/apache2/vhost.conf

    r2854 r2855  
    77  </Directory> 
    88 
    9         AllowOverride AuthConfig FileInfo Limit Options Indexes 
    10         Options Indexes Includes FollowSymLinks MultiViews 
    11         Order allow,deny 
    12         Allow from all 
    13         php_admin_flag safe_mode_gid on 
    14         php_admin_flag safe_mode on 
    15         php_admin_value disable_functions chmod,chown,chgrp,link,symlink 
    16   php_admin_value safe_mode_exec_dir /var/alternc/exec.usr 
    17   php_admin_value disable_functions chgrp,link,symlink 
    18  
    19   php_admin_flag enable_dl off 
    20   php_admin_value upload_tmp_dir /var/alternc/tmp 
    21   php_admin_value sendmail_path /usr/lib/alternc/sendmail 
    22  
    239        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc 
    2410  CustomLog /var/log/apache2/access.log alternc 
  • alternc/trunk/etc/alternc/templates/apache2/webmail.conf

    r2803 r2855  
    11<VirtualHost *:80> 
    2     ServerName %%fqdn%% 
    3     DocumentRoot /usr/share/squirrelmail 
    4     <Directory /usr/share/squirrelmail> 
    5     #  php_value register_globals On # refer to Debian bug #128226 
    6       php_flag register_globals on 
    7       php_value open_basedir /usr/share/squirrelmail 
    8       php_admin_flag safe_mode off 
    9       Options Indexes FollowSymLinks 
    10     </Directory> 
     2  ServerName %%fqdn%% 
     3  DocumentRoot /usr/share/squirrelmail 
     4  <Directory /usr/share/squirrelmail> 
     5  #  php_value register_globals On # refer to Debian bug #128226 
     6    php_flag register_globals on 
     7    php_value open_basedir /usr/share/squirrelmail 
     8    php_admin_flag safe_mode off 
     9    Options Indexes FollowSymLinks 
     10  </Directory> 
     11 
     12        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc 
     13  CustomLog /var/log/apache2/access.log alternc 
    1114</VirtualHost> 
  • alternc/trunk/install/alternc.install

    r2848 r2855  
    211211    fi 
    212212 
    213     touch /var/alternc/apacheconf/override_php.conf 
    214     if [ ! -h /etc/apache/conf.d/override_php.conf ] && [ -e /etc/apache/conf.d/ ]; then 
    215             ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache/conf.d/override_php.conf 
    216     fi 
    217213    SERVICES="$SERVICES apache apache-ssl" 
    218214fi 
     
    252248        s="apache2" 
    253249    fi 
    254     if [ ! -h /etc/apache2/conf.d/override_php.conf ] && [ -e /etc/apache2/conf.d/ ]; then 
    255         ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache2/conf.d/override_php.conf 
    256         s="apache2" 
    257     fi 
    258250    if [ -e /etc/apache2/sites-enabled/000-default ]; then 
    259251        a2dissite default 
     
    338330# Last touches 
    339331# 
    340  
    341 ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN 
    342 ln -nsf /var/alternc/bureau /var/alternc/dns/$PUBLIC_IP_BEGIN/$PUBLIC_IP 
    343332 
    344333 
  • alternc/trunk/src/Makefile

    r2841 r2855  
    2727# 
    2828SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del 
    29 SCRIPTS=quota_edit.sh quota_get.sh basedir_prot.sh sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh  
     29SCRIPTS=quota_edit.sh quota_get.sh sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh  
    3030LIBS=functions.sh functions_hosting.sh functions_dns.sh 
    3131BIN=$(DESTDIR)/usr/lib/alternc/ 
  • alternc/trunk/src/alternc_reload

    r2824 r2855  
    5757        done 
    5858    fi 
    59     if [ -x /usr/sbin/apachectl ]; then 
    60         $sudo /usr/sbin/apachectl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE" 
    61     fi 
    6259    if [ -x /usr/sbin/apache2ctl ]; then 
    6360        $sudo /usr/sbin/apache2ctl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE" 
  • alternc/trunk/src/update_domains.sh

    r2849 r2855  
    9696    dns_delete $dom 
    9797    # Web configurations have already bean cleaned previously 
    98     mysql_query "delete sub_domaines where domaine='$dom'; delete domaines where domaine='$dom';" 
     98    mysql_query "delete from sub_domaines where domaine='$dom'; delete from domaines where domaine='$dom';" 
    9999    RELOAD_ZONES="$RELOAD_ZONES $dom" 
    100100done 
     
    115115 
    116116# we assume we run apache and bind on the master 
    117 /usr/bin/alternc_reload $RELOAD_ZONES || true 
     117#/usr/bin/alternc_reload $RELOAD_ZONES || true 
     118/usr/bin/alternc_reload all || true 
    118119for slave in $ALTERNC_SLAVES; do 
    119120    if [ "$slave" != "localhost" ]; then 
Note: See TracChangeset for help on using the changeset viewer.