[ZBX-11509] Better passing of agent remote commands Created: 2016 Nov 22  Updated: 2017 May 30  Resolved: 2016 Dec 07

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.2.16rc1, 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1
Fix Version/s: 2.2.16rc1, 3.0.6rc1, 3.2.2rc1, 3.4.0alpha1

Type: Incident report Priority: Trivial
Reporter: Glebs Ivanovskis (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: remotecommands
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It's no secret that we reuse system.run[] agent key for running remote commands on agents:

	param = zbx_dyn_escape_string(command, "\"");
	item.key = zbx_dsprintf(item.key, "system.run[\"%s\",\"%s\"]", param, NULL == result ? "nowait" : "wait");

Would be better to use in this piece of code quote_key_param() instead of zbx_dyn_escape_string() and mandatory double quotes.



 Comments   
Comment by Vladislavs Sokurenko [ 2016 Nov 25 ]

Fixed in development branch:
svn://svn.zabbix.com/branches/dev/ZBX-11509

Comment by Andris Zeila [ 2016 Nov 28 ]

Successfully tested, please review minor changes in r64070
vso CLOSED

Comment by Vladislavs Sokurenko [ 2016 Nov 28 ]

Fixed in:
2.2.16rc1 r64071
3.0.6rc1 r64073
3.2.2rc1 r64074
3.3.0 (trunk) r64076

Generated at Wed Apr 17 02:34:19 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.