Imported Upstream version 2.7
[ossec-hids.git] / src / error_messages / error_messages.h
1 /* @(#) $Id: ./src/error_messages/error_messages.h, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All right reserved.
6  *
7  * This program is a free software; you can redistribute it
8  * and/or modify it under the terms of the GNU General Public
9  * License (version 2) as published by the FSF - Free Software
10  * Foundation
11  */
12
13 /* Part of OSSEC HIDS ( http://www.ossec.net )
14  * Error/debug messages
15  */
16
17
18 #ifndef _ERROR_MESSAGES__H
19
20 #define _ERROR_MESSAGES__H
21
22
23         /***  Error messages - English ***/
24
25
26 /* SYSTEM ERRORS */
27 #define FORK_ERROR        "%s(1101): ERROR: Unable to fork. Exiting."
28 #define MEM_ERROR         "%s(1102): ERROR: Not enough Memory. Exiting."
29 #define FOPEN_ERROR   "%s(1103): ERROR: Unable to open file '%s'."
30 #define SIZE_ERROR    "%s(1104): ERROR: Maximum string size reached for: %s."
31 #define NULL_ERROR    "%s(1105): ERROR: Attempted to use null string. "
32 #define FORMAT_ERROR  "%s(1106): ERROR: String not correctly formated."
33 #define MKDIR_ERROR   "%s(1107): ERROR: Unable to create directory: '%s'"
34 #define PERM_ERROR    "%s(1108): ERROR: Permission error. Operation not completed."
35 #define THREAD_ERROR  "%s(1109): ERROR: Unable to create new pthread."
36 #define READ_ERROR    "%s(1110): ERROR: Unable to read from socket."
37 #define WAITPID_ERROR "%s(1111): ERROR: Unable to Waitpid()."
38 #define SETSID_ERROR  "%s(1112): ERROR: Unable to Setsid()."
39 #define MUTEX_ERROR   "%s(1113): ERROR: Unable to set pthread mutex."
40 #define SELECT_ERROR  "%s(1114): ERROR: Unable to select()."
41 #define FREAD_ERROR   "%s(1115): ERROR: Error reading file '%s'."
42 #define FSEEK_ERROR   "%s(1116): ERROR: Error handling file '%s' (fseek)."
43 #define FILE_ERROR    "%s(1117): ERROR: Error handling file '%s' (date)."
44 #define SYSTEM_ERROR  "%s(1118): ERROR: Internal error. Exiting.."
45 #define FGETS_ERROR   "%s(1119): ERROR: Invalid line on file '%s': %s."
46 #define PIPE_ERROR    "%s(1120): ERROR: Pipe error."
47 #define GLOB_ERROR    "%s(1121): ERROR: Glob error. Invalid pattern: '%s'."
48 #define GLOB_NFOUND   "%s(1122): ERROR: No file found by pattern: '%s'."
49 #define UNLINK_ERROR  "%s(1123): ERROR: Unable to delete file: '%s'."
50 #define RENAME_ERROR  "%s(1124): ERROR: Unable to rename file: '%s'."
51 #define INT_ERROR     "%s(1125): ERROR: Internal error (undefined)."
52 #define OPEN_ERROR    "%s(1126): ERROR: Unable to open file '%s' reason '%s'"
53
54
55 /* COMMON ERRORS */
56 #define CONN_ERROR          "%s(1201): ERROR: No remote connection configured."
57 #define CONFIG_ERROR    "%s(1202): ERROR: Configuration error at '%s'. Exiting."
58 #define USER_ERROR          "%s(1203): ERROR: Invalid user '%s' or group '%s' given."
59 #define CONNTYPE_ERROR  "%s(1204): ERROR: Invalid connection type: '%s'."
60 #define PORT_ERROR          "%s(1205): INFO: No port specified. Using default: '%d'."
61 #define BIND_ERROR          "%s(1206): ERROR: Unable to Bind port '%d'"
62 #define SETGID_ERROR    "%s(1207): ERROR: Unable to switch to group: '%s'."
63 #define SETUID_ERROR    "%s(1208): ERROR: Unable to switch to user: '%s'."
64 #define CHROOT_ERROR    "%s(1209): ERROR: Unable to chroot to directory: '%s'."
65 #define QUEUE_ERROR         "%s(1210): ERROR: Queue '%s' not accessible: '%s'."
66 #define QUEUE_FATAL         "%s(1211): ERROR: Unable to access queue: '%s'. Giving up.."
67 #define PID_ERROR           "%s(1212): ERROR: Unable to create PID file."
68 #define DENYIP_WARN     "%s(1213): WARN: Message from %s not allowed."
69 #define MSG_ERROR           "%s(1214): WARN: Problem receiving message from %s."
70 #define CLIENT_ERROR    "%s(1215): ERROR: No client configured. Exiting."
71 #define CONNS_ERROR         "%s(1216): ERROR: Unable to connect to '%s'."
72 #define UNABLE_CONN     "%s(1242): ERROR: Unable to connect to server. Exausted all options."
73 #define SEC_ERROR           "%s(1217): ERROR: Error creating encrypted message."
74 #define SEND_ERROR          "%s(1218): ERROR: Unable to send message to %s."
75 #define RULESLOAD_ERROR "%s(1219): ERROR: Unable to access the rules directory."
76 #define RULES_ERROR         "%s(1220): ERROR: Error loading the rules: '%s'."
77 #define LISTS_ERROR     "%s(1221): ERROR: Error loading the list: '%s'."
78 #define QUEUE_SEND      "%s(1224): ERROR: Error sending message to queue."
79 #define SIGNAL_RECV     "%s(1225): INFO: SIGNAL Received. Exit Cleaning..."
80 #define XML_ERROR       "%s(1226): ERROR: Error reading XML file '%s': %s (line %d)."
81 #define XML_ERROR_VAR   "%s(1227): ERROR: Error applying XML variables '%s': %s."
82 #define XML_NO_ELEM     "%s(1228): ERROR: Element '%s' without any option."
83 #define XML_INVALID     "%s(1229): ERROR: Invalid element '%s' on the '%s' config."
84 #define XML_INVELEM     "%s(1230): ERROR: Invalid element in the configuration: '%s'."
85 #define XML_INVATTR     "%s(1243): ERROR: Invalid attribute '%s' in the configuration: '%s'."
86 #define XML_ELEMNULL    "%s(1231): ERROR: Invalid NULL element in the configuration."
87 #define XML_READ_ERROR  "%s(1232): ERROR: Error reading XML. Unknown cause."
88 #define XML_VALUENULL   "%s(1234): ERROR: Invalid NULL content for element: %s."
89 #define XML_VALUEERR    "%s(1235): ERROR: Invalid value for element '%s': %s."
90 #define XML_MAXREACHED  "%s(1236): ERROR: Maximum number of elements reached for: %s."
91 #define INVALID_IP      "%s(1237): ERROR: Invalid ip address: '%s'."
92 #define INVALID_ELEMENT "%s(1238): ERROR: Invalid value for element '%s': %s"
93 #define NO_CONFIG       "%s(1239): ERROR: Configuration file not found: '%s'."
94 #define INVALID_TIME    "%s(1240): ERROR: Invalid time format: '%s'."
95 #define INVALID_DAY     "%s(1241): ERROR: Invalid day format: '%s'."
96
97 #define MAILQ_ERROR         "%s(1221): ERROR: No Mail queue at %s"
98 #define IMSG_ERROR          "%s(1222): ERROR: Invalid msg: %s"
99 #define SNDMAIL_ERROR   "%s(1223): ERROR: Error Sending email to %s (smtp server)"
100 #define XML_INV_GRAN_MAIL "%s(1224): ERROR: Invalid 'email_alerts' config (missing parameters)."
101 #define CHLDWAIT_ERROR  "%s(1261): ERROR: Waiting for child process. (status: %d)."
102 #define TOOMANY_WAIT_ERROR "%s(1262): ERROR: Too many errors waiting for child process(es)."
103
104
105 /* rootcheck */
106 #define MAX_RK_MSG        "%s(1250): ERROR: Maximum number of global files reached: %d"
107 #define INVALID_RKCL_NAME  "%s(1251): ERROR: Invalid rk configuration name: '%s'."
108 #define INVALID_RKCL_VALUE "%s(1252): ERROR: Invalid rk configuration value: '%s'."
109 #define INVALID_ROOTDIR    "%s(1253): ERROR: Invalid rootdir (unable to retrieve)."
110 #define INVALID_RKCL_VAR   "%s(1254): ERROR: Invalid rk variable: '%s'."
111
112
113 /* syscheck */
114 #define SYSCHECK_NO_OPT "%s(1701): WARN: No option provided for directories: '%s', ignoring it."
115 #define SK_NO_DIR       "%s(1702): INFO: No directory provided for syscheck to monitor."
116 #define SK_INV_ATTR     "%s(1703): ERROR: Invalid attribute '%s' for directory option."
117 #define SK_INV_OPT      "%s(1704): ERROR: Invalid option '%s' for attribute '%s'"
118 #define SK_NO_DB        "%s(1705): ERROR: No integrity database found at '%s'."
119 #define SK_INV_MSG      "%s(1755): ERROR: Invalid syscheck message received."
120 #define SK_DUP          "%s(1756): ERROR: Duplicated directory given: '%s'."
121 #define SK_INV_REG      "%s(1757): ERROR: Invalid syscheck registry entry: '%s'."
122 #define SK_REG_OPEN     "%s(1758): ERROR: Unable to open registry key: '%s'."
123
124
125 /* Analysisd */
126 #define FTS_LIST_ERROR   "%s(1260): ERROR: Error initiating FTS list"
127 #define CRAFTED_IP       "%s(1271): WARN: Invalid IP Address '%s'. Possible logging attack."
128 #define CRAFTED_USER     "%s(1272): WARN: Invalid username '%s'. Possible logging attack."
129 #define INVALID_CAT      "%s(1273): ERROR: Invalid category '%s' chosen."
130 #define INVALID_CONFIG   "%s(1274): ERROR: Invalid configuration. Element '%s': %s."
131 #define INVALID_HOSTNAME "%s(1275): ERROR: Invalid hostname in syslog message: '%s'."
132 #ifdef GEOIP
133 #define INVALID_GEOIP_DB "%s(1276): ERROR: Cannot open GeoIP database: '%s'."
134 #endif
135
136
137 /* Log collector */
138
139
140 /* Remoted */
141 #define NO_REM_CONN     "%s(1750): ERROR: No remote connection configured. Exiting."
142
143
144 /* 1760 - 1769 -- reserver for maild */
145
146
147 /* Active response */
148 #define AR_CMD_MISS     "%s(1280): ERROR: Missing command options. " \
149                         "You must specify a 'name', 'executable' and 'expect'."
150 #define AR_MISS         "%s(1281): ERROR: Missing options in the active response " \
151                         "configuration. "
152 #define ARQ_ERROR       "%s(1301): ERROR: Unable to connect to active response queue."
153 #define AR_INV_LOC      "%s(1302): ERROR: Invalid active response location: '%s'."
154 #define AR_INV_CMD      "%s(1303): ERROR: Invalid command '%s' in the active response."
155 #define AR_DEF_AGENT    "%s(1304): ERROR: No agent defined for response."
156 #define AR_NO_TIMEOUT   "%s(1305): ERROR: Timeout not allowed for command: '%s'."
157
158
159 #define EXECD_INV_MSG   "%s(1310): WARN: Invalid active response (execd) message '%s'."
160 #define EXEC_INV_NAME   "%s(1311): ERROR: Invalid command name '%s' provided."
161 #define EXEC_CMDERROR   "%s(1312): ERROR: Error executing '%s': %s"
162 #define EXEC_INV_CONF   "%s(1313): ERROR: Invalid active response config: '%s'."
163 #define EXEC_DISABLED   "%s(1350): INFO: Active response disabled. Exiting."
164 #define EXEC_SHUTDOWN   "%s(1314): INFO: Shutdown received. Deleting responses."
165
166 #define AR_NOAGENT_ERROR    "%s(1320): ERROR: Agent '%s' not found."
167
168
169 /* List operations */
170 #define LIST_ERROR      "%s(1290): ERROR: Unable to create a new list (calloc)."
171 #define LIST_ADD_ERROR  "%s(1291): ERROR: Error adding nodes to list."
172 #define LIST_SIZE_ERROR "%s(1292): ERROR: Error setting error size."
173 #define LIST_FREE_ERROR "%s(1293): ERROR: Error setting data free pointer."
174
175
176 /* Log collector messages */
177 #define MISS_LOG_FORMAT "%s(1901): ERROR: Missing 'log_format' element."
178 #define MISS_FILE       "%s(1902): ERROR: Missing 'location' element."
179 #define INV_EVTLOG      "%s(1903): ERROR: Invalid event log: '%s'."
180 #define NSTD_EVTLOG     "%s(1907): INFO: Non-standard event log set: '%s'."
181 #define LOGC_FILE_ERROR "%s(1904): INFO: File not available, ignoring it: '%s'."
182 #define NO_FILE         "%s(1905): INFO: No file configured to monitor."
183 #define PARSE_ERROR     "%s(1906): ERROR: Error parsing file: '%s'."
184 #define READING_FILE    "%s(1950): INFO: Analyzing file: '%s'."
185 #define READING_EVTLOG  "%s(1951): INFO: Analyzing event log: '%s'."
186 #define VAR_LOG_MON     "%s(1952): INFO: Monitoring variable log file: '%s'."
187 #define INV_MULTILOG    "%s(1953): ERROR: Invalid DJB multilog file: '%s'."
188
189
190 /* Encryption/ auth errors */
191 #define INVALID_KEY     "%s(1401): ERROR: Error reading authentication key: '%s'."
192 #define NO_AUTHFILE     "%s(1402): ERROR: Authentication key file '%s' not found."
193 #define ENCFORMAT_ERROR "%s(1403): ERROR: Incorrectly formated message from '%s'."
194 #define ENCKEY_ERROR    "%s(1404): ERROR: Authentication error. Wrong key from '%s'."
195 #define ENCSIZE_ERROR   "%s(1405): ERROR: Message size not valid: '%s'."
196 #define ENCSUM_ERROR    "%s(1406): ERROR: Checksum mismatch on message from '%s'."
197 #define ENCTIME_ERROR   "%s(1407): ERROR: Duplicated counter for '%s'."
198 #define ENC_IP_ERROR    "%s(1408): ERROR: Invalid ID for the source ip: '%s'."
199 #define ENCFILE_CHANGED "%s(1409): INFO: Authentication file changed. Updating."
200 #define ENC_READ        "%s(1410): INFO: Reading authentication keys file."
201
202
203 /* Regex errors */
204 #define REGEX_COMPILE   "%s(1450): ERROR: Syntax error on regex: '%s': %d."
205 #define REGEX_SUBS      "%s(1451): ERROR: Missing sub_strings on regex: '%s'."
206
207
208 /* Mail errors */
209 #define INVALID_SMTP    "%s(1501): ERROR: Invalid SMTP Server: %s"
210 #define INVALID_MAIL    "%s(1502): ERROR: Invalid Email Address: %s"
211
212
213 /* Decoders */
214 #define PPLUGIN_INV     "%s(2101): ERROR: Parent decoder name invalid: '%s'."
215 #define PDUP_INV        "%s(2102): ERROR: Duplicated decoder with prematch: '%s'."
216 #define PDUPFTS_INV     "%s(2103): ERROR: Duplicated decoder with fts set: '%s'."
217 #define DUP_INV         "%s(2104): ERROR: Invalid duplicated decoder: '%s'."
218 #define DEC_PLUGIN_ERR  "%s(2105): ERROR: Error loading decoder options."
219 #define DECODER_ERROR   "%s(2106): ERROR: Error adding decoder plugin."
220 #define DEC_REGEX_ERROR "%s(2107): ERROR: Decoder configuration error: '%s'."
221 #define DECODE_NOPRE    "%s(2108): ERROR: No 'prematch' found in decoder: '%s'."
222 #define DUP_REGEX       "%s(2109): ERROR: Duplicated offsets for same regex: '%s'."
223 #define INV_DECOPTION   "%s(2110): ERROR: Invalid decoder argument for %s: '%s'."
224 #define DECODE_ADD      "%s(2111): ERROR: Additional data to plugin decoder: '%s'."
225
226 #define INV_OFFSET      "%s(2120): ERROR: Invalid offset value: '%s'"
227 #define INV_ATTR        "%s(2121): ERROR: Invalid decoder attribute: '%s'"
228
229
230 /* os_zlib */
231 #define COMPRESS_ERR    "%s(2201): ERROR: Error compressing string: '%s'."
232 #define UNCOMPRESS_ERR  "%s(2202): ERROR: Error uncompressing string."
233
234
235 /* read defines */
236 #define DEF_NOT_FOUND   "%s(2301): ERROR: Definition not found for: '%s.%s'."
237 #define INV_DEF         "%s(2302): ERROR: Invalid definition for %s.%s: '%s'."
238
239
240 /* Agent errors */
241 #define AG_WAIT_SERVER  "%s(4101): WARN: Waiting for server reply (not started). Tried: '%s'."
242 #define AG_CONNECTED    "%s(4102): INFO: Connected to the server (%s:%d)."
243 #define AG_USINGIP      "%s(4103): INFO: Server IP address already set. Trying that before the hostname."
244 #define AG_INV_HOST     "%s(4104): ERROR: Invalid hostname: '%s'."
245 #define AG_INV_IP       "%s(4105): ERROR: No valid server IP found."
246 #define EVTLOG_OPEN     "%s(4106): ERROR: Unable to open event log: '%s'."
247 #define EVTLOG_GETLAST  "%s(4107): ERROR: Unable to query last event log from: '%s'."
248 #define EVTLOG_DUP      "%s(4108): ERROR: Duplicated event log entry: '%s'."
249 #define AG_NOKEYS_EXIT "%s(4109): ERROR: Unable to start without auth keys. Exiting."
250 #define AG_MAX_ERROR    "%s(4110): ERROR: Maximum number of agents '%d' reached."
251 #define AG_AX_AGENTS     "%s(4111): INFO: Maximum number of agents allowed: '%d'."
252
253
254 /* Rules reading errors */
255 #define RL_INV_ROOT     "%s(5101): ERROR: Invalid root element: '%s'."
256 #define RL_INV_RULE     "%s(5102): ERROR: Invalid rule element: '%s'."
257 #define RL_INV_ENTRY    "%s(5103): ERROR: Invalid rule on '%s'. Missing id/level."
258 #define RL_EMPTY_ATTR   "%s(5104): ERROR: Rule attribute '%s' empty."
259 #define RL_INV_ATTR     "%s(5105): ERROR: Invalid rule attributes inside file: '%s'."
260 #define RL_NO_OPT       "%s(5106): ERROR: Rule '%d' without any options. "\
261                         "It may lead to false positives. Exiting. "
262
263
264 /* Syslog output */
265 #define XML_INV_CSYSLOG "%s(5301): ERROR: Invalid client-syslog configuration."
266
267
268 /* Agentless */
269 #define XML_INV_AGENTLESS   "%s(7101): ERROR: Invalid agentless configuration."
270 #define XML_INV_MISSFREQ    "%s(7102): ERROR: Frequency not set for the periodic option."
271 #define XML_INV_MISSOPTS    "%s(7103): ERROR: Missing agentless options."
272
273
274 /* Database messages */
275 #define DBINIT_ERROR    "%s(5201): ERROR: Error initializing database handler."
276 #define DBCONN_ERROR    "%s(5202): ERROR: Error connecting to database '%s'(%s): ERROR: %s."
277 #define DBQUERY_ERROR   "%s(5203): ERROR: Error executing query '%s'. Error: '%s'."
278 #define DB_GENERROR     "%s(5204): ERROR: Database error. Unable to run query."
279 #define DB_MISS_CONFIG  "%s(5205): ERROR: Missing database configuration. "\
280                         "It requires host, user, pass and database."
281 #define DB_CONFIGERR    "%s(5206): ERROR: Database configuration error."
282 #define DB_COMPILED     "%s(5207): ERROR: OSSEC not compiled with support for '%s'."
283 #define DB_MAINERROR    "%s(5208): ERROR: Multiple database errors. Exiting."
284 #define DB_CLOSING      "%s(5209): INFO: Closing connection to database."
285 #define DB_ATTEMPT      "%s(5210): INFO: Attempting to reconnect to database."
286
287
288
289 /* Verbose messages */
290 #define STARTUP_MSG     "%s: INFO: Started (pid: %d)."
291 #define PRIVSEP_MSG     "%s: INFO: Chrooted to directory: %s, using user: %s"
292 #define MSG_SOCKET_SIZE "%s: INFO: (unix_domain) Maximum send buffer set to: '%d'."
293
294 #define NO_SYSLOG       "%s(1501): ERROR: No IP or network allowed in the access list" \
295                         " for syslog. No reason for running it. Exiting."
296 #define CONN_TO     "%s: INFO: Connected to '%s' (%s queue)"
297 #define MAIL_DIS    "%s: INFO: E-Mail notification disabled. Clean Exit."
298
299
300 /* Debug Messages */
301 #define STARTED_MSG "%s: DEBUG: Starting ..."
302 #define FOUND_USER  "%s: DEBUG: Found user/group ..."
303 #define ASINIT      "%s: DEBUG: Active response initialized ..."
304 #define READ_CONFIG "%s: DEBUG: Read configuration ..."
305
306
307 /* Wait operations */
308 #define WAITING_MSG     "%s: WARN: Process locked. Waiting for permission..."
309 #define WAITING_FREE    "%s: INFO: Lock free. Continuing..."
310 #define SERVER_UNAV     "%s: WARN: Server unavailable. Setting lock."
311 #define SERVER_UP       "%s: INFO: Server responded. Releasing lock."
312
313 /* Ossec alert messages */
314 #define OS_AD_STARTED   "ossec: Ossec started."
315 #define OS_AG_STARTED   "ossec: Agent started: '%s->%s'."
316 #define OS_AG_DISCON    "ossec: Agent disconnected: '%s'."
317
318
319 #endif /* _ERROR_MESSAGES__H */
320