X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fos_execd%2Fexecd.h;h=6d2f2635d5de56bd440456330d9b2cf7037fba28;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hp=e26bb5c3db48c97c1f9a0b90041d0f922c206bc6;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/os_execd/execd.h b/src/os_execd/execd.h old mode 100755 new mode 100644 index e26bb5c..6d2f263 --- a/src/os_execd/execd.h +++ b/src/os_execd/execd.h @@ -1,67 +1,53 @@ -/* @(#) $Id: execd.h,v 1.12 2009/06/24 17:06:30 dcid Exp $ */ - /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation. - * - * More details at the LICENSE file included with OSSEC or - * online at http://www.ossec.net/en/licensing.html . */ - #ifndef _EXECD_H +#define _EXECD_H #ifndef ARGV0 #define ARGV0 "ossec-execd" #endif - /* Add/delete arguments for the commands */ #define ADD_ENTRY "add" #define DELETE_ENTRY "delete" - /* Maximum number of active responses active */ #define MAX_AR 64 - /* Maximum number of command arguments */ -#define MAX_ARGS 32 - +#define MAX_ARGS 32 /* Execd select timeout -- in seconds */ #define EXECD_TIMEOUT 90 - +extern int repeated_offenders_timeout[]; /** Function prototypes **/ -void ExecdStart(int queue); - void WinExecdRun(char *exec_msg); - -int ReadExecConfig(); - -char *GetCommandbyName(char *name, int *timeout); - -void ExecCmd(char **cmd); - +int ReadExecConfig(void); +char *GetCommandbyName(const char *name, int *timeout) __attribute__((nonnull)); +void ExecCmd(char *const *cmd) __attribute__((nonnull)); void ExecCmd_Win32(char *cmd); - -int ExecdConfig(char * cfgfile); - -int WinExecd_Start(); - +int ExecdConfig(const char *cfgfile) __attribute__((nonnull)); +int WinExecd_Start(void); void WinTimeoutRun(int timeout); -void FreeTimeoutEntry(void *timeout_entry); - +/* Timeout data structure */ +typedef struct _timeout_data { + time_t time_of_addition; + int time_to_block; + char **command; +} timeout_data; - -#define _EXECD_H +void FreeTimeoutEntry(timeout_data *timeout_entry); #endif +