1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
14 #define ARGV0 "ossec-execd"
17 /* Add/delete arguments for the commands */
18 #define ADD_ENTRY "add"
19 #define DELETE_ENTRY "delete"
21 /* Maximum number of active responses active */
24 /* Maximum number of command arguments */
27 /* Execd select timeout -- in seconds */
28 #define EXECD_TIMEOUT 90
30 extern int repeated_offenders_timeout[];
32 /** Function prototypes **/
34 void WinExecdRun(char *exec_msg);
35 int ReadExecConfig(void);
36 char *GetCommandbyName(const char *name, int *timeout) __attribute__((nonnull));
37 void ExecCmd(char *const *cmd) __attribute__((nonnull));
38 void ExecCmd_Win32(char *cmd);
39 int ExecdConfig(const char *cfgfile) __attribute__((nonnull));
40 int WinExecd_Start(void);
41 void WinTimeoutRun(int timeout);
43 /* Timeout data structure */
44 typedef struct _timeout_data {
45 time_t time_of_addition;
50 void FreeTimeoutEntry(timeout_data *timeout_entry);