Changeset 2855
- Timestamp:
- 03/06/11 19:06:27 (2 years ago)
- Location:
- alternc/trunk
- Files:
-
- 5 deleted
- 21 edited
-
bureau/admin/dom_edit.php (modified) (1 diff)
-
bureau/admin/index.php (modified) (1 diff)
-
bureau/class/config.php (modified) (2 diffs)
-
bureau/class/m_admin.php (modified) (1 diff)
-
bureau/class/m_dom.php (modified) (28 diffs)
-
bureau/class/m_mem.php (modified) (1 diff)
-
debian/alternc-slave.lintian (modified) (1 diff)
-
debian/alternc.dirs (modified) (2 diffs)
-
debian/alternc.lintian (modified) (2 diffs)
-
debian/alternc.postinst (modified) (4 diffs)
-
debian/rules (modified) (1 diff)
-
etc/alternc/apache-ssl.conf (deleted)
-
etc/alternc/apache.conf (deleted)
-
etc/alternc/apache2.conf (modified) (1 diff)
-
etc/alternc/templates/alternc/bureau.conf (modified) (1 diff)
-
etc/alternc/templates/apache2/panel.conf (modified) (2 diffs)
-
etc/alternc/templates/apache2/redirect.conf (modified) (1 diff)
-
etc/alternc/templates/apache2/vhost.conf (modified) (1 diff)
-
etc/alternc/templates/apache2/webmail.conf (modified) (1 diff)
-
install/alternc.install (modified) (3 diffs)
-
install/upgrades/0.9.1.sh (deleted)
-
install/upgrades/0.9.10.sh (deleted)
-
src/Makefile (modified) (1 diff)
-
src/alternc_reload (modified) (1 diff)
-
src/basedir_prot.sh (deleted)
-
src/update_domains.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
alternc/trunk/bureau/admin/dom_edit.php
r2842 r2855 66 66 <h3><?php printf(_("Editing subdomains of %s"),$domain); ?></h3> 67 67 <?php 68 if ( $error) {68 if (isset($error) && $error) { 69 69 echo "<p class=\"error\">$error</p>"; 70 70 } -
alternc/trunk/bureau/admin/index.php
r2559 r2855 58 58 </p> 59 59 <p> </p> 60 <?php if ( $error) echo "<font color=red>$error</font>"; ?>60 <?php if (isset($error) && $error) echo "<font color=red>$error</font>"; ?> 61 61 <?php 62 62 /* -
alternc/trunk/bureau/class/config.php
r2838 r2855 65 65 // For people who want to authenticate with HTTP AUTH 66 66 if (isset($_GET['http_auth'])) $http_auth=strval($_GET['http_auth']); 67 if ( $http_auth) {67 if (isset($http_auth) && $http_auth) { 68 68 if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) { 69 69 header('WWW-Authenticate: Basic realm="Test Authentication System"'); … … 94 94 95 95 // Redirection si appel à https://(!fqdn)/ 96 if ( $_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) {96 if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) { 97 97 header("Location: https://$L_FQDN/"); 98 98 } -
alternc/trunk/bureau/class/m_admin.php
r2754 r2855 724 724 return false; 725 725 else { 726 $res=array(); 726 727 while($db->next_record()) 727 $res[] = $db->Record;728 $res[] = $db->Record; 728 729 return $res; 729 730 } -
alternc/trunk/bureau/class/m_dom.php
r2853 r2855 67 67 var $islocked=false; 68 68 69 var $type_local = " LOCAL";69 var $type_local = "VHOST"; 70 70 var $type_url = "URL"; 71 71 var $type_ip = "IP"; … … 224 224 if ($db->num_rows()>0) { 225 225 while ($db->next_record()) { 226 $this->domains[]=$db->f("domaine");226 $this->domains[]=$db->f("domaine"); 227 227 } 228 228 } … … 348 348 $v=checkhostallow($domain,$this->dns); 349 349 if ($v==-1) { 350 $err->raise("dom",7);// TLD interdit351 return false;350 $err->raise("dom",7); // TLD interdit 351 return false; 352 352 } 353 353 if ($dns && $v==-2) { 354 $err->raise("dom",12);// Domaine non trouvé dans le whois355 return false;354 $err->raise("dom",12); // Domaine non trouvé dans le whois 355 return false; 356 356 } 357 357 if ($dns && $v==-3) { 358 $err->raise("dom",23);// Domaine non trouvé dans le whois359 return false;358 $err->raise("dom",23); // Domaine non trouvé dans le whois 359 return false; 360 360 } 361 361 … … 366 366 // It must be a real domain (no subdomain) 367 367 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 } 373 373 } 374 374 } … … 386 386 $db->next_record(); 387 387 if (!$db->Record["domaine"]) { 388 $err->raise("dom",1,$slavedom);389 $isslave=false;388 $err->raise("dom",1,$slavedom); 389 $isslave=false; 390 390 } 391 391 // Point to the master domain : … … 400 400 401 401 if (! is_dir($dest_root . "/". $domshort)) { 402 mkdir($dest_root . "/". $domshort);402 mkdir($dest_root . "/". $domshort); 403 403 } 404 404 … … 413 413 foreach($classes as $c) { 414 414 if (method_exists($GLOBALS[$c],"alternc_add_domain")) { 415 $GLOBALS[$c]->alternc_add_domain($domain);415 $GLOBALS[$c]->alternc_add_domain($domain); 416 416 } 417 417 } 418 418 foreach($classes as $c) { 419 419 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); 421 421 } 422 422 } 423 423 if ($isslave) { 424 424 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 } 428 428 } 429 429 } … … 450 450 $err->log("dom","whois",$domain); 451 451 // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 452 // echo "whois : $domain<br />";452 // echo "whois : $domain<br />"; 453 453 ereg(".*\.([^\.]*)",$domain,$out); 454 454 $ext=$out[1]; 455 455 // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 456 // echo "ext: $ext<br />";456 // echo "ext: $ext<br />"; 457 457 458 458 if (($fp=@fsockopen("whois.iana.org", 43))>0) { … … 476 476 } 477 477 // pour ajouter un nouveau TLD, utiliser le code ci-dessous. 478 // echo "serveur : $serveur <br />";478 // echo "serveur : $serveur <br />"; 479 479 if (($fp=@fsockopen($serveur, 43))>0) { 480 480 fputs($fp, "$egal$domain\r\n"); … … 482 482 $state=0; 483 483 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; 513 513 case "eu": 514 case "be":514 case "be": 515 515 $ligne=preg_replace("/^ *([^ ]*) \(.*\)$/","\\1",trim($ligne)); 516 516 if($found) … … 541 541 } 542 542 break; 543 case "fr":544 case "re":543 case "fr": 544 case "re": 545 545 if (ereg("nserver:", $ligne)) { 546 546 $found=true; … … 550 550 } 551 551 break; 552 case "ca":553 case "ws";554 if (ereg('^[[:space:]]*Name servers:[[:space:]]*$', $ligne)) {555 // found the server556 $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 themselves560 $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; 565 565 case "coop": 566 566 if (preg_match('/Host Name:\s*([^\s]+)/', $ligne, $matches)) { … … 568 568 $server[] = $matches[1]; 569 569 } 570 } // switch570 } // switch 571 571 } // while 572 572 fclose($fp); … … 670 670 $r["mail"]=$db->Record["gesmx"]; 671 671 $r["mx"]=$db->Record["mx"]; 672 $r[ noerase]=$db->Record[noerase];672 $r['noerase']=$db->Record['noerase']; 673 673 $db->free(); 674 674 $db->query("select count(*) as cnt from sub_domaines where compte='$cuid' and domaine='$dom'"); … … 691 691 /* 692 692 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"); 695 695 } 696 696 */ … … 755 755 756 756 function check_type_value($type, $value) { 757 global $db,$err,$cuid; 758 757 759 // check the type we can have in domaines_type.target 758 760 … … 987 989 if ($vmx == 1) { 988 990 // 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; 991 993 } 992 994 993 995 if ($vmx == 2) { 994 996 // Serveur non spécifié parmi les champx mx 995 $err->raise("dom",25);996 return false;997 $err->raise("dom",25); 998 return false; 997 999 } 998 1000 } … … 1003 1005 // Lancement de add_dom sur les classes domain_sensitive : 1004 1006 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 } 1008 1010 } 1009 1011 } … … 1012 1014 // Lancement de del_dom sur les classes domain_sensitive : 1013 1015 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 } 1017 1019 } 1018 1020 } … … 1035 1037 */ 1036 1038 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; 1046 1048 } 1047 1049 … … 1051 1053 */ 1052 1054 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; 1070 1072 } 1071 1073 … … 1075 1077 */ 1076 1078 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; 1087 1089 } 1088 1090 … … 1094 1096 */ 1095 1097 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; 1102 1104 } 1103 1105 … … 1107 1109 */ 1108 1110 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; 1115 1117 } 1116 1118 … … 1121 1123 */ 1122 1124 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; 1134 1136 } 1135 1137 … … 1140 1142 */ 1141 1143 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; 1150 1152 } 1151 1153 … … 1155 1157 */ 1156 1158 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; 1165 1167 } 1166 1168 … … 1170 1172 */ 1171 1173 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; 1175 1177 } 1176 1178 -
alternc/trunk/bureau/class/m_mem.php
r2847 r2855 489 489 function show_help($file,$force=false) { 490 490 global $err; 491 $err->log("mem","show_help" ,$show);491 $err->log("mem","show_help"); 492 492 if ($this->user["show_help"] || $force) { 493 493 $hlp=_("hlp_$file"); 494 494 if ($hlp!="hlp_$file") { 495 $hlp=ereg_replace(495 $hlp=ereg_replace( 496 496 "HELPID_([0-9]*)", 497 497 "<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; 500 500 } 501 501 return false; -
alternc/trunk/debian/alternc-slave.lintian
r2841 r2855 6 6 alternc-slave: setuid-binary usr/lib/alternc/quota_edit 4750 root/www-data 7 7 alternc-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 != 07559 8 alternc-slave: executable-is-not-world-readable usr/lib/alternc/du.pl 4750 10 9 alternc-slave: executable-is-not-world-readable usr/lib/alternc/fixperms.sh 0750 != 0755 -
alternc/trunk/debian/alternc.dirs
r2841 r2855 18 18 var/alternc/apache-vhost 19 19 var/alternc/apacheconf 20 var/alternc/apacheconf/_21 var/alternc/apacheconf/022 var/alternc/apacheconf/123 var/alternc/apacheconf/224 var/alternc/apacheconf/325 var/alternc/apacheconf/426 var/alternc/apacheconf/527 var/alternc/apacheconf/628 var/alternc/apacheconf/729 var/alternc/apacheconf/830 var/alternc/apacheconf/931 var/alternc/apacheconf/a32 var/alternc/apacheconf/b33 var/alternc/apacheconf/c34 var/alternc/apacheconf/d35 var/alternc/apacheconf/e36 var/alternc/apacheconf/f37 var/alternc/apacheconf/g38 var/alternc/apacheconf/h39 var/alternc/apacheconf/i40 var/alternc/apacheconf/j41 var/alternc/apacheconf/k42 var/alternc/apacheconf/l43 var/alternc/apacheconf/m44 var/alternc/apacheconf/n45 var/alternc/apacheconf/o46 var/alternc/apacheconf/p47 var/alternc/apacheconf/q48 var/alternc/apacheconf/r49 var/alternc/apacheconf/s50 var/alternc/apacheconf/t51 var/alternc/apacheconf/u52 var/alternc/apacheconf/v53 var/alternc/apacheconf/w54 var/alternc/apacheconf/x55 var/alternc/apacheconf/y56 var/alternc/apacheconf/z57 20 var/alternc/bind 58 21 var/alternc/bind/zones … … 61 24 var/alternc/db 62 25 var/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 26 var/alternc/dns/redir/ 137 27 var/alternc/exec.usr 138 28 var/alternc/html -
alternc/trunk/debian/alternc.lintian
r2840 r2855 12 12 alternc: non-standard-executable-perm usr/lib/alternc/quota_edit.sh 0750 != 0755 13 13 alternc: 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 != 075515 14 alternc: non-standard-executable-perm usr/lib/alternc/sqlbackup.sh 0750 != 0755 16 15 alternc: non-standard-executable-perm usr/lib/alternc/rawstat.daily 0750 != 0755 … … 42 41 alternc: executable-is-not-world-readable usr/lib/alternc/du.pl 4750 43 42 alternc: 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 != 075545 43 alternc: executable-is-not-world-readable usr/lib/alternc/spoolsize.php 0750 != 0755 46 44 alternc: executable-is-not-world-readable usr/lib/alternc/rawstat.daily 0750 != 0755 -
alternc/trunk/debian/alternc.postinst
r2846 r2855 193 193 if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then 194 194 rm -f /var/alternc/apacheconf/*/* 195 rm -f /var/alternc/apacheconf/override_php.conf196 195 fi 197 196 … … 215 214 find /var/alternc/dns/ -type l -lname /var/alternc/bureau -exec rm {} \; 216 215 217 # Add access to the management panel218 PUBLIC_IP_C=$(echo $PUBLIC_IP|cut -c 1)219 ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN220 mkdir -p /var/alternc/dns/$PUBLIC_IP_C221 ln -nsf /var/alternc/bureau /var/alternc/dns/$PUBLIC_IP_C/$PUBLIC_IP222 223 216 # Bind stuff 224 217 touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf … … 228 221 /usr/lib/alternc/slave_dns 229 222 # Apache will not start without this file 230 touch /var/alternc/apacheconf/override_php.conf231 223 touch /var/alternc/apache-vhost/vhosts_all.conf 232 224 … … 239 231 echo "running alternc.install" 240 232 alternc.install 241 242 # Add basedir protection243 /usr/lib/alternc/basedir_prot.sh244 233 245 234 ;; -
alternc/trunk/debian/rules
r2610 r2855 62 62 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 63 63 64 for sub in dns dns/redir mail html apacheconf; do \64 for sub in mail html ; do \ 65 65 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 \ 66 66 mkdir -p debian/alternc/var/alternc/${sub}/${i} ;\ -
alternc/trunk/etc/alternc/apache2.conf
r2854 r2855 12 12 </Directory> 13 13 14 15 14 <Directory /var/alternc> 16 15 Order allow,deny 17 16 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 18 33 </Directory> 19 34 -
alternc/trunk/etc/alternc/templates/alternc/bureau.conf
r2854 r2855 1 1 <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> 19 21 </VirtualHost> -
alternc/trunk/etc/alternc/templates/apache2/panel.conf
r2803 r2855 11 11 </Directory> 12 12 <Directory /var/alternc/bureau> 13 Order allow,deny 14 Allow from all 15 13 16 php_admin_flag safe_mode_gid off 14 17 php_admin_flag safe_mode off … … 17 20 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 21 </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 19 25 </VirtualHost> -
alternc/trunk/etc/alternc/templates/apache2/redirect.conf
r2803 r2855 1 1 <Virtualhost *:80> 2 ServerName %%fqdn%% 2 3 3 ServerName %%fqdn%%4 KeepAlive Off 4 5 5 KeepAlive Off 6 RewriteEngine On 7 RewriteRule ^/(.*)$ %%redirect%%/$1 [R=301,L] 6 8 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 9 11 </Virtualhost> -
alternc/trunk/etc/alternc/templates/apache2/vhost.conf
r2854 r2855 7 7 </Directory> 8 8 9 AllowOverride AuthConfig FileInfo Limit Options Indexes10 Options Indexes Includes FollowSymLinks MultiViews11 Order allow,deny12 Allow from all13 php_admin_flag safe_mode_gid on14 php_admin_flag safe_mode on15 php_admin_value disable_functions chmod,chown,chgrp,link,symlink16 php_admin_value safe_mode_exec_dir /var/alternc/exec.usr17 php_admin_value disable_functions chgrp,link,symlink18 19 php_admin_flag enable_dl off20 php_admin_value upload_tmp_dir /var/alternc/tmp21 php_admin_value sendmail_path /usr/lib/alternc/sendmail22 23 9 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc 24 10 CustomLog /var/log/apache2/access.log alternc -
alternc/trunk/etc/alternc/templates/apache2/webmail.conf
r2803 r2855 1 1 <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 11 14 </VirtualHost> -
alternc/trunk/install/alternc.install
r2848 r2855 211 211 fi 212 212 213 touch /var/alternc/apacheconf/override_php.conf214 if [ ! -h /etc/apache/conf.d/override_php.conf ] && [ -e /etc/apache/conf.d/ ]; then215 ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache/conf.d/override_php.conf216 fi217 213 SERVICES="$SERVICES apache apache-ssl" 218 214 fi … … 252 248 s="apache2" 253 249 fi 254 if [ ! -h /etc/apache2/conf.d/override_php.conf ] && [ -e /etc/apache2/conf.d/ ]; then255 ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache2/conf.d/override_php.conf256 s="apache2"257 fi258 250 if [ -e /etc/apache2/sites-enabled/000-default ]; then 259 251 a2dissite default … … 338 330 # Last touches 339 331 # 340 341 ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN342 ln -nsf /var/alternc/bureau /var/alternc/dns/$PUBLIC_IP_BEGIN/$PUBLIC_IP343 332 344 333 -
alternc/trunk/src/Makefile
r2841 r2855 27 27 # 28 28 SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del 29 SCRIPTS=quota_edit.sh quota_get.sh basedir_prot.shsqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh29 SCRIPTS=quota_edit.sh quota_get.sh sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh 30 30 LIBS=functions.sh functions_hosting.sh functions_dns.sh 31 31 BIN=$(DESTDIR)/usr/lib/alternc/ -
alternc/trunk/src/alternc_reload
r2824 r2855 57 57 done 58 58 fi 59 if [ -x /usr/sbin/apachectl ]; then60 $sudo /usr/sbin/apachectl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE"61 fi62 59 if [ -x /usr/sbin/apache2ctl ]; then 63 60 $sudo /usr/sbin/apache2ctl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE" -
alternc/trunk/src/update_domains.sh
r2849 r2855 96 96 dns_delete $dom 97 97 # Web configurations have already bean cleaned previously 98 mysql_query "delete sub_domaines where domaine='$dom'; deletedomaines where domaine='$dom';"98 mysql_query "delete from sub_domaines where domaine='$dom'; delete from domaines where domaine='$dom';" 99 99 RELOAD_ZONES="$RELOAD_ZONES $dom" 100 100 done … … 115 115 116 116 # 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 118 119 for slave in $ALTERNC_SLAVES; do 119 120 if [ "$slave" != "localhost" ]; then
Note: See TracChangeset
for help on using the changeset viewer.
