Fix undersized buffer use by eximon. Bug 1527
[exim.git] / src / exim_monitor / em_globals.c
CommitLineData
059ec3d9
PH
1/*************************************************
2* Exim Monitor *
3*************************************************/
4
c4ceed07 5/* Copyright (c) University of Cambridge 1995 - 2012 */
059ec3d9
PH
6/* See the file NOTICE for conditions of use and distribution. */
7
8
9#include "em_hdr.h"
10
11/* This source module contains all the global variables used in
12the exim monitor, including those that are used by the standard
13Exim modules that are included in Eximon. For comments on their
14usage, see em_hdr.h and globals.h. */
15
16
17/* The first set are unique to Eximon */
18
19Display *X_display;
20XtAppContext X_appcon;
21
22XtActionsRec actionTable[] = {
23 { "dialogAction", (XtActionProc)dialogAction}};
24
25int actionTableSize = sizeof(actionTable)/sizeof(XtActionsRec);
26
27XtTranslations queue_trans;
28XtTranslations text_trans;
29
30Widget dialog_ref_widget;
31Widget toplevel_widget;
32Widget log_widget = NULL;
33Widget queue_widget;
34Widget unhide_widget = NULL;
35
36
37FILE *LOG;
38
39int action_output = FALSE;
40int action_queue_update = TRUE;
41uschar actioned_message[24];
42uschar *action_required;
43uschar *alternate_config = NULL;
44
8523533c
TK
45#ifdef EXPERIMENTAL_BRIGHTMAIL
46int bmi_run = 0;
47uschar *bmi_verdicts = NULL;
48#endif
49
059ec3d9
PH
50int body_max = 20000;
51
52uschar *exim_path = US BIN_DIRECTORY "/exim"
4d9c610b 53 "\0<---------------Space to patch exim_path->";
059ec3d9
PH
54
55int eximon_initialized = FALSE;
56
57int log_buffer_size = 10240;
58BOOL log_datestamping = FALSE;
59int log_depth = 150;
60uschar *log_display_buffer;
61uschar *log_file = NULL;
62uschar log_file_open[256];
63uschar *log_font = NULL;
64ino_t log_inode;
65long int log_position;
66int log_width = 600;
67
68uschar *menu_event = US"Shift<Btn1Down>";
69int menu_is_up = FALSE;
70int min_height = 162;
71int min_width = 103;
72
73pipe_item *pipe_chain = NULL;
74
75uschar *qualify_domain = NULL;
76int queue_depth = 200;
77uschar *queue_font = NULL;
78int queue_max_addresses = 10;
79skip_item *queue_skip = NULL;
80uschar *queue_stripchart_name = NULL;
81int queue_update = 60;
82int queue_width = 600;
83
84pcre *yyyymmdd_regex;
85
86uschar *size_stripchart = NULL;
87uschar *size_stripchart_name = NULL;
88int spool_is_split = FALSE;
89int start_small = FALSE;
90int stripchart_height = 90;
91int stripchart_number = 1;
92pcre **stripchart_regex;
93uschar **stripchart_title;
94int *stripchart_total;
95int stripchart_update = 60;
96int stripchart_width = 80;
97int stripchart_varstart = 1;
98
99int text_depth = 200;
100int tick_queue_accumulator = 999999;
101
102uschar *window_title = US"exim monitor";
103
104
105/***********************************************************/
106/***********************************************************/
107
108
109/* These ones are used by Exim modules included in Eximon. Not all are
110actually relevant to the operation of Eximon. If SPOOL_DIRECTORY is not
111defined (Exim was compiled with it unset), just define it empty. The script
112that fires up the monitor fishes the value out by using -bP anyway. */
113
114#ifndef SPOOL_DIRECTORY
115#define SPOOL_DIRECTORY ""
116#endif
117
38a0a95f
PH
118tree_node *acl_var_c = NULL;
119tree_node *acl_var_m = NULL;
059ec3d9
PH
120uschar *active_hostname = NULL;
121BOOL allow_unqualified_recipient = FALSE;
122BOOL allow_unqualified_sender = FALSE;
123uschar *authenticated_id = NULL;
124uschar *authenticated_sender = NULL;
125
126uschar *big_buffer = NULL;
127int big_buffer_size = BIG_BUFFER_SIZE;
128int body_linecount = 0;
129int body_zerocount = 0;
130
131BOOL deliver_firsttime = FALSE;
132BOOL deliver_freeze = FALSE;
19050083 133time_t deliver_frozen_at = 0;
059ec3d9 134BOOL deliver_manual_thaw = FALSE;
4d9c610b 135
015f07e6 136#ifndef DISABLE_DKIM
51cbd3e1
TK
137uschar *dkim_cur_signer = NULL;
138uschar *dkim_signers = NULL;
015f07e6
TK
139uschar *dkim_signing_domain = NULL;
140uschar *dkim_signing_selector = NULL;
51cbd3e1 141uschar *dkim_verify_signers = US"$dkim_signers";
015f07e6
TK
142BOOL dkim_collect_input = FALSE;
143BOOL dkim_disable_verify = FALSE;
1d805650
TK
144#endif
145
059ec3d9
PH
146BOOL dont_deliver = FALSE;
147
6c1c3d1d
WB
148#ifdef EXPERIMENTAL_DSN
149int dsn_ret = 0;
150uschar *dsn_envid = NULL;
151#endif
152
8523533c 153#ifdef WITH_CONTENT_SCAN
29aba418 154int fake_response = OK;
8523533c
TK
155#endif
156
059ec3d9
PH
157header_line *header_last = NULL;
158header_line *header_list = NULL;
159
b08b24c8 160BOOL host_lookup_deferred = FALSE;
059ec3d9
PH
161BOOL host_lookup_failed = FALSE;
162uschar *interface_address = NULL;
163int interface_port = 0;
164
165BOOL local_error_message = FALSE;
166uschar *local_scan_data = NULL;
167BOOL log_timezone = FALSE;
8523533c
TK
168
169#ifdef WITH_CONTENT_SCAN
83e11d00
MH
170uschar *spam_bar = NULL;
171uschar *spam_report = NULL;
172uschar *spam_score = NULL;
8523533c
TK
173uschar *spam_score_int = NULL;
174#endif
175
d677b2f2 176int max_received_linelength= 0;
059ec3d9
PH
177int message_age = 0;
178uschar *message_id;
179uschar *message_id_external;
180uschar message_id_option[MESSAGE_ID_LENGTH + 3];
181
182int message_linecount = 0;
183int message_size = 0;
184uschar message_subdir[2] = { 0, 0 };
185
186gid_t originator_gid;
187uschar *originator_login;
188uid_t originator_uid;
189
190uschar *primary_hostname = NULL;
191
192int received_count = 0;
193uschar *received_protocol = NULL;
194int received_time = 0;
195int recipients_count = 0;
196recipient_item *recipients_list = NULL;
197int recipients_list_max = 0;
198int running_in_test_harness=FALSE;
199
200uschar *sender_address = NULL;
201uschar *sender_fullhost = NULL;
202uschar *sender_helo_name = NULL;
203uschar *sender_host_address = NULL;
204uschar *sender_host_authenticated = NULL;
205uschar *sender_host_name = NULL;
206int sender_host_port = 0;
207uschar *sender_ident = NULL;
208BOOL sender_local = FALSE;
209BOOL sender_set_untrusted = FALSE;
1f5b4c3d 210uschar *smtp_active_hostname = NULL;
059ec3d9
PH
211
212BOOL split_spool_directory = FALSE;
213uschar *spool_directory = US SPOOL_DIRECTORY;
214int string_datestamp_offset=-1;
f1e5fef5
PP
215int string_datestamp_length= 0;
216int string_datestamp_type = -1;
059ec3d9
PH
217
218BOOL timestamps_utc = FALSE;
817d9f57
JH
219tls_support tls_in = {
220 -1, /* tls_active */
6c60858c 221 0, /* bits */
817d9f57 222 FALSE, /* tls_certificate_verified */
e91ad4a7
JH
223#ifdef EXPERIMENTAL_DANE
224 FALSE, /* dane_verified */
225 0, /* tlsa_usage */
226#endif
817d9f57
JH
227 NULL, /* tls_cipher */
228 FALSE, /* tls_on_connect */
229 NULL, /* tls_on_connect_ports */
230 NULL, /* tls_peerdn */
231 NULL /* tls_sni */
232};
059ec3d9
PH
233
234tree_node *tree_duplicates = NULL;
235tree_node *tree_nonrecipients = NULL;
236tree_node *tree_unusable = NULL;
237
238uschar *version_date = US"?";
239uschar *version_string = US"?";
240
241int warning_count = 0;
242
243/* End of em_globals.c */