Source
result = zbx_db_select("select command_type,execute_on,port,authtype,username,password,publickey,privatekey,"
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
extern int CONFIG_ENABLE_REMOTE_COMMANDS;
extern int CONFIG_LOG_REMOTE_COMMANDS;
extern unsigned char program_type;
extern char *CONFIG_HOSTNAME;
/******************************************************************************
* *
* Purpose: execute remote command task *
* *
* Parameters: taskid - [IN] task identifier *
* clock - [IN] task creation time *
* ttl - [IN] task expiration period in seconds *
* now - [IN] current time *
* config_timeout - [IN] *
* *
* Return value: SUCCEED - remote command was executed *
* FAIL - otherwise *
* *
******************************************************************************/
static int tm_execute_remote_command(zbx_uint64_t taskid, int clock, int ttl, int now, int config_timeout)
{
DB_ROW row;
DB_RESULT result;