ezmlmx 0.68
ezmlmx
Loading...
Searching...
No Matches
ezmlm-make.c
Go to the documentation of this file.
1#include <sys/types.h>
2#include <sys/stat.h>
3#include <sys/time.h>
4#include <unistd.h>
5#include "getoptb.h"
6#include "stralloc.h"
7#include "exit.h"
8#include "readwrite.h"
9#include "open.h"
10#include "buffer.h"
11#include "str.h"
12#include "auto_bin.h"
13#include "getln.h"
14#include "error.h"
15#include "lock.h"
16#include "errtxt.h"
17#include "idx.h"
18#include "auto_version.h"
19#include "logmsg.h"
20#include "lockfile.h"
21#include "case.h"
22
23#define WHO "ezmlm-make"
24
45
46#define NO_FLAGS ('z' - 'a' + 1)
47
48const char *defflags = "ap"; /* archived list -a */
49int flags[NO_FLAGS]; /* holds flags */
50
51const char *popt[10];
52stralloc dotplus = {0};
53stralloc dirplus = {0};
54stralloc line = {0};
55
56static void die_usage() { logmsg(WHO,100,USAGE,"ezmlm-make [-+] [ -a..zA..Z03..9 ] dir dot local host"); }
57static void die_nomem() { logmsg(WHO,111,FATAL,ERR_NOMEM); }
58
59stralloc cmdline = {0};
60stralloc outline = {0};
61buffer bi;
62char textbuf[1024];
63
64stralloc fname = {0}; /* file name */
65stralloc oldfname = {0}; /* file name from prevoius tag */
66stralloc dname = {0}; /* directory name */
67stralloc lname = {0}; /* link name */
68stralloc template = {0}; /* template file name */
69stralloc ext1 = {0}; /* dot = dir/.qmail-ext1-ext2-list */
70stralloc ext2 = {0};
71stralloc flag = {0};
72stralloc key = {0};
73struct timeval tv;
74char sz[2] = "?";
75
76void keyadd(unsigned long u)
77{
78 char ch;
79 ch = (char) u; if (!stralloc_append(&key,&ch)) die_nomem(); u >>= 8;
80 ch = (char) u; if (!stralloc_append(&key,&ch)) die_nomem(); u >>= 8;
81 ch = (char) u; if (!stralloc_append(&key,&ch)) die_nomem(); u >>= 8;
82 ch = (char) u; if (!stralloc_append(&key,&ch)) die_nomem();
83}
84
86{
87 gettimeofday(&tv,(struct timezone *) 0);
88 keyadd(tv.tv_usec);
89}
90
91char *dir;
92char *dot;
93char *local = (char *) 0;
94char *host = (char *) 0;
95
96void dirplusmake(char *slash)
97{
98 if (!stralloc_copys(&dirplus,dir)) die_nomem();
99 if (!stralloc_cats(&dirplus,slash)) die_nomem();
100 if (!stralloc_0(&dirplus)) die_nomem();
101}
102
103void linkdotdir(const char *dash,char *slash)
104{
105 if (!stralloc_copys(&dotplus,dot)) die_nomem();
106 if (!stralloc_cats(&dotplus,dash)) die_nomem();
107 if (!stralloc_0(&dotplus)) die_nomem();
108 dirplusmake(slash);
109 if (flags['e' - 'a'])
110 if (unlink(dotplus.s) == -1)
111 if (errno != ENOENT)
112 logmsg(WHO,111,FATAL,B(ERR_DELETE,dotplus.s));
113 if (symlink(dirplus.s,dotplus.s) == -1)
114 logmsg(WHO,111,FATAL,B(ERR_CREATE,dotplus.s));
115 keyaddtime();
116}
117
118void dcreate(char *slash)
119{
120 dirplusmake(slash);
121 if (mkdir(dirplus.s,0755) == -1)
122 if ((errno != EEXIST) || !flags['e' - 'a'])
123 logmsg(WHO,111,FATAL,B(ERR_CREATE,dirplus.s));
124 keyaddtime();
125}
126
127buffer bo;
128char outbuf[BUFFER_OUTSIZE];
129
130void f_open(char *slash)
131{
132 int fd;
133
134 dirplusmake(slash);
135 fd = open_trunc(dirplus.s);
136 if (fd == -1)
137 logmsg(WHO,111,FATAL,B(ERR_READ,dirplus.s));
138
139 buffer_init(&bo,buffer_unixwrite,fd,outbuf,sizeof(outbuf));
140}
141
142void f_put(const char *buf,unsigned int len)
143{
144 if (buffer_put(&bo,buf,len) == -1)
145 logmsg(WHO,111,FATAL,B(ERR_WRITE,dirplus.s));
146}
147void f_puts(char *buf)
148{
149 if (buffer_puts(&bo,buf) == -1)
150 logmsg(WHO,111,FATAL,B(ERR_WRITE,dirplus.s));
151}
152
154{
155 if (buffer_flush(&bo) == -1)
156 logmsg(WHO,111,FATAL,B(ERR_FLUSH,dirplus.s));
157 if (fsync(bo.fd) == -1)
158 logmsg(WHO,111,FATAL,B(ERR_SYNC,dirplus.s));
159 if (close(bo.fd) == -1) /* NFS stupidity */
160 logmsg(WHO,111,FATAL,B(ERR_CLOSE,dirplus.s));
161 keyaddtime();
162}
163
164void frm(char *slash)
165{
166 dirplusmake(slash);
167 if (unlink(dirplus.s) == -1)
168 if (errno != ENOENT)
169 logmsg(WHO,111,FATAL,B(ERR_DELETE,dirplus.s));
170}
171
172
173int main(int argc,char **argv)
174{
175 unsigned long euid;
176 int opt;
177 int flagdo;
178 int flagnot;
179 int flagover;
180 int flagnotexist = 0;
181 int flagforce = 0;
182 int flagforce_p = 0;
183 int usecfg = 0;
184 int match;
185 unsigned int next, i, j;
186 int last;
187 unsigned int slpos,hashpos,pos;
188 int fdin, fdlock, fdtmp;
189 char *p;
190 char *oldflags = (char *) 0;
191 char *code = (char *) 0;
192 const char *cfname = (char *) 0; /* config file if spec as -C cf_file */
193 unsigned char ch;
194
195 keyadd((unsigned long) getpid());
196 keyadd((unsigned long) getppid());
197 euid = (unsigned long) geteuid();
198 keyadd(euid);
199 keyadd((unsigned long) getgid());
200 gettimeofday(&tv,(struct timezone *) 0);
201 keyadd(tv.tv_sec);
202
203 (void) umask(077); /* flags with defined use. vV for version. Others free */
204
205 for (pos = 0; pos < (unsigned int) NO_FLAGS; pos++) {
206 flags[pos] = 0;
207 }
208 for (pos = 0; pos < 10; popt[pos++] = (char *) 0);
209
210 while ((opt = getoptb(argc,(char **)argv,
211 "+aAbBcC:dDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0:3:4:5:6:7:8:9:")) != opteof) {
212 if (opt == 'v' || opt == 'V')
213 logmsg(WHO,0,VERSION,auto_version);
214 if (opt == 'C') /* treat this like nl switch to allow override of -c */
215 cfname = optarg;
216
217 if (opt >= 'a' && opt <= 'z') {
218 flags[opt - 'a'] = 3; /* Dominant "set" */
219 if (opt == 'e') flagforce++; /* two 'e' => ignore 'E' */
220 } else if (opt >= 'A' && opt <= 'Z') {
221 flags[opt - 'A'] = 2; /* Dominant "unset" */
222 } else if (opt >= '0' && opt <= '9') {
223 popt[opt - '0'] = optarg;
224 } else if (opt == '+') {
225 flagforce_p++; /* two '+' => ignore 'E' */
226 flags['e' - 'a'] = 3; /* -+ implies -e */
227 usecfg = 1;
228 } else
229 die_usage();
230 }
231 argv += optind;
232
233 if (flagforce_p > 1 || flagforce > 1)
234 flagforce = 1;
235 else
236 flagforce = 0;
237
238 if (!(dir = *argv++)) die_usage();
239 if (dir[0] != '/') logmsg(WHO,100,FATAL,B(ERR_SLASH,dir));
240 if (dir[str_chr(dir,'\'')]) logmsg(WHO,100,FATAL,ERR_QUOTE);
241 if (dir[str_chr(dir,'\n')]) logmsg(WHO,100,FATAL,ERR_NEWLINE);
242
243 if (flags['e' - 'a'] & 1) { /* lock for edit */
244 dirplusmake("/lock");
246
247 dirplusmake("/config"); /* for edit, try to get args from dir/config */
248 if ((fdin = open_read(dirplus.s)) == -1) {
249 if (errno != ENOENT) { logmsg(WHO,111,FATAL,B(ERR_READ,dirplus.s)); }
250 } else {
251 buffer_init(&bi,buffer_unixread,fdin,textbuf,sizeof(textbuf));
252
253 for (;;) {
254 if (getln(&bi,&line,&match,'\n') == -1)
255 logmsg(WHO,111,FATAL,B(ERR_READ,dirplus.s));
256 if (!match) break;
257 if (line.s[0] == '#') continue;
258 if (line.len == 1) break;
259 if (line.s[1] != ':') break;
260 line.s[line.len - 1] = '\0';
261 if (!stralloc_cat(&cmdline,&line)) die_nomem();
262 }
263 close(fdin);
264
265 pos = 0;
266 while (pos < cmdline.len) {
267 ch = cmdline.s[pos];
268 pos += 2;
269
270 switch (ch) {
271 case 'X': if (euid && !flags['c' - 'a'] && (!cfname))
272 cfname = cmdline.s + pos; /* cmdline overrides */
273 break; /* for safety: ignore if root */
274 case 'T': dot = cmdline.s + pos; break;
275 case 'L': local = cmdline.s + pos; break;
276 case 'H': host = cmdline.s + pos; break;
277 case 'C': code = cmdline.s + pos; break;
278 case 'D': break; /* no reason to check */
279 case 'F': oldflags = cmdline.s + pos; break;
280 default: if (ch == '0' || (ch >= '3' && ch <= '9')) {
281 if (usecfg && !popt[ch - '0'])
282 popt[ch - '0'] = cmdline.s + pos;
283 } else
284 logmsg(WHO,111,FATAL,B(ERR_SYNTAX,dirplus.s," ",cmdline.s + pos));
285 break;
286 }
287 pos += str_len(cmdline.s + pos) + 1;
288 }
289 }
290 }
291
292 if ((p = *argv++) != 0) {
293 dot = p;
294 if ((p = *argv++) != 0) {
295 if (!local || str_diff(local,p))
296 flagforce = 1; /* must rewrite if list name changed */
297 local = p;
298 if ((p = *argv++) != 0) {
299 if (!host || str_diff(host,p))
300 flagforce = 1; /* must rewrite if list name changed */
301 host = p;
302 if ((p = *argv++) != 0) {
303 code = p;
304 }
305 }
306 }
307 }
308
309 if (!dot || !local || !host) die_usage();
310 if (dot[0] != '/') logmsg(WHO,100,FATAL,B(ERR_SLASH,dot)); /* force absolute dot */
311
312 /* use flags from config, overridden with new values */
313 /* if there are old flags, we're in "edit" and "-+" */
314 /* Previous versions only wrote _set_ flags to */
315 /* to DIR/config. We need to make sure that we */
316 /* don't apply the defaults for non-specified ones! */
317
318 if (usecfg && oldflags && flags['e' - 'a']) {
319 while ((ch = *(oldflags++))) {
320 if (ch >= 'a' && ch <= 'z') { /* unset flags ignored */
321 if (ch != 'e')
322 if (!flags[ch - 'a']) /* cmd line overrides */
323 flags[ch - 'a'] = 1;
324 }
325 }
326 }
327
328 if (!usecfg) { /* apply defaults */
329 while (( ch = *(defflags++))) { /* gets used up! */
330 if (ch >= 'a' && ch <= 'z') { /* defensive! */
331 if (!flags[ch - 'a']) /* cmdline still overrides */
332 flags[ch - 'a'] = 1;
333 }
334 }
335 }
336
337 for (pos = 0; pos < (unsigned int) NO_FLAGS; pos++) { /* set real flags */
338 if (flags[pos] & 2) /* 2 = "dominant" 0 */
339 flags[pos] = flags[pos] & 1; /* 3 = "dominant" 1 */
340 }
341
342 if (local[str_chr(local,'\n')]) logmsg(WHO,100,FATAL,ERR_NEWLINE);
343 if (host[str_chr(host,'\n')]) logmsg(WHO,100,FATAL,ERR_NEWLINE);
344
345 /* build 'f' for <#F#> */
346
347 if (!stralloc_ready(&flag,28)) die_nomem();
348 if (!stralloc_copys(&flag,"-")) die_nomem();
349 for (ch = 0; ch <= 'z' - 'a'; ch++) { /* build string with flags */
350 if (flags[ch])
351 sz[0] = 'a' + ch;
352 else
353 sz[0] = 'A' + ch;
354 if (!stralloc_append(&flag,sz)) die_nomem();
355 }
356
357 fdin = -1; /* aboure failure for .ezmlmrc in case flags['c'-'a'] = 0 */
358 slpos = str_len(dot);
359 while ((--slpos > 0) && dot[slpos] != '/');
360 if (dot[slpos] == '/') {
361 if (!stralloc_copyb(&template,dot,slpos + 1)) die_nomem(); /* dot dir */
362 slpos += str_chr(dot+slpos,'-');
363 if (dot[slpos]) {
364 slpos++;
365 pos = slpos + str_chr(dot+slpos,'-');
366 if (dot[pos]) {
367 if (!stralloc_copyb(&ext1,dot + slpos,pos - slpos)) die_nomem();
368 pos++;
369 slpos = pos + str_chr(dot+pos,'-');
370 if (dot[slpos])
371 if (!stralloc_copyb(&ext2,dot + pos,slpos - pos)) die_nomem();
372 }
373 }
374 }
375 if (!stralloc_0(&ext1)) die_nomem();
376 if (!stralloc_0(&ext2)) die_nomem();
377 popt[1] = ext1.s;
378 popt[2] = ext2.s;
379
380 /* if 'c', template already has the dot directory. If 'C', cfname */
381 /* (if exists and != '') points to the file name to use instead. */
382
383 if (flags['c' - 'a'] || (cfname && *cfname)) {
384 if (!flags['c' - 'a']) { /* i.e. there is a cfname specified */
385 if (!stralloc_copys(&template,cfname)) die_nomem();
386 } else
387 if (!stralloc_cats(&template,TXT_DOTEZMLMRC)) die_nomem();
388 if (!stralloc_0(&template)) die_nomem();
389 if ((fdin = open_read(template.s)) == -1)
390 if (errno != ENOENT)
391 logmsg(WHO,111,FATAL,B(ERR_OPEN,template.s));
392 else
393 logmsg(WHO,100,FATAL,B(template.s,ERR_NOEXIST));
394 } else { /* /etc/ezmlmrc */
395 if (!stralloc_copys(&template,TXT_ETC_EZMLMRC)) die_nomem();
396 if (!stralloc_0(&template)) die_nomem();
397 if ((fdin = open_read(template.s)) == -1)
398 if (errno != ENOENT)
399 logmsg(WHO,111,FATAL,B(ERR_OPEN,template.s));
400 else { /* ezbin/ezmlmrc */
401 if (!stralloc_copys(&template,auto_bin)) die_nomem();
402 if (!stralloc_cats(&template,TXT_EZMLMRC)) die_nomem();
403 if (!stralloc_0(&template)) die_nomem();
404 if ((fdin = open_read(template.s)) == -1)
405 if (errno != ENOENT)
406 logmsg(WHO,111,FATAL,B(ERR_OPEN,template.s));
407 else
408 logmsg(WHO,100,FATAL,B(ERR_NOEXIST,template.s));
409 }
410 }
411
412 dcreate("");
413
414 /* This is all we do, the rest is up to ezmlmrc */
415 /* do it after opening template to avoid aborts */
416 /* with created DIR. Well we also write DIR/key */
417 /* at the end except in -e[dit] mode. */
418
419 buffer_init(&bi,buffer_unixread,fdin,textbuf,sizeof(textbuf));
420 if (!stralloc_0(&oldfname)) die_nomem(); /* init oldfname */
421 flagdo = 0;
422
423 if (getln(&bi,&line,&match,'\n') == -1)
424 logmsg(WHO,111,FATAL,B(ERR_READ,template.s));
425 if (!match)
426 logmsg(WHO,111,FATAL,B(ERR_READ,template.s));
427
428 if (!case_starts(line.s,auto_version))
429 logmsg(WHO,0,WARN,B(ERR_VERSION,auto_version," vs. ezmlmrc"));
430
431 for (;;) {
432 if (getln(&bi,&line,&match,'\n') == -1)
433 logmsg(WHO,111,FATAL,B(ERR_READ,template.s));
434 if (!match)
435 break;
436 if (line.s[0] == '#') /* comment */
437 continue;
438 if (!stralloc_0(&line)) die_nomem();
439 if (line.s[0] == '<' && line.s[1] == '/') { /* tag */
440 if (line.s[str_chr(line.s,'.')])
441 logmsg(WHO,100,FATAL,B(ERR_PERIOD,line.s));
442 flagdo = 1;
443 flagover = 0;
444 hashpos = 0;
445 pos = str_chr(line.s + 2,'#') + 2;
446 if (line.s[pos]) {
447 hashpos = pos;
448 pos++;
449 flagnot = 0;
450 while ((ch = line.s[pos]) &&
451 (line.s[pos] != '/' && line.s[pos+1] != '>')) {
452 if (ch == '^') {
453 flagnot = 1;
454 pos++;
455 continue;
456 }
457 /* E is ignored. For files => create unlebo exists */
458
459 if (ch == 'E' && !flagnot || (ch == 'e' && flagnot)) {
460 if (flags['e' - 'a'] && !flagforce)
461 flagover = 1; /* ignore #E & #^e, but set flagover */
462 } else if (ch >= 'a' && ch <= 'z') {
463 flagdo &= (flags[ch - 'a'] ^ flagnot);
464 } else if (ch >= 'A' && ch <= 'Z') {
465 flagdo &= !(flags[ch - 'A'] ^ flagnot);
466 } else if (ch >= '0' && ch <= '9') {
467 flagdo &= (popt[ch - '0'] && *popt[ch - '0']) ^flagnot;
468 }
469 flagnot = 0;
470 pos++;
471 }
472
473 if (line.s[pos] != '/' || line.s[pos+1] != '>')
474 logmsg(WHO,100,FATAL,B(ERR_ENDTAG,line.s));
475 } else {
476 flagdo = 1;
477 pos = 2; /* name needs to be >= 1 char */
478 while (line.s[pos = str_chr(line.s+pos,'/')+pos]) {
479 if (line.s[pos+1] == '>')
480 break;
481 pos++;
482 }
483 if (!line.s[pos])
484 logmsg(WHO,100,FATAL,B(ERR_ENDTAG,line.s));
485 }
486 if (hashpos)
487 pos = hashpos; /* points to after file name */
488
489 if (line.s[2] == '+') { /* mkdir */
490 if (!flagdo) continue;
491 if (!stralloc_copys(&dname,"/")) die_nomem();
492 if (!stralloc_catb(&dname,line.s + 3,pos - 3)) die_nomem();
493 if (!stralloc_0(&dname)) die_nomem();
494 dcreate(dname.s);
495 flagdo = 0;
496 continue;
497 } else if (line.s[2] == ':') { /* ln -s */
498 if (!flagdo) continue;
499 slpos = str_chr(line.s + 3,'/') + 3;
500 if (slpos >= pos)
501 logmsg(WHO,100,FATAL,B(ERR_LINKDIR,line.s));
502 if (!stralloc_copyb(&dname,line.s+slpos,pos-slpos)) die_nomem();
503 if (!stralloc_copyb(&lname,line.s+3,slpos-3)) die_nomem();
504 if (!stralloc_0(&dname)) die_nomem();
505 if (!stralloc_0(&lname)) die_nomem();
507 flagdo = 0;
508 continue;
509 } else if (line.s[2] == '-') { /* rm */
510 if (!flagdo) continue;
511 if (!stralloc_copys(&dname,"/")) die_nomem();
512 if (!stralloc_catb(&dname,line.s+3,pos-3)) die_nomem();
513 if (!stralloc_0(&dname)) die_nomem();
514 frm(dname.s);
515 flagdo = 0;
516 continue;
517 }
518
519 /* only plain files left; first get file name */
520
521 if (pos > 2) { /* </#ai/> => add to open file */
522 if (!stralloc_copyb(&fname,line.s+1,pos-1)) die_nomem();
523 if (!stralloc_0(&fname)) die_nomem();
524 }
525
526 if (str_diff(fname.s, oldfname.s)) {
527 flagnotexist = 1;
528
529 /* Treat special case of #E when editing which _should */
530 /* write only if the file does not exist. flagover */
531 /* is set if we need to check */
532
533 if (flagover) { /* skip if exists */
534 dirplusmake(fname.s); /* decided by FIRST tag for file */
535 fdtmp = open_read(dirplus.s);
536 if (fdtmp == -1) {
537 if (errno != ENOENT)
538 logmsg(WHO,111,FATAL,B(ERR_OPEN,dirplus.s));
539 } else {
540 flagnotexist = 0; /* already there - don't do it */
541 close(fdtmp);
542 }
543 }
544 if (oldfname.len > 1) {
545 f_close();
546 if (!stralloc_copys(&oldfname,"")) die_nomem();
547 if (!stralloc_0(&oldfname)) die_nomem();
548 }
549 if (flagdo && flagnotexist) {
550 if (!fname.len)
551 logmsg(WHO,100,FATAL,B(ERR_FILENAME,line.s));
552 f_open(fname.s);
553 if (!stralloc_copy(&oldfname,&fname)) die_nomem();
554 }
555 }
556 if (flagdo) flagdo = flagnotexist;
557 continue;
558 } else if (!flagdo) continue; // part not to go out
559
560 last = -1;
561 next = 0;
562 outline.len = 0;
563
564 for (;;) {
565 pos = next + str_chr(line.s + next,'<');
566 if (line.s[pos] &&
567 line.s[pos+1] == '#' &&
568 line.s[pos+2] &&
569 line.s[pos+3] == '#' &&
570 line.s[pos+4] == '>') { // host/local
571 if (!stralloc_catb(&outline,line.s + last + 1,pos - last - 1)) die_nomem();
572 switch (line.s[pos+2]) {
573 case 'B': if (!stralloc_cats(&outline,auto_bin)) die_nomem();
574 last = pos + 4; next = pos + 5; break; // base path
575 case 'C': if (code && *code) // digest code
576 if (!stralloc_cats(&outline,code)) die_nomem();
577 last = pos + 4; next = pos + 5; break;
578 case 'D': if (!stralloc_cats(&outline,dir)) die_nomem(); // listidr
579 last = pos + 4; next = pos + 5; break;
580 case 'F': if (!stralloc_cat(&outline,&flag)) die_nomem(); // flags
581 last = pos + 4; next = pos + 5; break;
582 case 'H': if (!stralloc_cats(&outline,host)) die_nomem(); // hostname
583 last = pos + 4; next = pos + 5; break;
584 case 'L': if (!stralloc_cats(&outline,local)) die_nomem(); // local
585 last = pos + 4; next = pos + 5; break;
586 case 'T': if (!stralloc_cats(&outline,dot)) die_nomem(); // dot
587 last = pos + 4; next = pos + 5; break;
588 case 'X': if (cfname) // config file name
589 if (!stralloc_cats(&outline,cfname)) die_nomem();
590 last = pos + 4; next = pos + 5; break;
591 default: /* copy unknown tag as is for e.g. <#A#> and*/
592 /* <#R#> to be processed by -manage/store */
593 /* stuff in args for <#0#> .. <#9#> */
594 if ((line.s[pos+2] >= '0') && (line.s[pos+2] <= '9')) {
595 if (popt[line.s[pos+2] - '0'])
596 if (!stralloc_cats(&outline,popt[line.s[pos+2]-'0']))
597 die_nomem();
598 } else
599 if (!stralloc_catb(&outline,line.s+pos,5)) die_nomem();
600 last = pos + 4; next = pos + 5; break;
601 }
602 } else { /* not tag */
603 if (line.s[pos]) {
604 next++;
605 } else {
606 if (!stralloc_catb(&outline,line.s+last+1,line.len-last-1))
607 die_nomem();
608 f_puts(outline.s);
609 break;
610 }
611 }
612 } // end for
613 }
614
615 close(fdin);
616 if (oldfname.len > 1)
617 f_close();
618
619 if (!flags['e' - 'a']) { /* don't redo key when editing a list */
620 f_open("/key");
621 f_put(key.s,key.len);
622 f_close();
623 }
624 _exit(0);
625
626 return 0;
627}
#define TXT_ETC_EZMLMRC
Definition idx.h:254
#define TXT_DOTEZMLMRC
Definition idx.h:260
#define TXT_EZMLMRC
Definition idx.h:257
const char auto_version[]
Error messages. If you translate these, I would urge you to keep the English version as well....
#define ERR_FLUSH
Definition errtxt.h:20
#define ERR_NOMEM
Definition errtxt.h:14
#define ERR_SYNC
Definition errtxt.h:22
#define ERR_OPEN
Definition errtxt.h:30
#define ERR_QUOTE
Definition errtxt.h:120
#define ERR_NOEXIST
Definition errtxt.h:40
#define ERR_ENDTAG
Definition errtxt.h:114
#define ERR_DELETE
Definition errtxt.h:25
#define ERR_PERIOD
Definition errtxt.h:117
#define ERR_READ
Definition errtxt.h:18
#define ERR_SYNTAX
Definition errtxt.h:121
#define ERR_VERSION
Definition errtxt.h:113
#define ERR_FILENAME
Definition errtxt.h:116
#define ERR_CREATE
Definition errtxt.h:28
#define ERR_WRITE
Definition errtxt.h:17
#define ERR_LINKDIR
Definition errtxt.h:115
#define ERR_SLASH
Definition errtxt.h:118
#define ERR_CLOSE
Definition errtxt.h:16
#define ERR_NEWLINE
Definition errtxt.h:119
int lockfile(const char *)
Definition lockfile.c:15
void die_nomem()
Definition getconf.c:17
#define WHO
Definition author.c:1
int flagdo
Definition ezmlm-get.c:50
char outbuf[1024]
char * dir
buffer bi
buffer bo
int main()
Definition ezmlm-weed.c:69
const char * cfname
const char auto_bin[]
Definition auto_bin.c:1
int opt
Definition ezmlm-cron.c:53
int fdin
Definition ezmlm-cron.c:71
unsigned int len
Definition ezmlm-cron.c:68
const char * code
Definition ezmlm-cron.c:75
int fdlock
Definition ezmlm-cron.c:71
char buf[256]
Definition install.c:113
void f_puts(char *buf)
Definition ezmlm-make.c:147
const char * popt[10]
Definition ezmlm-make.c:51
char * dot
Definition ezmlm-make.c:92
stralloc ext1
Definition ezmlm-make.c:69
void dcreate(char *slash)
Definition ezmlm-make.c:118
int flags[NO_FLAGS]
Definition ezmlm-make.c:49
stralloc dname
Definition ezmlm-make.c:66
stralloc lname
Definition ezmlm-make.c:67
stralloc dotplus
Definition ezmlm-make.c:52
stralloc flag
Definition ezmlm-make.c:71
char sz[2]
Definition ezmlm-make.c:74
struct timeval tv
Definition ezmlm-make.c:73
#define NO_FLAGS
Definition ezmlm-make.c:46
void keyaddtime()
Definition ezmlm-make.c:85
void f_close()
Definition ezmlm-make.c:153
void linkdotdir(const char *dash, char *slash)
Definition ezmlm-make.c:103
stralloc dirplus
Definition ezmlm-make.c:53
void f_put(const char *buf, unsigned int len)
Definition ezmlm-make.c:142
const char * defflags
Definition ezmlm-make.c:48
void frm(char *slash)
Definition ezmlm-make.c:164
void dirplusmake(char *slash)
Definition ezmlm-make.c:96
stralloc oldfname
Definition ezmlm-make.c:65
void keyadd(unsigned long u)
Definition ezmlm-make.c:76
stralloc ext2
Definition ezmlm-make.c:70
void f_open(char *slash)
Definition ezmlm-make.c:130
stralloc cmdline
Definition ezmlm-make.c:59
char * host
Definition ezmlm-cgi.c:107
char * local
Definition ezmlm-cgi.c:106
stralloc fname
Definition ezmlm-cgi.c:124
int fd
Definition ezmlm-cgi.c:141
int match
Definition ezmlm-cgi.c:140
unsigned long euid
Definition ezmlm-cgi.c:134
const char * logmsg(const char *dir, unsigned long num, unsigned long listno, unsigned long subs, int done)
Definition loginfo.c:32