Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktors Tjarve <viktors.tjarve@zabbix.com>2016-06-16 11:42:06 +0300
committerViktors Tjarve <viktors.tjarve@zabbix.com>2016-06-16 11:42:06 +0300
commite4f3f6abf27576b71797f5e60873499f024d6cf1 (patch)
treec66135b7f19d4e744636d28856a1c6014b4cc444 /include
parent7c86936c12890a28b99fe8513cf71ac555384ad9 (diff)
.......PS. [ZBX-10828] fixed server/proxy crashes when performing Simple checks with invalid key parameters hidden in user macro
[merge ^/branches/3.0 -c r60655]
Diffstat (limited to 'include')
-rw-r--r--include/common.h8
-rw-r--r--include/sysinfo.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/include/common.h b/include/common.h
index fdfb1ea7f5e..7ecc5d9867c 100644
--- a/include/common.h
+++ b/include/common.h
@@ -870,14 +870,18 @@ char *get_param_dyn(const char *param, int num);
* will be 0; for their parameters - 1 or higher *
* quoted - [IN] 1 if parameter is quoted; 0 - otherwise *
* cb_data - [IN] callback function custom data *
+ * param - [OUT] replaced item key string *
* *
- * Return value: NULL if parameter doesn't change; a new string - otherwise *
+ * Return value: SUCEED - if parameter doesn't change or has been changed *
+ * successfully *
+ * FAIL - otherwise *
* *
* Comments: The new string should be quoted if it contains special *
* characters *
* *
******************************************************************************/
-typedef char *(*replace_key_param_f)(const char *data, int key_type, int level, int num, int quoted, void *cb_data);
+typedef int (*replace_key_param_f)(const char *data, int key_type, int level, int num, int quoted, void *cb_data,
+ char **param);
#define ZBX_KEY_TYPE_ITEM 0
#define ZBX_KEY_TYPE_OID 1
int replace_key_params_dyn(char **data, int key_type, replace_key_param_f cb, void *cb_data, char *error,
diff --git a/include/sysinfo.h b/include/sysinfo.h
index f0338fe120c..0b29feb5a88 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -210,7 +210,7 @@ void free_request(AGENT_REQUEST *request);
int parse_item_key(const char *itemkey, AGENT_REQUEST *request);
void unquote_key_param(char *param);
-void quote_key_param(char **param, int forced);
+int quote_key_param(char **param, int forced);
int set_result_type(AGENT_RESULT *result, int value_type, int data_type, char *c);
void set_result_meta(AGENT_RESULT *result, zbx_uint64_t lastlogsize, int mtime);