intial commit
This commit is contained in:
280
debian/patches/10_service_pack_1_additional_fixes_only.patch
vendored
Normal file
280
debian/patches/10_service_pack_1_additional_fixes_only.patch
vendored
Normal file
@@ -0,0 +1,280 @@
|
||||
diff -uNr nagiosql32.orig/admin/contacts.php nagiosql32/admin/contacts.php
|
||||
--- nagiosql32.orig/admin/contacts.php 2012-04-20 12:39:53.983095000 +0200
|
||||
+++ nagiosql32/admin/contacts.php 2012-04-20 12:39:56.000000000 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Contact definitions
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-04-20 12:39:53 +0200 (Fri, 20 Apr 2012) $
|
||||
+// Date : $LastChangedDate: 2012-04-20 12:39:53 +0200 (Fr, 20. Apr 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
// Revision : $LastChangedRevision: 1323 $
|
||||
diff -uNr nagiosql32.orig/admin/hosts.php nagiosql32/admin/hosts.php
|
||||
--- nagiosql32.orig/admin/hosts.php 2012-04-17 12:09:50.082574000 +0200
|
||||
+++ nagiosql32/admin/hosts.php 2012-04-17 11:54:12.000000000 +0200
|
||||
@@ -10,10 +10,10 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Host definition
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-04-17 12:09:50 +0200 (Tue, 17 Apr 2012) $
|
||||
+// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Do, 05. Apr 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1321 $
|
||||
+// Revision : $LastChangedRevision: 1315 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
diff -uNr nagiosql32.orig/admin/services.php nagiosql32/admin/services.php
|
||||
--- nagiosql32.orig/admin/services.php 2012-04-17 12:09:50.082574000 +0200
|
||||
+++ nagiosql32/admin/services.php 2012-04-17 11:53:36.000000000 +0200
|
||||
@@ -10,10 +10,10 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Service definition
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-04-17 12:09:50 +0200 (Tue, 17 Apr 2012) $
|
||||
+// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Do, 05. Apr 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1321 $
|
||||
+// Revision : $LastChangedRevision: 1315 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
diff -uNr nagiosql32.orig/admin/templatedefinitions.php nagiosql32/admin/templatedefinitions.php
|
||||
--- nagiosql32.orig/admin/templatedefinitions.php 2012-04-05 08:11:59.091878000 +0200
|
||||
+++ nagiosql32/admin/templatedefinitions.php 2012-04-05 08:12:08.000000000 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Template definition list
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Thu, 05 Apr 2012) $
|
||||
+// Date : $LastChangedDate: 2012-04-05 08:11:59 +0200 (Do, 05. Apr 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
// Revision : $LastChangedRevision: 1315 $
|
||||
diff -uNr nagiosql32.orig/functions/config_class.php nagiosql32/functions/config_class.php
|
||||
--- nagiosql32.orig/functions/config_class.php 2013-01-10 09:46:11.799949000 +0100
|
||||
+++ nagiosql32/functions/config_class.php 2012-04-17 11:59:16.000000000 +0200
|
||||
@@ -10,10 +10,10 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Configuration Class
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Thu, 10 Jan 2013) $
|
||||
+// Date : $LastChangedDate: 2012-04-17 11:47:05 +0200 (Di, 17. Apr 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1351 $
|
||||
+// Revision : $LastChangedRevision: 1319 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -710,8 +710,6 @@
|
||||
} else {
|
||||
$this->myDataClass->writeLog(translate('Writing of the configuration failed - no dataset or not activated dataset found'));
|
||||
$this->processClassMessage(translate('Writing of the configuration failed - no dataset or not activated dataset found')."::",$this->strErrorMessage);
|
||||
- $configtp->parse();
|
||||
- $booReturn = $this->writeConfigFile($configtp->get(),$strFile,0,$intConfigID,$resConfigFile,$strConfigFile);
|
||||
return(1);
|
||||
}
|
||||
$configtp->parse();
|
||||
@@ -1254,7 +1252,7 @@
|
||||
if ($strDataValue == 2) {$strDataValue = "*,";} else {$strDataValue = "";}
|
||||
foreach ($arrDataRel AS $data) {
|
||||
if ($data['exclude'] == 0) {
|
||||
- $strDataValue .= $data['strSlave'].",";
|
||||
+ $strDataValue .= $data['strSlave'].",";
|
||||
} else if ($this->intNagVersion >=3) {
|
||||
$strDataValue .= "!".$data['strSlave'].",";
|
||||
}
|
||||
diff -uNr nagiosql32.orig/functions/import_class.php nagiosql32/functions/import_class.php
|
||||
--- nagiosql32.orig/functions/import_class.php 2012-09-18 10:44:22.198475000 +0200
|
||||
+++ nagiosql32/functions/import_class.php 2012-04-17 11:47:08.000000000 +0200
|
||||
@@ -10,10 +10,10 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Import Class
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-09-18 10:44:22 +0200 (Tue, 18 Sep 2012) $
|
||||
+// Date : $LastChangedDate: 2012-04-17 11:47:05 +0200 (Di, 17. Apr 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1346 $
|
||||
+// Revision : $LastChangedRevision: 1319 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -899,7 +899,6 @@
|
||||
$booResult = $this->myDBClass->insertData($strSQL);
|
||||
if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage;
|
||||
$intSlaveId = $this->myDBClass->intLastId;
|
||||
-
|
||||
// Special processing for serviceextinfo
|
||||
if (($strDataTable == "tbl_serviceextinfo") && ($strKey == "service_description")) {
|
||||
$strSQL = "SELECT `id` FROM `tbl_host` WHERE `host_name`='".$arrImportData['host_name']['value']."'";
|
||||
@@ -997,7 +996,7 @@
|
||||
}
|
||||
// Does the entry already exist?
|
||||
$strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` $strLink WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
- $strWhere AND `config_id`=".$this->intDomainId;
|
||||
+ $strWhere AND `active`='1' AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
$intSlaveId = $strId+0;
|
||||
@@ -1014,7 +1013,7 @@
|
||||
}
|
||||
// Insert relations
|
||||
$strSQL = "INSERT INTO `".$arrRelData['linkTable']."` SET `idMaster` = ".$intDataId.", `idSlave` = ".$intSlaveId.",
|
||||
- `exclude`=".$intExclude;
|
||||
+ `exclude`=".$intExclude;
|
||||
$booResult = $this->myDBClass->insertData($strSQL);
|
||||
if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage;
|
||||
// Keep values
|
||||
@@ -1105,7 +1104,7 @@
|
||||
// Process data values
|
||||
foreach ($arrValues AS $elem) {
|
||||
// Does the template already exist? (table 1)
|
||||
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."' AND `active`='1'
|
||||
AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
@@ -1114,7 +1113,7 @@
|
||||
}
|
||||
if ($intSlaveId == 0) {
|
||||
// Does the template already exist? (table 2)
|
||||
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName2']."` WHERE `".$arrRelData['target2']."` = '".$elem."'
|
||||
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName2']."` WHERE `".$arrRelData['target2']."` = '".$elem."' AND `active`='1'
|
||||
AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
@@ -1219,8 +1218,7 @@
|
||||
// Process data values
|
||||
foreach ($arrValues AS $elem) {
|
||||
// Does the entry already exist?
|
||||
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
- AND `config_id`=".$this->intDomainId;
|
||||
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."' AND `active`='1' AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
$intSlaveId = $strId+0;
|
||||
@@ -1422,7 +1420,7 @@
|
||||
}
|
||||
// Does the entry already exist?
|
||||
$strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
- $strWhere AND `config_id`=".$this->intDomainId;
|
||||
+ $strWhere AND `active`='1' AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
$intSlaveId = $strId+0;
|
||||
diff -uNr nagiosql32.orig/functions/prepend_adm.php nagiosql32/functions/prepend_adm.php
|
||||
--- nagiosql32.orig/functions/prepend_adm.php 2013-01-10 09:46:11.799949000 +0100
|
||||
+++ nagiosql32/functions/prepend_adm.php 2012-03-27 12:47:58.000000000 +0200
|
||||
@@ -9,14 +9,14 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Preprocessing script
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Thu, 10 Jan 2013) $
|
||||
+// Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Di, 27. Mär 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1351 $
|
||||
+// Revision : $LastChangedRevision: 1308 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//error_reporting(E_ALL);
|
||||
-error_reporting(E_ALL & ~E_STRICT);
|
||||
+error_reporting(E_ALL);
|
||||
//
|
||||
// Security Protection
|
||||
// ===================
|
||||
@@ -253,7 +253,7 @@
|
||||
$_SESSION['userid'] = $arrDataUser[0]['id'];
|
||||
$_SESSION['groupadm'] = $arrDataUser[0]['admin_enable'];
|
||||
$_SESSION['startsite'] = $_SESSION['SETS']['path']['base_url']."admin.php";
|
||||
- $_SESSION['timestamp'] = time();
|
||||
+ $_SESSION['timestamp'] = mktime();
|
||||
$_SESSION['logged_in'] = 1;
|
||||
$_SESSION['domain'] = $arrDataUser[0]['domain'];
|
||||
// Update language settings
|
||||
@@ -273,10 +273,8 @@
|
||||
}
|
||||
}
|
||||
if (($_SESSION['logged_in'] == 0) && isset($chkInsName) && ($chkInsName != "") && ($intError == 0)) {
|
||||
- $chkInsName = mysql_real_escape_string($chkInsName);
|
||||
- $chkInsPasswd = mysql_real_escape_string($chkInsPasswd);
|
||||
- $strSQL = "SELECT * FROM `tbl_user` WHERE `username`='".$chkInsName."'
|
||||
- AND `password`=MD5('".$chkInsPasswd."') AND `active`='1'";
|
||||
+ $strSQL = "SELECT * FROM `tbl_user` WHERE `username`='".mysql_real_escape_string($chkInsName)."'
|
||||
+ AND `password`=MD5('$chkInsPasswd') AND `active`='1'";
|
||||
$booReturn = $myDBClass->getDataArray($strSQL,$arrDataUser,$intDataCount);
|
||||
if ($booReturn == false) {
|
||||
$myVisClass->processMessage(translate('Error while selecting data from database:'),$strErrorMessage);
|
||||
@@ -288,7 +286,7 @@
|
||||
$_SESSION['userid'] = $arrDataUser[0]['id'];
|
||||
$_SESSION['groupadm'] = $arrDataUser[0]['admin_enable'];
|
||||
$_SESSION['startsite'] = $_SESSION['SETS']['path']['base_url'] ."admin.php";
|
||||
- $_SESSION['timestamp'] = time();
|
||||
+ $_SESSION['timestamp'] = mktime();
|
||||
$_SESSION['logged_in'] = 1;
|
||||
$_SESSION['domain'] = $arrDataUser[0]['domain'];
|
||||
// Update language settings
|
||||
@@ -329,9 +327,9 @@
|
||||
$myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage);
|
||||
} else if ($intDataCount == 1) {
|
||||
// Time expired?
|
||||
- if (time() - $_SESSION['timestamp'] > $_SESSION['SETS']['security']['logofftime']) {
|
||||
+ if (mktime() - $_SESSION['timestamp'] > $_SESSION['SETS']['security']['logofftime']) {
|
||||
// Force new login
|
||||
- $myDataClass->writeLog(translate('Session timeout reached - Seconds:')." ".(time() - $_SESSION['timestamp']." - User: ".$_SESSION['username']));
|
||||
+ $myDataClass->writeLog(translate('Session timeout reached - Seconds:')." ".(mktime() - $_SESSION['timestamp']." - User: ".$_SESSION['username']));
|
||||
$_SESSION['logged_in'] = 0;
|
||||
|
||||
header("Location: ".$_SESSION['SETS']['path']['protocol']."://".$_SERVER['HTTP_HOST'].$_SESSION['SETS']['path']['base_url']."index.php");
|
||||
@@ -347,7 +345,7 @@
|
||||
}
|
||||
}
|
||||
// Update login time
|
||||
- $_SESSION['timestamp'] = time();
|
||||
+ $_SESSION['timestamp'] = mktime();
|
||||
if (isset($preContent) && ($preContent == "index.tpl.htm")) {
|
||||
header("Location: ".$_SESSION['SETS']['path']['protocol']."://".$_SERVER['HTTP_HOST'].$_SESSION['startsite']);
|
||||
}
|
||||
diff -uNr nagiosql32.orig/functions/prepend_content.php nagiosql32/functions/prepend_content.php
|
||||
--- nagiosql32.orig/functions/prepend_content.php 2012-05-03 15:15:32.673020000 +0200
|
||||
+++ nagiosql32/functions/prepend_content.php 2012-04-04 07:30:16.000000000 +0200
|
||||
@@ -144,14 +144,14 @@
|
||||
$chkButValue3 = isset($_POST['butValue3']) ? $_POST['butValue3'] : ""; // Common button value
|
||||
$chkButValue4 = isset($_POST['butValue4']) ? $_POST['butValue4'] : ""; // Common button value
|
||||
$chkButValue5 = isset($_POST['butValue5']) ? $_POST['butValue5'] : ""; // Common button value
|
||||
-$chkTfNullVal1 = (isset($_POST['tfNullVal1']) && ($_POST['tfNullVal1'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal1'])+0 : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal2 = (isset($_POST['tfNullVal2']) && ($_POST['tfNullVal2'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal2'])+0 : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal3 = (isset($_POST['tfNullVal3']) && ($_POST['tfNullVal3'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal3'])+0 : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal4 = (isset($_POST['tfNullVal4']) && ($_POST['tfNullVal4'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal4'])+0 : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal5 = (isset($_POST['tfNullVal5']) && ($_POST['tfNullVal5'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal5'])+0 : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal6 = (isset($_POST['tfNullVal6']) && ($_POST['tfNullVal6'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal6'])+0 : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal7 = (isset($_POST['tfNullVal7']) && ($_POST['tfNullVal7'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal7'])+0 : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal8 = (isset($_POST['tfNullVal8']) && ($_POST['tfNullVal8'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal8'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal1 = (isset($_POST['tfNullVal1']) && ($_POST['tfNullVal1'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal1']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal2 = (isset($_POST['tfNullVal2']) && ($_POST['tfNullVal2'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal2']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal3 = (isset($_POST['tfNullVal3']) && ($_POST['tfNullVal3'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal3']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal4 = (isset($_POST['tfNullVal4']) && ($_POST['tfNullVal4'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal4']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal5 = (isset($_POST['tfNullVal5']) && ($_POST['tfNullVal5'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal5']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal6 = (isset($_POST['tfNullVal6']) && ($_POST['tfNullVal6'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal6']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal7 = (isset($_POST['tfNullVal7']) && ($_POST['tfNullVal7'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal7']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal8 = (isset($_POST['tfNullVal8']) && ($_POST['tfNullVal8'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal8']) : "NULL"; // Common text NULL field value
|
||||
//
|
||||
// Quote special characters
|
||||
// ==========================
|
||||
diff -uNr nagiosql32.orig/templates/admin/user.tpl.htm nagiosql32/templates/admin/user.tpl.htm
|
||||
--- nagiosql32.orig/templates/admin/user.tpl.htm 2012-03-27 12:47:56.208241000 +0200
|
||||
+++ nagiosql32/templates/admin/user.tpl.htm 2012-03-27 12:47:58.000000000 +0200
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- Project : NagiosQL -->
|
||||
<!-- Component : User template -->
|
||||
<!-- Website : http://www.nagiosql.org -->
|
||||
-<!-- Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Tue, 27 Mar 2012) $ -->
|
||||
+<!-- Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Di, 27. Mär 2012) $ -->
|
||||
<!-- Author : $LastChangedBy: martin $ -->
|
||||
<!-- Version : 3.2.0 -->
|
||||
<!-- Revision : $LastChangedRevision: 1308 $ -->
|
||||
248
debian/patches/20_service_pack_2_additional_fixes_only.patch
vendored
Normal file
248
debian/patches/20_service_pack_2_additional_fixes_only.patch
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
diff -uNr nagiosql32.orig/admin/verify.php nagiosql32/admin/verify.php
|
||||
--- nagiosql32.orig/admin/verify.php 2012-09-24 14:42:29.052342000 +0200
|
||||
+++ nagiosql32/admin/verify.php 2012-09-24 13:42:30.000000000 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Configuration verification
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-09-24 14:42:29 +0200 (Mon, 24 Sep 2012) $
|
||||
+// Date : $LastChangedDate: 2012-09-24 14:42:29 +0200 (Mo, 24. Sep 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
// Revision : $LastChangedRevision: 1347 $
|
||||
diff -uNr nagiosql32.orig/functions/config_class.php nagiosql32/functions/config_class.php
|
||||
--- nagiosql32.orig/functions/config_class.php 2017-05-20 19:36:57.228000000 +0200
|
||||
+++ nagiosql32/functions/config_class.php 2013-01-10 09:46:14.000000000 +0100
|
||||
@@ -10,10 +10,10 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Configuration Class
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-04-17 11:47:05 +0200 (Di, 17. Apr 2012) $
|
||||
+// Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Do, 10. Jan 2013) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1319 $
|
||||
+// Revision : $LastChangedRevision: 1351 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -710,6 +710,8 @@
|
||||
} else {
|
||||
$this->myDataClass->writeLog(translate('Writing of the configuration failed - no dataset or not activated dataset found'));
|
||||
$this->processClassMessage(translate('Writing of the configuration failed - no dataset or not activated dataset found')."::",$this->strErrorMessage);
|
||||
+ $configtp->parse();
|
||||
+ $booReturn = $this->writeConfigFile($configtp->get(),$strFile,0,$intConfigID,$resConfigFile,$strConfigFile);
|
||||
return(1);
|
||||
}
|
||||
$configtp->parse();
|
||||
@@ -1252,7 +1254,7 @@
|
||||
if ($strDataValue == 2) {$strDataValue = "*,";} else {$strDataValue = "";}
|
||||
foreach ($arrDataRel AS $data) {
|
||||
if ($data['exclude'] == 0) {
|
||||
- $strDataValue .= $data['strSlave'].",";
|
||||
+ $strDataValue .= $data['strSlave'].",";
|
||||
} else if ($this->intNagVersion >=3) {
|
||||
$strDataValue .= "!".$data['strSlave'].",";
|
||||
}
|
||||
diff -uNr nagiosql32.orig/functions/import_class.php nagiosql32/functions/import_class.php
|
||||
--- nagiosql32.orig/functions/import_class.php 2017-05-20 19:36:57.228000000 +0200
|
||||
+++ nagiosql32/functions/import_class.php 2012-09-18 09:44:24.000000000 +0200
|
||||
@@ -10,10 +10,10 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Import Class
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-04-17 11:47:05 +0200 (Di, 17. Apr 2012) $
|
||||
+// Date : $LastChangedDate: 2012-09-18 10:44:22 +0200 (Di, 18. Sep 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1319 $
|
||||
+// Revision : $LastChangedRevision: 1346 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -899,6 +899,7 @@
|
||||
$booResult = $this->myDBClass->insertData($strSQL);
|
||||
if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage;
|
||||
$intSlaveId = $this->myDBClass->intLastId;
|
||||
+
|
||||
// Special processing for serviceextinfo
|
||||
if (($strDataTable == "tbl_serviceextinfo") && ($strKey == "service_description")) {
|
||||
$strSQL = "SELECT `id` FROM `tbl_host` WHERE `host_name`='".$arrImportData['host_name']['value']."'";
|
||||
@@ -996,7 +997,7 @@
|
||||
}
|
||||
// Does the entry already exist?
|
||||
$strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` $strLink WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
- $strWhere AND `active`='1' AND `config_id`=".$this->intDomainId;
|
||||
+ $strWhere AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
$intSlaveId = $strId+0;
|
||||
@@ -1013,7 +1014,7 @@
|
||||
}
|
||||
// Insert relations
|
||||
$strSQL = "INSERT INTO `".$arrRelData['linkTable']."` SET `idMaster` = ".$intDataId.", `idSlave` = ".$intSlaveId.",
|
||||
- `exclude`=".$intExclude;
|
||||
+ `exclude`=".$intExclude;
|
||||
$booResult = $this->myDBClass->insertData($strSQL);
|
||||
if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage;
|
||||
// Keep values
|
||||
@@ -1104,7 +1105,7 @@
|
||||
// Process data values
|
||||
foreach ($arrValues AS $elem) {
|
||||
// Does the template already exist? (table 1)
|
||||
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."' AND `active`='1'
|
||||
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
@@ -1113,7 +1114,7 @@
|
||||
}
|
||||
if ($intSlaveId == 0) {
|
||||
// Does the template already exist? (table 2)
|
||||
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName2']."` WHERE `".$arrRelData['target2']."` = '".$elem."' AND `active`='1'
|
||||
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName2']."` WHERE `".$arrRelData['target2']."` = '".$elem."'
|
||||
AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
@@ -1218,7 +1219,8 @@
|
||||
// Process data values
|
||||
foreach ($arrValues AS $elem) {
|
||||
// Does the entry already exist?
|
||||
- $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."' AND `active`='1' AND `config_id`=".$this->intDomainId;
|
||||
+ $strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
+ AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
$intSlaveId = $strId+0;
|
||||
@@ -1420,7 +1422,7 @@
|
||||
}
|
||||
// Does the entry already exist?
|
||||
$strSQL = "SELECT `id` FROM `".$arrRelData['tableName1']."` WHERE `".$arrRelData['target1']."` = '".$elem."'
|
||||
- $strWhere AND `active`='1' AND `config_id`=".$this->intDomainId;
|
||||
+ $strWhere AND `config_id`=".$this->intDomainId;
|
||||
$strId = $this->myDBClass->getFieldData($strSQL);
|
||||
if ($strId != "") {
|
||||
$intSlaveId = $strId+0;
|
||||
diff -uNr nagiosql32.orig/functions/nag_class.php nagiosql32/functions/nag_class.php
|
||||
--- nagiosql32.orig/functions/nag_class.php 2012-10-03 10:00:02.307645000 +0200
|
||||
+++ nagiosql32/functions/nag_class.php 2012-10-03 09:00:04.000000000 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Visualization Class
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-10-03 10:00:02 +0200 (Wed, 03 Oct 2012) $
|
||||
+// Date : $LastChangedDate: 2012-10-03 10:00:02 +0200 (Mi, 03. Okt 2012) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
// Revision : $LastChangedRevision: 1349 $
|
||||
diff -uNr nagiosql32.orig/functions/prepend_adm.php nagiosql32/functions/prepend_adm.php
|
||||
--- nagiosql32.orig/functions/prepend_adm.php 2017-05-20 19:36:57.232000000 +0200
|
||||
+++ nagiosql32/functions/prepend_adm.php 2013-01-10 09:46:14.000000000 +0100
|
||||
@@ -9,14 +9,14 @@
|
||||
// Project : NagiosQL
|
||||
// Component : Preprocessing script
|
||||
// Website : http://www.nagiosql.org
|
||||
-// Date : $LastChangedDate: 2012-03-27 12:47:56 +0200 (Di, 27. Mär 2012) $
|
||||
+// Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Do, 10. Jan 2013) $
|
||||
// Author : $LastChangedBy: martin $
|
||||
// Version : 3.2.0
|
||||
-// Revision : $LastChangedRevision: 1308 $
|
||||
+// Revision : $LastChangedRevision: 1351 $
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//error_reporting(E_ALL);
|
||||
-error_reporting(E_ALL);
|
||||
+error_reporting(E_ALL & ~E_STRICT);
|
||||
//
|
||||
// Security Protection
|
||||
// ===================
|
||||
@@ -253,7 +253,7 @@
|
||||
$_SESSION['userid'] = $arrDataUser[0]['id'];
|
||||
$_SESSION['groupadm'] = $arrDataUser[0]['admin_enable'];
|
||||
$_SESSION['startsite'] = $_SESSION['SETS']['path']['base_url']."admin.php";
|
||||
- $_SESSION['timestamp'] = mktime();
|
||||
+ $_SESSION['timestamp'] = time();
|
||||
$_SESSION['logged_in'] = 1;
|
||||
$_SESSION['domain'] = $arrDataUser[0]['domain'];
|
||||
// Update language settings
|
||||
@@ -273,8 +273,10 @@
|
||||
}
|
||||
}
|
||||
if (($_SESSION['logged_in'] == 0) && isset($chkInsName) && ($chkInsName != "") && ($intError == 0)) {
|
||||
- $strSQL = "SELECT * FROM `tbl_user` WHERE `username`='".mysql_real_escape_string($chkInsName)."'
|
||||
- AND `password`=MD5('$chkInsPasswd') AND `active`='1'";
|
||||
+ $chkInsName = mysql_real_escape_string($chkInsName);
|
||||
+ $chkInsPasswd = mysql_real_escape_string($chkInsPasswd);
|
||||
+ $strSQL = "SELECT * FROM `tbl_user` WHERE `username`='".$chkInsName."'
|
||||
+ AND `password`=MD5('".$chkInsPasswd."') AND `active`='1'";
|
||||
$booReturn = $myDBClass->getDataArray($strSQL,$arrDataUser,$intDataCount);
|
||||
if ($booReturn == false) {
|
||||
$myVisClass->processMessage(translate('Error while selecting data from database:'),$strErrorMessage);
|
||||
@@ -286,7 +288,7 @@
|
||||
$_SESSION['userid'] = $arrDataUser[0]['id'];
|
||||
$_SESSION['groupadm'] = $arrDataUser[0]['admin_enable'];
|
||||
$_SESSION['startsite'] = $_SESSION['SETS']['path']['base_url'] ."admin.php";
|
||||
- $_SESSION['timestamp'] = mktime();
|
||||
+ $_SESSION['timestamp'] = time();
|
||||
$_SESSION['logged_in'] = 1;
|
||||
$_SESSION['domain'] = $arrDataUser[0]['domain'];
|
||||
// Update language settings
|
||||
@@ -327,9 +329,9 @@
|
||||
$myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage);
|
||||
} else if ($intDataCount == 1) {
|
||||
// Time expired?
|
||||
- if (mktime() - $_SESSION['timestamp'] > $_SESSION['SETS']['security']['logofftime']) {
|
||||
+ if (time() - $_SESSION['timestamp'] > $_SESSION['SETS']['security']['logofftime']) {
|
||||
// Force new login
|
||||
- $myDataClass->writeLog(translate('Session timeout reached - Seconds:')." ".(mktime() - $_SESSION['timestamp']." - User: ".$_SESSION['username']));
|
||||
+ $myDataClass->writeLog(translate('Session timeout reached - Seconds:')." ".(time() - $_SESSION['timestamp']." - User: ".$_SESSION['username']));
|
||||
$_SESSION['logged_in'] = 0;
|
||||
|
||||
header("Location: ".$_SESSION['SETS']['path']['protocol']."://".$_SERVER['HTTP_HOST'].$_SESSION['SETS']['path']['base_url']."index.php");
|
||||
@@ -345,7 +347,7 @@
|
||||
}
|
||||
}
|
||||
// Update login time
|
||||
- $_SESSION['timestamp'] = mktime();
|
||||
+ $_SESSION['timestamp'] = time();
|
||||
if (isset($preContent) && ($preContent == "index.tpl.htm")) {
|
||||
header("Location: ".$_SESSION['SETS']['path']['protocol']."://".$_SERVER['HTTP_HOST'].$_SESSION['startsite']);
|
||||
}
|
||||
diff -uNr nagiosql32.orig/functions/prepend_content.php nagiosql32/functions/prepend_content.php
|
||||
--- nagiosql32.orig/functions/prepend_content.php 2017-05-20 19:36:57.232000000 +0200
|
||||
+++ nagiosql32/functions/prepend_content.php 2012-05-03 08:10:06.000000000 +0200
|
||||
@@ -144,14 +144,14 @@
|
||||
$chkButValue3 = isset($_POST['butValue3']) ? $_POST['butValue3'] : ""; // Common button value
|
||||
$chkButValue4 = isset($_POST['butValue4']) ? $_POST['butValue4'] : ""; // Common button value
|
||||
$chkButValue5 = isset($_POST['butValue5']) ? $_POST['butValue5'] : ""; // Common button value
|
||||
-$chkTfNullVal1 = (isset($_POST['tfNullVal1']) && ($_POST['tfNullVal1'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal1']) : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal2 = (isset($_POST['tfNullVal2']) && ($_POST['tfNullVal2'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal2']) : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal3 = (isset($_POST['tfNullVal3']) && ($_POST['tfNullVal3'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal3']) : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal4 = (isset($_POST['tfNullVal4']) && ($_POST['tfNullVal4'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal4']) : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal5 = (isset($_POST['tfNullVal5']) && ($_POST['tfNullVal5'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal5']) : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal6 = (isset($_POST['tfNullVal6']) && ($_POST['tfNullVal6'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal6']) : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal7 = (isset($_POST['tfNullVal7']) && ($_POST['tfNullVal7'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal7']) : "NULL"; // Common text NULL field value
|
||||
-$chkTfNullVal8 = (isset($_POST['tfNullVal8']) && ($_POST['tfNullVal8'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal8']) : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal1 = (isset($_POST['tfNullVal1']) && ($_POST['tfNullVal1'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal1'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal2 = (isset($_POST['tfNullVal2']) && ($_POST['tfNullVal2'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal2'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal3 = (isset($_POST['tfNullVal3']) && ($_POST['tfNullVal3'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal3'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal4 = (isset($_POST['tfNullVal4']) && ($_POST['tfNullVal4'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal4'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal5 = (isset($_POST['tfNullVal5']) && ($_POST['tfNullVal5'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal5'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal6 = (isset($_POST['tfNullVal6']) && ($_POST['tfNullVal6'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal6'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal7 = (isset($_POST['tfNullVal7']) && ($_POST['tfNullVal7'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal7'])+0 : "NULL"; // Common text NULL field value
|
||||
+$chkTfNullVal8 = (isset($_POST['tfNullVal8']) && ($_POST['tfNullVal8'] != "")) ? $myVisClass->checkNull($_POST['tfNullVal8'])+0 : "NULL"; // Common text NULL field value
|
||||
//
|
||||
// Quote special characters
|
||||
// ==========================
|
||||
diff -uNr nagiosql32.orig/templates/admin/servicedependencies.tpl.htm nagiosql32/templates/admin/servicedependencies.tpl.htm
|
||||
--- nagiosql32.orig/templates/admin/servicedependencies.tpl.htm 2013-01-10 09:46:11.799949000 +0100
|
||||
+++ nagiosql32/templates/admin/servicedependencies.tpl.htm 2013-01-10 09:46:14.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- Project : NagiosQL -->
|
||||
<!-- Component : servicedependencies template -->
|
||||
<!-- Website : http://www.nagiosql.org -->
|
||||
-<!-- Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Thu, 10 Jan 2013) $ -->
|
||||
+<!-- Date : $LastChangedDate: 2013-01-10 09:46:11 +0100 (Do, 10. Jan 2013) $ -->
|
||||
<!-- Author : $LastChangedBy: martin $ -->
|
||||
<!-- Version : 3.2.0 -->
|
||||
<!-- Revision : $LastChangedRevision: 1351 $ -->
|
||||
1494
debian/patches/30_service_pack_3_additional_fixes_only.patch
vendored
Normal file
1494
debian/patches/30_service_pack_3_additional_fixes_only.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
68
debian/patches/31_service_pack_3_additional_fixes_only_mysqli.patch
vendored
Normal file
68
debian/patches/31_service_pack_3_additional_fixes_only_mysqli.patch
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
diff -uNr nagiosql32/functions/data_class.php nsql/functions/data_class.php
|
||||
--- nagiosql32/functions/data_class.php 2017-05-21 04:16:26.144000000 +0200
|
||||
+++ nsql/functions/data_class.php 2017-01-06 14:55:10.000000000 +0100
|
||||
@@ -110,7 +110,7 @@
|
||||
$strSQL = "DELETE FROM `".$strTableName."` WHERE `id` = $intDataId $strNoDelete";
|
||||
$booReturn = $this->myDBClass->insertData($strSQL);
|
||||
if ($booReturn == false) {
|
||||
- $this->processClassMessage(translate('Delete failed because a database error:')."::".mysql_error()."::",$this->strInfoMessage);
|
||||
+ $this->processClassMessage(translate('Delete failed because a database error:')."::".mysqli_error()."::",$this->strInfoMessage);
|
||||
return(1);
|
||||
} else if ($this->myDBClass->intAffectedRows == 0) {
|
||||
$this->processClassMessage(translate('No data deleted. Probably the dataset does not exist or it is protected from delete.')."::",$this->strErrorMessage);
|
||||
@@ -134,7 +134,7 @@
|
||||
$strSQL = "DELETE FROM `".$strTableName."` WHERE `id` = ".$elem['id'];
|
||||
$booReturn = $this->myDBClass->insertData($strSQL);
|
||||
if ($booReturn == false) {
|
||||
- $this->processClassMessage(translate('Delete failed because a database error:')."::".mysql_error()."::",$this->strInfoMessage);
|
||||
+ $this->processClassMessage(translate('Delete failed because a database error:')."::".mysqli_error()."::",$this->strInfoMessage);
|
||||
return(1);
|
||||
} else {
|
||||
$intDeleteCount = $intDeleteCount + $this->myDBClass->intAffectedRows;
|
||||
diff -uNr nagiosql32/functions/import_class.php nsql/functions/import_class.php
|
||||
--- nagiosql32/functions/import_class.php 2017-05-21 04:16:11.976000000 +0200
|
||||
+++ nsql/functions/import_class.php 2017-01-04 13:11:32.000000000 +0100
|
||||
@@ -632,8 +632,8 @@
|
||||
if ($strKeyField == "") {$strKey = $strConfigName;} else {$strKey = $strKeyField;}
|
||||
if ($booResult != true) {
|
||||
$this->strErrorMessage .= $this->myDBClass->strErrorMessage;
|
||||
- if ($strKeyField != "") $this->strErrorMessage .= translate('Entry')." <b class=\"blackmessage\">".$strKey." -> ".$arrImportData[$strKeyField]['value']."</b> ".translate('inside')." <b class=\"blackmessage\">".$strTable."</b> ".translate('could not be inserted:')." ".mysql_error()."::";
|
||||
- if ($strKeyField == "") $this->strErrorMessage .= translate('Entry')." <b class=\"blackmessage\">".$strTemp1." -> ".$strTemp2.translate('inside')."</b> ".$strTable." <b class=\"blackmessage\">".$strTable."</b> ".translate('could not be inserted:')." ".mysql_error()."::";
|
||||
+ if ($strKeyField != "") $this->strErrorMessage .= translate('Entry')." <b class=\"blackmessage\">".$strKey." -> ".$arrImportData[$strKeyField]['value']."</b> ".translate('inside')." <b class=\"blackmessage\">".$strTable."</b> ".translate('could not be inserted:')." ".mysqli_error()."::";
|
||||
+ if ($strKeyField == "") $this->strErrorMessage .= translate('Entry')." <b class=\"blackmessage\">".$strTemp1." -> ".$strTemp2.translate('inside')."</b> ".$strTable." <b class=\"blackmessage\">".$strTable."</b> ".translate('could not be inserted:')." ".mysqli_error()."::";
|
||||
return(1);
|
||||
} else {
|
||||
if ($strKeyField != "") $this->strInfoMessage .= translate('Entry')." <b class=\"blackmessage\">".$strKey." -> ".$arrImportData[$strKeyField]['value']."</b> ".translate('inside')." <b class=\"blackmessage\">".$strTable."</b> ".translate('successfully inserted')."::";
|
||||
@@ -1236,7 +1236,7 @@
|
||||
// Update data in master table
|
||||
$arrCommand[0] = $intSlaveId;
|
||||
$strValue = implode("!",$arrCommand);
|
||||
- $strSQL = "UPDATE `".$strDataTable."` SET `".$arrRelData['fieldName']."` = '".mysql_real_escape_string($strValue)."' WHERE `id` = ".$intDataId;
|
||||
+ $strSQL = "UPDATE `".$strDataTable."` SET `".$arrRelData['fieldName']."` = '".mysqli_real_escape_string($strValue)."' WHERE `id` = ".$intDataId;
|
||||
$booResult = $this->myDBClass->insertData($strSQL);
|
||||
if ($booResult == false) $this->strErrorMessage .= $this->myDBClass->strErrorMessage;
|
||||
}
|
||||
diff -uNr nagiosql32/functions/mysql_class.php nsql/functions/mysql_class.php
|
||||
--- nagiosql32/functions/mysql_class.php 2017-05-21 04:16:26.144000000 +0200
|
||||
+++ nsql/functions/mysql_class.php 2017-01-06 14:55:18.000000000 +0100
|
||||
@@ -330,7 +330,7 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
function dbdisconnect() {
|
||||
- @mysql_close($this->strDBId);
|
||||
+ @mysqli_close($this->strDBId);
|
||||
return true;
|
||||
}
|
||||
|
||||
diff -uNr nagiosql32/functions/prepend_content.php nsql/functions/prepend_content.php
|
||||
--- nagiosql32/functions/prepend_content.php 2017-05-21 04:16:11.980000000 +0200
|
||||
+++ nsql/functions/prepend_content.php 2017-01-06 15:15:59.000000000 +0100
|
||||
@@ -321,7 +321,7 @@
|
||||
if ($intSuccess != 0) $myVisClass->processMessage(translate('Configuration files successfully written!'),$strInfoMessage);
|
||||
if ($intError != 0) $myVisClass->processMessage(translate('Some configuration files were not written. Dataset not activated, not found or you do not have write permission!'),$strErrorMessage);
|
||||
} else if ($preTableName == 'tbl_service') {
|
||||
- $strSQL = "SELECT `id`, `$preKeyField` FROM `$preTableName` WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1' GROUP BY `$preKeyField`";
|
||||
+ $strSQL = "SELECT `id`, `$preKeyField` FROM `$preTableName` WHERE $strDomainWhere AND `access_group` IN ($strAccess) AND `active`='1' GROUP BY `$preKeyField`, `id`";
|
||||
$myDBClass->getDataArray($strSQL,$arrData,$intDataCount);
|
||||
if ($booReturn == false) $myVisClass->processMessage($myDBClass->strErrorMessage,$strErrorMessage);
|
||||
if ($booReturn && ($intDataCount != 0)) {
|
||||
94
debian/patches/40_settings_php.patch
vendored
Normal file
94
debian/patches/40_settings_php.patch
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
diff -uNr nagiosql32.orig/admin/settings.php nagiosql32/admin/settings.php
|
||||
--- nagiosql32.orig/admin/settings.php 2012-02-21 14:10:41.579203000 +0100
|
||||
+++ nagiosql32/admin/settings.php 2017-05-20 20:02:31.568000000 +0200
|
||||
@@ -92,8 +92,8 @@
|
||||
}
|
||||
}
|
||||
// Write db settings to file
|
||||
- if (is_writable($strBasePath."config/settings.php")) {
|
||||
- $filSettings = fopen($strBasePath."config/settings.php","w");
|
||||
+ if (is_writable("/etc/nagiosql/settings.php")) {
|
||||
+ $filSettings = fopen("/etc/nagiosql/settings.php","w");
|
||||
if ($filSettings) {
|
||||
fwrite($filSettings,"<?php\n");
|
||||
fwrite($filSettings,"exit;\n");
|
||||
diff -uNr nagiosql32.orig/admin/support.php nagiosql32/admin/support.php
|
||||
--- nagiosql32.orig/admin/support.php 2012-03-08 08:40:12.245037000 +0100
|
||||
+++ nagiosql32/admin/support.php 2017-05-20 20:01:59.792000000 +0200
|
||||
@@ -211,7 +211,7 @@
|
||||
}
|
||||
// File access checks
|
||||
$conttp->setVariable("RW_CONFIG",translate("Read/Write access:")." settings.php");
|
||||
-$strConfigFile = "../config/settings.php";
|
||||
+$strConfigFile = "/etc/nagiosql/settings.php";
|
||||
if (file_exists($strConfigFile) && is_readable($strConfigFile) && is_writable($strConfigFile)) {
|
||||
$conttp->setVariable("RW_CONFIG_CLASS","checkgreen");
|
||||
$conttp->setVariable("RW_CONFIG_RESULT",translate("ok"));
|
||||
diff -uNr nagiosql32.orig/functions/prepend_adm.php nagiosql32/functions/prepend_adm.php
|
||||
--- nagiosql32.orig/functions/prepend_adm.php 2017-05-20 20:08:12.900000000 +0200
|
||||
+++ nagiosql32/functions/prepend_adm.php 2017-05-20 20:04:18.164000000 +0200
|
||||
@@ -77,14 +77,14 @@
|
||||
//
|
||||
// Start installer
|
||||
// ===============
|
||||
-$preIniFile = $preBasePath.'config/settings.php';
|
||||
+$preIniFile = '/etc/nagiosql/settings.php';
|
||||
if (!file_exists($preIniFile) OR ! is_readable($preIniFile)) {
|
||||
header("Location: ".$preBaseURL."install/index.php");
|
||||
}
|
||||
//
|
||||
// Read file settings
|
||||
// ==================
|
||||
-$SETS = parse_ini_file($preBasePath.'config/settings.php',true);
|
||||
+$SETS = parse_ini_file('/etc/nagiosql/settings.php',true);
|
||||
if (!isset($_SESSION['SETS']['db'])) $_SESSION['SETS']['db'] = $SETS['db'];
|
||||
//
|
||||
// Include external function/class files - part 1
|
||||
diff -uNr nagiosql32.orig/functions/prepend_scripting.php nagiosql32/functions/prepend_scripting.php
|
||||
--- nagiosql32.orig/functions/prepend_scripting.php 2012-02-29 09:54:45.611973000 +0100
|
||||
+++ nagiosql32/functions/prepend_scripting.php 2017-05-20 20:03:34.636000000 +0200
|
||||
@@ -42,7 +42,7 @@
|
||||
// Read settings file
|
||||
// ==================
|
||||
$preBasePath = str_replace("scripts","",getcwd());
|
||||
-$preIniFile = $preBasePath.'config/settings.php';
|
||||
+$preIniFile = '/etc/nagiosql/settings.php';
|
||||
//
|
||||
// Read file settings
|
||||
// ==================
|
||||
diff -uNr nagiosql32.orig/install/functions/install_class.php nagiosql32/install/functions/install_class.php
|
||||
--- nagiosql32.orig/install/functions/install_class.php 2017-05-20 20:08:12.900000000 +0200
|
||||
+++ nagiosql32/install/functions/install_class.php 2017-05-20 20:05:46.564000000 +0200
|
||||
@@ -659,7 +659,7 @@
|
||||
$strBasePath = substr(realpath('.'),0,-7);
|
||||
$strE_ID = error_reporting();
|
||||
error_reporting(0);
|
||||
- $filSettings = fopen($strBasePath."config/settings.php","w");
|
||||
+ $filSettings = fopen("/etc/nagiosql/settings.php","w");
|
||||
error_reporting($strE_ID);
|
||||
if ($filSettings) {
|
||||
// Write Database Configuration into settings.php
|
||||
diff -uNr nagiosql32.orig/install/index.php nagiosql32/install/index.php
|
||||
--- nagiosql32.orig/install/index.php 2017-05-20 20:08:12.904000000 +0200
|
||||
+++ nagiosql32/install/index.php 2017-05-20 20:04:52.492000000 +0200
|
||||
@@ -27,7 +27,7 @@
|
||||
$preContent = "templates/index.tpl.htm";
|
||||
$preEncode = 'utf-8';
|
||||
$preLocale = "../config/locale";
|
||||
-$filConfig = "../config/settings.php";
|
||||
+$filConfig = "/etc/nagiosql/settings.php";
|
||||
$preDBType = "mysqli";
|
||||
$strLangOpt = "";
|
||||
$intError = 0;
|
||||
diff -uNr nagiosql32.orig/install/step1.php nagiosql32/install/step1.php
|
||||
--- nagiosql32.orig/install/step1.php 2017-05-20 20:08:12.904000000 +0200
|
||||
+++ nagiosql32/install/step1.php 2017-05-20 20:05:19.420000000 +0200
|
||||
@@ -186,7 +186,7 @@
|
||||
}
|
||||
$arrTemplate['CHECK_5_CONTENT_1'] = $strHTML;
|
||||
// File access checks
|
||||
-$strConfigFile = "../config/settings.php";
|
||||
+$strConfigFile = "/etc/nagiosql/settings.php";
|
||||
if (file_exists($strConfigFile) && is_readable($strConfigFile)) {
|
||||
$arrTemplate['CHECK_6_CONTENT_1'] = $strHTMLPart1.translate("Read test on settings file (config/settings.php)").$strHTMLPart4.translate("OK")."</span><br>\n";
|
||||
} else if (file_exists($strConfigFile)&& !is_readable($strConfigFile)) {
|
||||
12
debian/patches/50_nagios4_debian_pathes.patch
vendored
Normal file
12
debian/patches/50_nagios4_debian_pathes.patch
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
diff -uNr nagiosql32.orig/install/sql/nagiosQL_v32_db_mysql.sql nagiosql32/install/sql/nagiosQL_v32_db_mysql.sql
|
||||
--- nagiosql32.orig/install/sql/nagiosQL_v32_db_mysql.sql 2012-03-01 12:24:44.682770000 +0100
|
||||
+++ nagiosql32/install/sql/nagiosQL_v32_db_mysql.sql 2017-05-20 20:31:30.760000000 +0200
|
||||
@@ -83,7 +83,7 @@
|
||||
-- Datasets for table `tbl_configtarget`
|
||||
--
|
||||
|
||||
-INSERT INTO `tbl_configtarget` (`id`, `target`, `alias`, `server`, `method`, `user`, `password`, `ssh_key_path`, `basedir`, `hostconfig`, `serviceconfig`, `backupdir`, `hostbackup`, `servicebackup`, `nagiosbasedir`, `importdir`, `picturedir`, `commandfile`, `binaryfile`, `pidfile`, `conffile`, `version`, `access_group`, `active`, `nodelete`, `last_modified`) VALUES(1, 'localhost', 'Local installation', 'localhost', '1', '', '', '', '/etc/nagiosql/', '/etc/nagiosql/hosts/', '/etc/nagiosql/services/', '/etc/nagiosql/backup/', '/etc/nagiosql/backup/hosts/', '/etc/nagiosql/backup/services/', '/etc/nagiosql/', '/opt/nagios/etc/objects/', '', '/var/nagios/rw/nagios.cmd', '/opt/nagios/bin/nagios', '/var/nagios/nagios.lock', '/etc/nagiosql/nagios.cfg', 3, 0, '1', '1', NOW());
|
||||
+INSERT INTO `tbl_configtarget` (`id`, `target`, `alias`, `server`, `method`, `user`, `password`, `ssh_key_path`, `basedir`, `hostconfig`, `serviceconfig`, `backupdir`, `hostbackup`, `servicebackup`, `nagiosbasedir`, `importdir`, `picturedir`, `commandfile`, `binaryfile`, `pidfile`, `conffile`, `version`, `access_group`, `active`, `nodelete`, `last_modified`) VALUES(1, 'localhost', 'Local installation', 'localhost', '1', '', '', '', '/etc/nagiosql/', '/etc/nagiosql/hosts/', '/etc/nagiosql/services/', '/etc/nagiosql/backup/', '/etc/nagiosql/backup/hosts/', '/etc/nagiosql/backup/services/', '/etc/nagiosql/', '/etc/nagios4/objects/', '', '/var/lib/nagios4/rw/nagios.cmd', '/usr/sbin/nagios4', '/var/run/nagios4/nagios4.pid', '/etc/nagios4/nagios.cfg', 3, 0, '1', '1', NOW());
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
34
debian/patches/60_nagios4_configs_readonly.patch
vendored
Normal file
34
debian/patches/60_nagios4_configs_readonly.patch
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
--- nagiosql-3.0.3.orig/debian/patches/30_nagios3_configs_readonly.dpatch
|
||||
+++ nagiosql-3.0.3/debian/patches/30_nagios3_configs_readonly.dpatch
|
||||
@@ -0,0 +1,31 @@
|
||||
+#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||
+## 30_nagios3_configs_readonly.dpatch by <wob@swobspace.eli.st-elisabeth.de>
|
||||
+##
|
||||
+## All lines beginning with `## DP:' are a description of the patch.
|
||||
+## DP: No description.
|
||||
+
|
||||
+@DPATCH@
|
||||
+diff -urNad nagiosql-3.0.3~/nagiosql3/admin/domain.php nagiosql-3.0.3/nagiosql3/admin/domain.php
|
||||
+--- nagiosql-3.0.3~/nagiosql3/admin/domain.php 2009-04-28 15:02:27.000000000 +0200
|
||||
++++ nagiosql-3.0.3/nagiosql3/admin/domain.php 2009-06-14 14:18:09.000000000 +0200
|
||||
+@@ -154,11 +154,11 @@
|
||||
+ }
|
||||
+ // Nagios base configuration files
|
||||
+ if (isset($chkInsNagiosBaseDir)) {
|
||||
+- if (! is_writable($chkInsNagiosBaseDir."nagios.cfg")) {
|
||||
++ if (! is_readable($chkInsNagiosBaseDir."nagios.cfg")) {
|
||||
+ $permissionerror .= $chkInsNagiosBaseDir."nagios.cfg ".gettext("is not writeable")."<br>";
|
||||
+ $isanerror=1;
|
||||
+ }
|
||||
+- if (! is_writable($chkInsNagiosBaseDir."cgi.cfg")) {
|
||||
++ if (! is_readable($chkInsNagiosBaseDir."cgi.cfg")) {
|
||||
+ $permissionerror .= $chkInsNagiosBaseDir."cgi.cfg ".gettext("is not writeable")."<br>";
|
||||
+ $isanerror=1;
|
||||
+ }
|
||||
+@@ -411,4 +411,4 @@
|
||||
+ $maintp->setVariable("VERSION_INFO","<a href='http://www.nagiosql.org' target='_blank'>NagiosQL</a> - Version: $setFileVersion");
|
||||
+ $maintp->parse("footer");
|
||||
+ $maintp->show("footer");
|
||||
+-?>
|
||||
+\ No newline at end of file
|
||||
++?>
|
||||
7
debian/patches/series
vendored
Normal file
7
debian/patches/series
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
10_service_pack_1_additional_fixes_only.patch
|
||||
20_service_pack_2_additional_fixes_only.patch
|
||||
30_service_pack_3_additional_fixes_only.patch
|
||||
31_service_pack_3_additional_fixes_only_mysqli.patch
|
||||
40_settings_php.patch
|
||||
50_nagios4_debian_pathes.patch
|
||||
60_nagios4_configs_readonly.patch
|
||||
Reference in New Issue
Block a user