]> git.ipfire.org Git - thirdparty/sarg.git/blob - include/conf.h
LDAP usertab feature added
[thirdparty/sarg.git] / include / conf.h
1 #include "config.h"
2 #include "info.h"
3 #include "btree_cache.h"
4
5 #ifdef HAVE_WINDOWS_H
6 #include <windows.h>
7 #endif
8 #ifdef HAVE_STDIO_H
9 #include <stdio.h>
10 #endif
11 #ifdef HAVE_STDLIB_H
12 #include <stdlib.h>
13 #endif
14 #ifdef HAVE_STRING_H
15 #include <string.h>
16 #endif
17 #ifdef HAVE_STRINGS_H
18 #include <strings.h>
19 #endif
20 #ifdef HAVE_SYS_TIME_H
21 #include <sys/time.h>
22 #endif
23 #ifdef HAVE_TIME_H
24 #include <time.h>
25 #endif
26 #ifdef HAVE_SYS_RESOURCE_H
27 #include <sys/resource.h>
28 #endif
29 #ifdef HAVE_UNISTD_H
30 #include <unistd.h>
31 #endif
32 #if defined(HAVE_SYS_DIRENT_H) && !defined(HAVE_DIRENT_H)
33 #include <sys/dirent.h>
34 #endif
35 #ifdef HAVE_DIRENT_H
36 #include <dirent.h>
37 #endif
38 #ifdef HAVE_SYS_SOCKET_H
39 #include <sys/socket.h>
40 #endif
41 #ifdef HAVE_NETDB_H
42 #include <netdb.h>
43 #endif
44 #ifdef HAVE_TYPES_H
45 #include <types.h>
46 #endif
47 #ifdef HAVE_NETINET_IN_H
48 #include <netinet/in.h>
49 #endif
50 #ifdef HAVE_ARPA_INET_H
51 #include <arpa/inet.h>
52 #endif
53 #ifdef HAVE_SYS_STAT_H
54 #include <sys/stat.h>
55 #endif
56 #ifdef HAVE_CTYPE_H
57 #include <ctype.h>
58 #endif
59 #ifdef HAVE_ERRNO_H
60 #include <errno.h>
61 #endif
62 #ifdef HAVE_SYS_WAIT_H
63 #include <sys/wait.h>
64 #endif
65 #ifdef HAVE_GD_H
66 #include <gd.h>
67 #define HAVE_GD
68 gdImagePtr im;
69 gdPoint points[4];
70 #endif
71 #ifdef HAVE_GDFONTL_H
72 #include <gdfontl.h>
73 #endif
74 #ifdef HAVE_GDFONTT_H
75 #include <gdfontt.h>
76 #endif
77 #ifdef HAVE_GDFONTS_H
78 #include <gdfonts.h>
79 #endif
80 #ifdef HAVE_GDFONTMB_H
81 #include <gdfontmb.h>
82 #endif
83 #ifdef HAVE_GDFONTG_H
84 #include <gdfontg.h>
85 #endif
86 #ifdef HAVE_STDARG_H
87 #include <stdarg.h>
88 #endif
89 #ifdef HAVE_INTTYPES_H
90 #include <inttypes.h>
91 #endif
92 #ifdef HAVE_LIMITS_H
93 #include <limits.h>
94 #endif
95 #ifdef HAVE_WINSOCK_H
96 #include <winsock.h>
97 #endif
98 #ifdef HAVE_LDAP_H
99 #include <ldap.h>
100 #endif
101 #ifdef HAVE_MATH_H
102 #include <math.h>
103 #endif
104
105 #if defined(HAVE_FOPEN64)
106 #define _FILE_OFFSET_BITS 64
107 #define MY_FOPEN fopen64
108 #else
109 #define MY_FOPEN fopen
110 #endif
111
112 #if !defined(HAVE_BZERO)
113 #define bzero(mem,size) memset(mem,0,size)
114 #endif
115
116 #if defined(IBERTY_LIB) && !defined(HAVE_MKSTEMP)
117 int mkstemps(char *template, int suffixlen);
118 #define mkstemp(template) mkstemps(template,0)
119 #endif
120
121 #if defined(__MINGW32__)
122 #define mkdir(p,m) _mkdir(p)
123
124 #ifndef WIFEXITED
125 #define WIFEXITED(S) 1
126 #endif
127
128 #ifndef WEXITSTATUS
129 #define WEXITSTATUS(S) (S)
130 #endif
131
132 #endif /*__MINGW32__*/
133
134 #define MAXLEN 20000
135 long long int my_atoll (const char *nptr);
136
137 FILE *fp_tt;
138
139 char outdir[MAXLEN];
140 char dirname[MAXLEN];
141 char buf[MAXLEN];
142 char url[MAXLEN];
143 char urly[MAXLEN];
144 char user[MAXLEN];
145 char period[MAXLEN];
146 char msg[1024];
147 char per_hour[128];
148 char code[MAXLEN];
149 char code2[MAXLEN];
150 char tmp[MAXLEN];
151 char tmp2[MAXLEN];
152 char tmp3[MAXLEN];
153 char tmp4[MAXLEN];
154 char tmp5[MAXLEN];
155 char tmp6[MAXLEN];
156 char tmp7[MAXLEN];
157 char parse_out[MAXLEN];
158 char arqtt[MAXLEN];
159 char html[MAXLEN];
160 char datestimes[MAXLEN];
161 char ConfigFile[MAXLEN];
162 char href[MAXLEN];
163 char href2[MAXLEN];
164 char href3[MAXLEN];
165 char df[20];
166 char day[3], month[4], year[5];
167 char nmonth[30];
168 char ltext110[50];
169 char cdfrom[30];
170 char cduntil[30];
171 char LastLog[5];
172 char RemoveTempFiles[4];
173 char ReplaceIndex[256];
174 char Index[20];
175 char OverwriteReport[4];
176 char u2[255];
177 char RecordsWithoutUser[20];
178 char UseComma[4];
179 char MailUtility[PATH_MAX];
180 char TopSitesNum[20];
181 int TopUsersNum;
182 char ExcludeCodes[256];
183 char TopsitesSortField[15];
184 char TopsitesSortType[20];
185 char ReportType[255];
186 char UserTabFile[255];
187 char warea[MAXLEN];
188 char name[MAXLEN];
189 char LongUrl[20];
190 char Ip2Name[20];
191 char language[255];
192 char bufy[MAXLEN];
193 char AccessLog[MAXLEN];
194 char Title[MAXLEN];
195 char BgColor[MAXLEN];
196 char BgImage[MAXLEN];
197 char TxColor[MAXLEN];
198 char TxBgColor[MAXLEN];
199 char TiColor[MAXLEN];
200 char LogoImage[MAXLEN];
201 char LogoText[MAXLEN];
202 char LogoTextColor[MAXLEN];
203 char Width[MAXLEN];
204 char Height[MAXLEN];
205 char FontFace[MAXLEN];
206 char HeaderColor[MAXLEN];
207 char HeaderBgColor[MAXLEN];
208 char FontSize[MAXLEN];
209 char PasswdFile[MAXLEN];
210 char TempDir[MAXLEN];
211 char OutputDir[MAXLEN];
212 char OutputEmail[MAXLEN];
213 char TopuserSortField[30];
214 char UserSortField[30];
215 char TopuserSortOrder[10];
216 char UserSortOrder[10];
217 char UserAgentLog[255];
218 char module[255];
219 char ExcludeHosts[255];
220 char ExcludeUsers[255];
221 char DateFormat[2];
222 char PerUserLimitFile[255];
223 char PerUserLimit[20];
224 char UserIp[5];
225 char MaxElapsed[255];
226 char datetimeby[10];
227 char csort[255];
228 char CharSet[255];
229 char UserInvalidChar[255];
230 char Graphs[5];
231 char GraphDaysBytesBarColor[255];
232 char Privacy[10];
233 char PrivacyString[255];
234 char PrivacyStringColor[30];
235 char IncludeUsers[MAXLEN];
236 char ExcludeString[MAXLEN];
237 char SuccessfulMsg[5];
238 char TopUserFields[255];
239 char UserReportFields[255];
240 char DataFile[MAXLEN];
241 char DataFileDelimiter[3];
242 char DataFileFields[MAXLEN];
243 char DataFileUrl[20];
244 char SiteUserTimeDateType[10];
245 char ShowReadStatistics[5];
246 char IndexSortOrder[5];
247 char DansGuardianConf[MAXLEN];
248 char DansguardianIgnoreDate[10];
249 char SquidGuardConf[MAXLEN];
250 char SquidGuarddbHome[255];
251 char SquidGuardLogFormat[MAXLEN];
252 char SquidGuardLogAlternate[MAXLEN];
253 char SquidguardIgnoreDate[10];
254 char ShowSargInfo[5];
255 char BytesInSitesUsersReport[10];
256 char ShowSargLogo[5];
257 char ParsedOutputLog[MAXLEN];
258 char ParsedOutputLogCompress[255];
259 char DisplayedValues[20];
260 char HeaderFontSize[5];
261 char TitleFontSize[5];
262 char wwwDocumentRoot[MAXLEN];
263 char ExternalCSSFile[MAXLEN];
264 char BlockIt[255];
265 char BlockImage[512];
266 char NtlmUserFormat[30];
267 char hbc1[30];
268 char hbc2[255];
269 char hbc3[30];
270 char hbc4[30];
271 char hbc5[30];
272 char hbc6[30];
273 char hbc7[30];
274 char hbc8[30];
275 char hbc9[30];
276 char hbc10[30];
277 char IndexTree[10];
278 char UserAuthentication[10];
279 char AuthUserFile[255];
280 char AuthName[512];
281 char AuthType[255];
282 char Require[512];
283 char DownloadSuffix[MAXLEN];
284 char *userfile;
285 char *str;
286 char *str2;
287 char text[200][255];
288 char val1[MAXLEN];
289 char val2[MAXLEN];
290 char val3[MAXLEN];
291 char val4[MAXLEN];
292 char val5[MAXLEN];
293 char val6[MAXLEN];
294 char val7[MAXLEN];
295 char val8[MAXLEN];
296 char val9[MAXLEN];
297 char val10[MAXLEN];
298 char val11[MAXLEN];
299 char wwork1[MAXLEN];
300 char wwork2[MAXLEN];
301 char wwork3[MAXLEN];
302 char mask[MAXLEN];
303 char httplink[MAXLEN];
304 char html_old[MAXLEN];
305 char site[MAXLEN];
306 char us[50];
307 char email[MAXLEN];
308 char test[1];
309 char ouser2[255];
310 char user2[MAXLEN];
311 char wentp[512];
312 char addr[MAXLEN];
313 char Ulimit[6];
314 char RealtimeTypes[1024];
315 char cmd[255];
316 char ImageFile[255];
317 char tbuf[128];
318 char ip[25];
319 char RealtimeUnauthRec[15];
320 char LDAPHost[255];
321 char LDAPBindDN[512];
322 char LDAPBindPW[255];
323 char LDAPPort[16];
324 char LDAPProtocolVersion[3];
325 char LDAPBaseSearch[255];
326 char LDAPFilterSearch[512];
327 char LDAPTargetAttr[64];
328
329 int idate;
330 int smartfilter;
331 int denied_count;
332 int download_count;
333 int authfail_count;
334 int dansguardian_count;
335 int squidguard_count;
336 int limit_flag;
337 int color1;
338 int color2;
339 int color3;
340 int z1, z2, z3;
341 int ttopen;
342 int ind2;
343 int sarglog;
344 int isalog;
345 int dfrom;
346 int duntil;
347 int dataonly;
348 int indexonly;
349 int iprel;
350 int userip;
351 int langcode;
352 int debug;
353 int debugz;
354 int debugm;
355 int AuthfailReportLimit;
356 int DeniedReportLimit;
357 int DownloadReportLimit;
358 int SiteUsersReportLimit;
359 int DansGuardianReportLimit;
360 int SquidGuardReportLimit;
361 int UserReportLimit;
362 int dotinuser;
363 int realtime_refresh;
364 int realtime_access_log_lines;
365 int realt;
366 int rc;
367 int ntopsites;
368 int nsitesusers;
369 int nrepday;
370 int ndownload;
371 int ntopuser;
372 int squid24;
373 float perc;
374
375 long long int nocost;
376 float cost;
377
378 typedef struct
379 { int list[ 24 ];
380 int len;
381 } numlist;
382
383 DIR *dirp;
384 struct dirent *direntp;