rpms/zabbix/devel zabbix-1.6.3-pre.patch, 1.1, 1.2 zabbix.spec, 1.34, 1.35
Jeffrey C. Ollie
jcollie at fedoraproject.org
Mon Mar 9 20:35:57 UTC 2009
Author: jcollie
Update of /cvs/pkgs/rpms/zabbix/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7450
Modified Files:
zabbix-1.6.3-pre.patch zabbix.spec
Log Message:
* Mon Mar 9 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-5
- Update pre patch due to incomplete fix for security problems.
zabbix-1.6.3-pre.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 zabbix-1.6.3-pre.patch
Index: zabbix-1.6.3-pre.patch
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/devel/zabbix-1.6.3-pre.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- zabbix-1.6.3-pre.patch 6 Mar 2009 17:27:51 -0000 1.1
+++ zabbix-1.6.3-pre.patch 9 Mar 2009 20:35:57 -0000 1.2
@@ -1,10 +1,16 @@
diff --git a/ChangeLog b/ChangeLog
-index b6ee465..e217193 100644
+index b6ee465..47f1cce 100644
--- a/ChangeLog
+++ b/ChangeLog
-@@ -1,3 +1,71 @@
+@@ -1,3 +1,77 @@
+Changes for 1.6.3
+
++ - [ZBX-448] fixed zabbix server status when frontend and backend are on different servers (Vedmak)
++ - [ZBX-660] fixed screen clock set to server time showed local time (Artem)
++ - [ZBX-603] fixed min autologout value to 90 seconds (amach)
++ - [ZBX-762] improved performance of processing of log and text items (Sasha)
++ - [ZBX-749] details box is open by default if any error occured (Vedmak)
++ - [ZBX-751] expanded details box added for triggers copying messages (Vedmak)
+ - [DEV-268] added support of <mode> for system.cpu.util under Solaris (Sasha)
+ - [ZBX-737] the behaviour of the agent's key "vfs.fs.size" improved to be similar to the "df" command (Dmitry)
+ - [ZBX-599] the purpose of the configuration parameter StartAgents precised (Dmitry)
@@ -5654,6 +5660,9 @@
$p_elements[] = get_table_header(SPACE, $form);
// TABLE
+diff --git a/frontends/php/images/flash/zbxclock.swf b/frontends/php/images/flash/zbxclock.swf
+index 3bd482b..776f3ae 100644
+Binary files a/frontends/php/images/flash/zbxclock.swf and b/frontends/php/images/flash/zbxclock.swf differ
diff --git a/frontends/php/include/actions.inc.php b/frontends/php/include/actions.inc.php
index 33316fe..1088d00 100644
--- a/frontends/php/include/actions.inc.php
@@ -6261,6 +6270,19 @@
insert_show_color_picker_javascript();
}
+diff --git a/frontends/php/include/classes/cflashclock.mod.php b/frontends/php/include/classes/cflashclock.mod.php
+index 8f359fd..5ab5ed5 100644
+--- a/frontends/php/include/classes/cflashclock.mod.php
++++ b/frontends/php/include/classes/cflashclock.mod.php
+@@ -47,7 +47,7 @@
+ function BodyToString()
+ {
+ if($this->timetype == TIME_TYPE_SERVER)
+- $this->SetSrc($this->src."×tamp=".time());
++ $this->setSrc($this->src.'×tamp='.(time() + date('Z')));
+
+ return parent::BodyToString();
+ }
diff --git a/frontends/php/include/classes/cform.inc.php b/frontends/php/include/classes/cform.inc.php
index 4f87073..5678b90 100644
--- a/frontends/php/include/classes/cform.inc.php
@@ -7499,7 +7521,7 @@
+}
\ No newline at end of file
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
-index 1e11d0b..bbd154d 100644
+index 1e11d0b..b001b4a 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -30,7 +30,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
@@ -7660,6 +7682,15 @@
function show_messages($bool=TRUE,$okmsg=NULL,$errmsg=NULL){
global $page, $ZBX_MESSAGES;
+@@ -364,7 +377,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+ else if($bool && !is_null($okmsg)) $msg=$okmsg;
+
+ if(isset($msg)){
+- switch($page["type"]){
++ switch($page['type']){
+ case PAGE_TYPE_IMAGE:
+ array_push($message, array(
+ 'text' => $msg,
@@ -372,29 +385,29 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
'font' => 2));
$width = max($width, ImageFontWidth(2) * strlen($msg) + 1);
@@ -7676,8 +7707,9 @@
$msg_tab->setCellPadding(0);
$msg_tab->setCellSpacing(0);
-
+- $msg_col = new CCol(bold($msg),'msg');
+
- $msg_col = new CCol(bold($msg),'msg');
++ $msg_col = new CCol(bold($msg),'msg_main msg');
$msg_col->addOption('id','page_msg');
-
+
@@ -7710,7 +7742,7 @@
+ $msg_count = $msg_show;
+
+ $msg_count = ($msg_count * 16);
-+ $lst_error->AddOption('style','height: '.$msg_count.'px;');
++ $lst_error->addOption('style','height: '.$msg_count.'px;');
+ }
- $msg_count = ($msg_count * $msg_font_size * 4);
@@ -7726,8 +7758,9 @@
$tab->addOption('id','msg_messages');
$tab->addOption('style','width: 100%;');
-
+- if(isset($msg_tab)){
+
- if(isset($msg_tab)){
++ if(isset($msg_tab) && is_null($errmsg)){
$tab->addOption('style','display: none;');
}
-
@@ -7777,7 +7810,31 @@
// The hash has form <md5sum of triggerid>,<sum of priorities>
function calc_trigger_hash(){
-@@ -770,7 +784,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+@@ -727,16 +741,15 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+ }
+
+ function get_status(){
+-// global $DB;
++ global $ZBX_SERVER, $ZBX_SERVER_PORT;
++
+ $status = array();
+ // server
+- if( (exec('ps -ef|grep zabbix_server|grep -v grep|wc -l')>0) || (exec('ps -ax|grep zabbix_server|grep -v grep|wc -l')>0) ){
+- $status["zabbix_server"] = S_YES;
+- }
+- else{
+- $status["zabbix_server"] = S_NO;
+- }
+-// history & trends
++ $checkport = fsockopen($ZBX_SERVER, $ZBX_SERVER_PORT, $errnum, $errstr, 2);
++
++ $status["zabbix_server"] = ($checkport) ? S_YES : S_NO;
++
++ // history & trends
+ /* if ($DB['DB_TYPE'] == "MYSQL"){
+ $row=DBfetch(DBselect('show table status like "history"'));
+ $status["history_count"] = $row["Rows"];
+@@ -770,7 +783,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
// alerts
/* $row=DBfetch(DBselect('SELECT COUNT(alertid) as cnt from alerts"));
$status["alerts_count"]=$row["cnt"];*/
@@ -7786,7 +7843,7 @@
// triggers
$sql = 'SELECT COUNT(DISTINCT t.triggerid) as cnt '.
' FROM triggers t, functions f, items i, hosts h'.
-@@ -779,7 +793,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+@@ -779,7 +792,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
' AND i.status='.ITEM_STATUS_ACTIVE.
' AND i.hostid=h.hostid '.
' AND h.status='.HOST_STATUS_MONITORED;
@@ -7795,7 +7852,7 @@
$row=DBfetch(DBselect($sql));
$status['triggers_count']=$row['cnt'];
-@@ -797,13 +811,13 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+@@ -797,13 +810,13 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
$row=DBfetch(DBselect($sql.' and t.status=0 and t.value=2'));
$status['triggers_count_unknown']=$row['cnt'];
@@ -7812,7 +7869,7 @@
$row=DBfetch(DBselect($sql));
$status['items_count']=$row['cnt'];
-@@ -818,7 +832,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+@@ -818,7 +831,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
$row=DBfetch(DBselect($sql.' and i.type=2'));
$status['items_count_trapper']=$row['cnt'];
@@ -7821,7 +7878,7 @@
// hosts
$sql = 'SELECT COUNT(hostid) as cnt '.
' FROM hosts '.
-@@ -837,20 +851,20 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+@@ -837,20 +850,20 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
$row=DBfetch(DBselect('SELECT COUNT(hostid) as cnt FROM hosts WHERE status='.HOST_STATUS_DELETED));
$status['hosts_count_deleted']=$row['cnt'];
@@ -7846,7 +7903,7 @@
$result=DBselect('SELECT DISTINCT s.userid '.
' FROM sessions s, users u '.
' WHERE u.userid=s.userid '.
-@@ -985,19 +999,19 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+@@ -985,19 +998,19 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
global $IMAGE_FORMAT_DEFAULT;
if(is_null($format)) $format = $IMAGE_FORMAT_DEFAULT;
@@ -7874,7 +7931,7 @@
if(IMAGE_FORMAT_JPEG == $format)
ImageJPEG($image);
else
-@@ -1037,7 +1051,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
+@@ -1037,7 +1050,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
if(!is_array($mappings)) return FALSE;
$valuemapid = get_dbid("valuemaps","valuemapid");
[...3188 lines suppressed...]
}
-@@ -1151,14 +1156,11 @@ int DBadd_history_text(zbx_uint64_t itemid, char *value, int clock)
+@@ -1151,14 +1157,11 @@ int DBadd_history_text(zbx_uint64_t itemid, char *value, int clock)
{
#ifdef HAVE_ORACLE
char sql[MAX_STRING_LEN];
@@ -24056,7 +24847,7 @@
zabbix_log(LOG_LEVEL_DEBUG, "In add_history_text()");
-@@ -1168,10 +1170,7 @@ int DBadd_history_text(zbx_uint64_t itemid, char *value, int clock)
+@@ -1168,10 +1171,7 @@ int DBadd_history_text(zbx_uint64_t itemid, char *value, int clock)
sqlo_autocommit_off(oracle);
@@ -24068,7 +24859,7 @@
value_esc_max_len = strlen(value_esc);
/* alloate the lob descriptor */
-@@ -1259,12 +1258,12 @@ lbl_exit:
+@@ -1259,12 +1259,12 @@ lbl_exit:
int DBadd_history_log(zbx_uint64_t itemid, char *value, int clock, int timestamp, char *source, int severity, int lastlogsize)
{
@@ -24083,7 +24874,7 @@
DBexecute("insert into history_log (id,clock,itemid,timestamp,value,source,severity)"
" values (" ZBX_FS_UI64 ",%d," ZBX_FS_UI64 ",%d,'%s','%s',%d)",
-@@ -1276,6 +1275,7 @@ int DBadd_history_log(zbx_uint64_t itemid, char *value, int clock, int timestamp
+@@ -1276,6 +1276,7 @@ int DBadd_history_log(zbx_uint64_t itemid, char *value, int clock, int timestamp
source_esc,
severity);
@@ -24091,7 +24882,7 @@
zbx_free(value_esc);
return SUCCEED;
-@@ -1512,12 +1512,15 @@ zbx_uint64_t DBget_proxy_lastaccess(const char *hostname)
+@@ -1512,12 +1513,15 @@ zbx_uint64_t DBget_proxy_lastaccess(const char *hostname)
zbx_uint64_t res;
DB_RESULT result;
DB_ROW row;
@@ -24109,7 +24900,7 @@
if (NULL == (row = DBfetch(result)) || SUCCEED == DBis_null(row[0])) {
zabbix_log(LOG_LEVEL_ERR, "Proxy \"%s\" not exists",
-@@ -1538,33 +1541,17 @@ zbx_uint64_t DBget_proxy_lastaccess(const char *hostname)
+@@ -1538,33 +1542,17 @@ zbx_uint64_t DBget_proxy_lastaccess(const char *hostname)
int DBadd_alert(zbx_uint64_t actionid, zbx_uint64_t userid, zbx_uint64_t eventid, zbx_uint64_t mediatypeid, char *sendto, char *subject, char *message)
{
int now;
@@ -24147,7 +24938,7 @@
DBexecute("insert into alerts (alertid,actionid,eventid,userid,clock,mediatypeid,sendto,subject,message,status,retries)"
" values (" ZBX_FS_UI64 "," ZBX_FS_UI64 "," ZBX_FS_UI64 "," ZBX_FS_UI64 ",%d," ZBX_FS_UI64 ",'%s','%s','%s',0,0)",
DBget_maxid("alerts","alertid"),
-@@ -1716,6 +1703,56 @@ char* DBdyn_escape_string(const char *src)
+@@ -1716,6 +1704,56 @@ char* DBdyn_escape_string(const char *src)
return dst;
}
@@ -24204,7 +24995,7 @@
void DBget_item_from_db(DB_ITEM *item,DB_ROW row)
{
char *s;
-@@ -1724,6 +1761,7 @@ void DBget_item_from_db(DB_ITEM *item,DB_ROW row)
+@@ -1724,6 +1762,7 @@ void DBget_item_from_db(DB_ITEM *item,DB_ROW row)
ZBX_STR2UINT64(item->itemid, row[0]);
/* item->itemid=atoi(row[0]); */
@@ -24212,7 +25003,7 @@
item->key_orig=row[1];
item->host_name=row[2];
item->port=atoi(row[3]);
-@@ -1851,16 +1889,16 @@ void DBget_item_from_db(DB_ITEM *item,DB_ROW row)
+@@ -1851,16 +1890,16 @@ void DBget_item_from_db(DB_ITEM *item,DB_ROW row)
case ITEM_TYPE_SIMPLE:
case ITEM_TYPE_EXTERNAL:
key = zbx_dsprintf(key, "%s", item->key_orig);
@@ -24232,7 +25023,27 @@
}
}
-@@ -2103,16 +2141,18 @@ void DBproxy_add_history_uint(zbx_uint64_t itemid, zbx_uint64_t value, int clock
+@@ -1935,10 +1974,18 @@ zbx_uint64_t DBget_maxid_num(char *tablename, char *fieldname, int num)
+ int found = FAIL, dbres, nodeid;
+ const ZBX_TABLE *table;
+
+- zabbix_log(LOG_LEVEL_DEBUG,"In DBget_maxid \"%s\".\"%s\"",
++ zabbix_log(LOG_LEVEL_DEBUG,"In DBget_maxid %s.%s",
+ tablename,
+ fieldname);
+
++ if ((0 == strcmp(tablename, "history_log") && 0 == strcmp(fieldname, "id")) ||
++ (0 == strcmp(tablename, "history_text") && 0 == strcmp(fieldname, "id")) ||
++ (0 == strcmp(tablename, "dservices") && 0 == strcmp(fieldname, "dserviceid")) ||
++ (0 == strcmp(tablename, "dhosts") && 0 == strcmp(fieldname, "dhostid")) ||
++ (0 == strcmp(tablename, "alerts") && 0 == strcmp(fieldname, "alertid")) ||
++ (0 == strcmp(tablename, "escalations") && 0 == strcmp(fieldname, "escalationid")))
++ return DCget_nextid(tablename, fieldname, num);
++
+ table = DBget_table(tablename);
+ nodeid = CONFIG_NODEID >= 0 ? CONFIG_NODEID : 0;
+
+@@ -2103,16 +2150,18 @@ void DBproxy_add_history_uint(zbx_uint64_t itemid, zbx_uint64_t value, int clock
void DBproxy_add_history_str(zbx_uint64_t itemid, char *value, int clock)
{
@@ -24253,7 +25064,7 @@
}
void DBproxy_add_history_text(zbx_uint64_t itemid, char *value, int clock)
-@@ -2133,11 +2173,11 @@ void DBproxy_add_history_text(zbx_uint64_t itemid, char *value, int clock)
+@@ -2133,11 +2182,11 @@ void DBproxy_add_history_text(zbx_uint64_t itemid, char *value, int clock)
void DBproxy_add_history_log(zbx_uint64_t itemid, char *value, int clock, int timestamp, char *source, int severity, int lastlogsize)
{
@@ -24267,7 +25078,7 @@
value_esc = DBdyn_escape_string(value);
DBexecute("insert into proxy_history (itemid,clock,timestamp,source,severity,value)"
-@@ -2150,6 +2190,7 @@ void DBproxy_add_history_log(zbx_uint64_t itemid, char *value, int clock, int ti
+@@ -2150,6 +2199,7 @@ void DBproxy_add_history_log(zbx_uint64_t itemid, char *value, int clock, int ti
value_esc);
zbx_free(value_esc);
@@ -24275,7 +25086,7 @@
}
void DBadd_condition_alloc(char **sql, int *sql_alloc, int *sql_offset, const char *fieldname, const zbx_uint64_t *values, const int num)
-@@ -2187,8 +2228,23 @@ void DBadd_condition_alloc(char **sql, int *sql_alloc, int *sql_offset, const ch
+@@ -2187,8 +2237,23 @@ void DBadd_condition_alloc(char **sql, int *sql_alloc, int *sql_offset, const ch
zbx_snprintf_alloc(sql, sql_alloc, sql_offset, 2, ")");
}
@@ -24300,7 +25111,7 @@
char *zbx_host_key_string(zbx_uint64_t itemid)
{
DB_RESULT result;
-@@ -2203,9 +2259,26 @@ char *zbx_host_key_string(zbx_uint64_t itemid)
+@@ -2203,9 +2268,26 @@ char *zbx_host_key_string(zbx_uint64_t itemid)
else
zbx_snprintf(string, sizeof(string), "???");
@@ -24327,7 +25138,7 @@
char *zbx_host_key_string_by_item(DB_ITEM *item)
{
zbx_snprintf(string, sizeof(string), "%s:%s", item->host_name, item->key);
-@@ -2213,6 +2286,23 @@ char *zbx_host_key_string_by_item(DB_ITEM *item)
+@@ -2213,6 +2295,23 @@ char *zbx_host_key_string_by_item(DB_ITEM *item)
return string;
}
@@ -24351,7 +25162,7 @@
char *zbx_host_key_function_string(zbx_uint64_t functionid)
{
DB_RESULT result;
-@@ -2227,6 +2317,8 @@ char *zbx_host_key_function_string(zbx_uint64_t functionid)
+@@ -2227,6 +2326,8 @@ char *zbx_host_key_function_string(zbx_uint64_t functionid)
else
zbx_snprintf(string, sizeof(string), "???");
@@ -26830,7 +27641,7 @@
CONFIG_POLLER_FORKS,
poller_num-1,
diff --git a/src/zabbix_server/server.c b/src/zabbix_server/server.c
-index fa2087e..d274877 100644
+index fa2087e..24e9666 100644
--- a/src/zabbix_server/server.c
+++ b/src/zabbix_server/server.c
@@ -50,8 +50,6 @@
@@ -26851,6 +27662,29 @@
int CONFIG_IPMIPOLLER_FORKS = 0;
int CONFIG_TIMER_FORKS = 1;
int CONFIG_TRAPPERD_FORKS = 5;
+@@ -1080,8 +1078,7 @@ int MAIN_ZABBIX_ENTRY(void)
+ exit(FAIL);
+ }
+
+- if (CONFIG_DBSYNCER_FORKS != 0)
+- init_database_cache(ZBX_PROCESS_SERVER);
++ init_database_cache(ZBX_PROCESS_SERVER);
+
+ /*#define CALC_TREND*/
+
+@@ -1304,11 +1301,7 @@ void zbx_on_exit()
+ zbx_sleep(2); /* wait for all threads closing */
+
+ DBconnect(ZBX_DB_CONNECT_EXIT);
+-
+- if(CONFIG_DBSYNCER_FORKS!=0)
+- {
+- free_database_cache();
+- }
++ free_database_cache();
+ DBclose();
+
+ zbx_mutex_destroy(&node_sync_access);
diff --git a/src/zabbix_server/utils/nodechange.c b/src/zabbix_server/utils/nodechange.c
index 60a99e0..ca414d1 100644
--- a/src/zabbix_server/utils/nodechange.c
Index: zabbix.spec
===================================================================
RCS file: /cvs/pkgs/rpms/zabbix/devel/zabbix.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- zabbix.spec 6 Mar 2009 17:27:52 -0000 1.34
+++ zabbix.spec 9 Mar 2009 20:35:57 -0000 1.35
@@ -1,6 +1,6 @@
Name: zabbix
Version: 1.6.2
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Open-source monitoring solution for your IT infrastructure
Group: Applications/Internet
@@ -465,6 +465,9 @@
%defattr(-,root,root,-)
%changelog
+* Mon Mar 9 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-5
+- Update pre patch due to incomplete fix for security problems.
+
* Wed Mar 4 2009 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.2-4
- Update to a SVN snapshot of the upstream 1.6 branch to fix security
issue (BZ#488501)
More information about the fedora-extras-commits
mailing list