326 |
; |
; |
327 |
|
|
328 |
clientpemfile : /* EMPTY */ { Run.httpsslclientpem= NULL; } |
clientpemfile : /* EMPTY */ { Run.httpsslclientpem= NULL; } |
329 |
| CLIENTPEMFILE PATH { Run.httpsslclientpem= $2; } |
| CLIENTPEMFILE PATH { Run.httpsslclientpem= $2; |
330 |
|
Run.clientssl= TRUE; } |
331 |
; |
; |
332 |
|
|
333 |
allowselfcert : /* EMPTY */ { Run.allowselfcert= FALSE; } |
allowselfcert : /* EMPTY */ { Run.allowselfcert= FALSE; } |
382 |
; |
; |
383 |
|
|
384 |
type : /* EMPTY */ { portset.type= SOCK_STREAM; } |
type : /* EMPTY */ { portset.type= SOCK_STREAM; } |
385 |
| TYPE TCP { portset.type= SOCK_STREAM; } |
| TYPE TCP { portset.type= SOCK_STREAM; |
386 |
|
Run.servicessl= TRUE; } |
387 |
| TYPE TCPSSL certmd5 { portset.type= SOCK_STREAM; |
| TYPE TCPSSL certmd5 { portset.type= SOCK_STREAM; |
388 |
portset.ssl= TRUE; } |
portset.ssl= TRUE; } |
389 |
| TYPE UDP { portset.type= SOCK_DGRAM; } |
| TYPE UDP { portset.type= SOCK_DGRAM; } |
546 |
*/ |
*/ |
547 |
void yyerror(const char *msg) { |
void yyerror(const char *msg) { |
548 |
|
|
549 |
|
ASSERT(msg); |
550 |
|
|
551 |
error("%s: %s '%s' at line %d\n", prog, msg, yytext, lineno ); |
error("%s: %s '%s' at line %d\n", prog, msg, yytext, lineno ); |
552 |
cfg_errflag++; |
cfg_errflag++; |
553 |
|
|
560 |
*/ |
*/ |
561 |
int parse(char *controlfile) { |
int parse(char *controlfile) { |
562 |
|
|
563 |
|
ASSERT(controlfile); |
564 |
|
|
565 |
processlist= tail= current= NULL; |
processlist= tail= current= NULL; |
566 |
|
|
567 |
if(! check_rcfile(controlfile)) { |
if(! check_rcfile(controlfile)) { |
613 |
Run.dolog= FALSE; |
Run.dolog= FALSE; |
614 |
Run.dohttpd= FALSE; |
Run.dohttpd= FALSE; |
615 |
Run.Auth.defined= FALSE; |
Run.Auth.defined= FALSE; |
616 |
|
Run.servicessl= FALSE; |
617 |
|
Run.clientssl= FALSE; |
618 |
reset_runmail(); |
reset_runmail(); |
619 |
if(Run.bind_addr) { |
if(Run.bind_addr) { |
620 |
free(Run.bind_addr); |
free(Run.bind_addr); |
631 |
*/ |
*/ |
632 |
static void createprocess(char *name, char *pidfile) { |
static void createprocess(char *name, char *pidfile) { |
633 |
|
|
634 |
|
ASSERT(name); |
635 |
|
ASSERT(pidfile); |
636 |
|
|
637 |
if ( current ) { |
if ( current ) { |
638 |
|
|
639 |
createprocinfo(); |
createprocinfo(); |
692 |
|
|
693 |
Dependant_T d= NEW(d); |
Dependant_T d= NEW(d); |
694 |
|
|
695 |
|
ASSERT(dependant); |
696 |
|
|
697 |
if (current->dependantlist != NULL) { |
if (current->dependantlist != NULL) { |
698 |
d->next= current->dependantlist; |
d->next= current->dependantlist; |
699 |
} |
} |
711 |
|
|
712 |
Checksum_T c= NEW(c); |
Checksum_T c= NEW(c); |
713 |
|
|
714 |
|
ASSERT(filename); |
715 |
|
|
716 |
c->file= filename; |
c->file= filename; |
717 |
|
|
718 |
if ( sum ) { |
if ( sum ) { |
750 |
|
|
751 |
Mail_T m= NEW(m); |
Mail_T m= NEW(m); |
752 |
|
|
753 |
|
ASSERT(mailto); |
754 |
|
|
755 |
if ( f->timeout || f->restart || f->checksum ) { |
if ( f->timeout || f->restart || f->checksum ) { |
756 |
|
|
757 |
m->alert_on_timeout= f->timeout; |
m->alert_on_timeout= f->timeout; |
792 |
char address[STRLEN]; |
char address[STRLEN]; |
793 |
Port_T p= NEW(p); |
Port_T p= NEW(p); |
794 |
|
|
795 |
|
ASSERT(pp); |
796 |
|
|
797 |
p->socket= pp->socket; |
p->socket= pp->socket; |
798 |
p->hostname= pp->hostname; |
p->hostname= pp->hostname; |
799 |
p->port= pp->port; |
p->port= pp->port; |
854 |
|
|
855 |
Resource_T r= NEW(r); |
Resource_T r= NEW(r); |
856 |
|
|
857 |
|
ASSERT(rr); |
858 |
|
|
859 |
if ( ! Run.doprocess ) { |
if ( ! Run.doprocess ) { |
860 |
|
|
861 |
error("%s: Cannot activate process check at line %d\n" |
error("%s: Cannot activate process check at line %d\n" |
944 |
*/ |
*/ |
945 |
static void addargument(char *argument) { |
static void addargument(char *argument) { |
946 |
|
|
947 |
|
ASSERT(argument); |
948 |
|
|
949 |
if(! command) { |
if(! command) { |
950 |
|
|
951 |
command= NEW(command); |
command= NEW(command); |
994 |
*/ |
*/ |
995 |
static void setmailserver(char *mailserver) { |
static void setmailserver(char *mailserver) { |
996 |
|
|
997 |
|
ASSERT(mailserver); |
998 |
|
|
999 |
if ( Run.mailserver ) { |
if ( Run.mailserver ) { |
1000 |
|
|
1001 |
if ( is(Run.mailserver, mailserver) ) { |
if ( is(Run.mailserver, mailserver) ) { |
1019 |
*/ |
*/ |
1020 |
static void setuname(char *uname) { |
static void setuname(char *uname) { |
1021 |
|
|
1022 |
|
ASSERT(uname); |
1023 |
|
|
1024 |
if ( Run.Auth.uname ) { |
if ( Run.Auth.uname ) { |
1025 |
|
|
1026 |
if ( is(Run.Auth.uname, uname) ) { |
if ( is(Run.Auth.uname, uname) ) { |
1044 |
*/ |
*/ |
1045 |
static void setpasswd(char *passwd) { |
static void setpasswd(char *passwd) { |
1046 |
|
|
1047 |
|
ASSERT(passwd); |
1048 |
|
|
1049 |
if ( Run.Auth.passwd ) { |
if ( Run.Auth.passwd ) { |
1050 |
|
|
1051 |
if ( is(Run.Auth.passwd, passwd) ) { |
if ( is(Run.Auth.passwd, passwd) ) { |
1137 |
*/ |
*/ |
1138 |
static void check_name(char *name) { |
static void check_name(char *name) { |
1139 |
|
|
1140 |
|
ASSERT(name); |
1141 |
|
|
1142 |
if ( exist_process(name) ) { |
if ( exist_process(name) ) { |
1143 |
|
|
1144 |
error("%s: Name conflict at line %d - check name '%s' already defined\n", |
error("%s: Name conflict at line %d - check name '%s' already defined\n", |
1190 |
*/ |
*/ |
1191 |
static void check_hostname(char *hostname) { |
static void check_hostname(char *hostname) { |
1192 |
|
|
1193 |
|
ASSERT(hostname); |
1194 |
|
|
1195 |
if ( !check_host(hostname) ) { |
if ( !check_host(hostname) ) { |
1196 |
|
|
1197 |
yyerror("Hostname did not resolve"); |
yyerror("Hostname did not resolve"); |
1212 |
char buf[STRLEN]; |
char buf[STRLEN]; |
1213 |
char * fulladdr; |
char * fulladdr; |
1214 |
|
|
1215 |
|
ASSERT(addr); |
1216 |
|
|
1217 |
if (gethostname(buf, STRLEN) != 0) { |
if (gethostname(buf, STRLEN) != 0) { |
1218 |
yyerror("Cannot find hostname for mailaddress"); |
yyerror("Cannot find hostname for mailaddress"); |
1219 |
} |
} |
1234 |
|
|
1235 |
int i= 0, j= 0; |
int i= 0, j= 0; |
1236 |
|
|
1237 |
if (md5string == NULL) { |
ASSERT(md5string); |
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
1238 |
|
|
1239 |
while (md5string[i] != '\0') { |
while (md5string[i] != '\0') { |
1240 |
|
|