75 |
struct IHavePrecedence { |
struct IHavePrecedence { |
76 |
int daemon; |
int daemon; |
77 |
int logfile; |
int logfile; |
78 |
|
int pidfile; |
79 |
}; |
}; |
80 |
|
|
81 |
struct MailFilter { |
struct MailFilter { |
133 |
static Process_T current= NULL; |
static Process_T current= NULL; |
134 |
static Command_T command= NULL; |
static Command_T command= NULL; |
135 |
static Process_T depend_list= NULL; |
static Process_T depend_list= NULL; |
136 |
static struct IHavePrecedence ihp= {FALSE, FALSE}; |
static struct IHavePrecedence ihp= {FALSE, FALSE, FALSE}; |
137 |
static struct MailFilter mtf= {NULL, NULL, NULL, FALSE, FALSE, FALSE, |
static struct MailFilter mtf= {NULL, NULL, NULL, FALSE, FALSE, FALSE, |
138 |
FALSE, FALSE, FALSE}; |
FALSE, FALSE, FALSE}; |
139 |
static struct PortSet portset= {-1, NULL, 0, SOCK_STREAM, AF_INET, FALSE, |
static struct PortSet portset= {-1, NULL, 0, SOCK_STREAM, AF_INET, FALSE, |
157 |
static void addcommand(int); |
static void addcommand(int); |
158 |
static void addargument(char *); |
static void addargument(char *); |
159 |
static void setlogfile(char *); |
static void setlogfile(char *); |
160 |
|
static void setpidfile(char *); |
161 |
static void setmailserver(char *); |
static void setmailserver(char *); |
162 |
static void setuname(char *); |
static void setuname(char *); |
163 |
static void setpasswd(char *); |
static void setpasswd(char *); |
251 |
; |
; |
252 |
|
|
253 |
setdaemon : SET DAEMON NUMBER { |
setdaemon : SET DAEMON NUMBER { |
254 |
if ( !Run.isdaemon || ihp.daemon ) { |
if (!Run.isdaemon || ihp.daemon) { |
255 |
ihp.daemon= TRUE; |
ihp.daemon= TRUE; |
256 |
Run.isdaemon= TRUE; |
Run.isdaemon= TRUE; |
257 |
Run.polltime= $3; |
Run.polltime= $3; |
265 |
; |
; |
266 |
|
|
267 |
setlog : SET LOGFILE PATH { |
setlog : SET LOGFILE PATH { |
268 |
if ( !Run.logfile || ihp.logfile ) { |
if (!Run.logfile || ihp.logfile) { |
269 |
ihp.logfile= TRUE; |
ihp.logfile= TRUE; |
270 |
setlogfile($3); |
setlogfile($3); |
271 |
Run.use_syslog= FALSE; |
Run.use_syslog= FALSE; |
273 |
} |
} |
274 |
} |
} |
275 |
| SET LOGFILE SYSLOG { |
| SET LOGFILE SYSLOG { |
276 |
if ( !Run.logfile || ihp.logfile ) { |
if (!Run.logfile || ihp.logfile) { |
277 |
ihp.logfile= TRUE; |
ihp.logfile= TRUE; |
278 |
setlogfile(xstrdup("syslog")); |
setlogfile(xstrdup("syslog")); |
279 |
Run.use_syslog= TRUE; |
Run.use_syslog= TRUE; |
283 |
; |
; |
284 |
|
|
285 |
setpid : SET PIDFILE PATH { |
setpid : SET PIDFILE PATH { |
286 |
Run.pidfile= $3; |
if (!Run.pidfile || ihp.pidfile) { |
287 |
|
ihp.pidfile= TRUE; |
288 |
|
setpidfile($3); |
289 |
|
} |
290 |
} |
} |
291 |
; |
; |
292 |
|
|
696 |
Run.dolog= FALSE; |
Run.dolog= FALSE; |
697 |
Run.dohttpd= FALSE; |
Run.dohttpd= FALSE; |
698 |
Run.Auth.defined= FALSE; |
Run.Auth.defined= FALSE; |
|
Run.pidfile= NULL; |
|
699 |
Run.servicessl= FALSE; |
Run.servicessl= FALSE; |
700 |
Run.clientssl= FALSE; |
Run.clientssl= FALSE; |
701 |
reset_runmail(); |
reset_runmail(); |
1103 |
|
|
1104 |
} |
} |
1105 |
|
|
1106 |
|
|
1107 |
|
/* |
1108 |
|
* Reset the pidfil if changed |
1109 |
|
*/ |
1110 |
|
static void setpidfile(char *pidfile) { |
1111 |
|
|
1112 |
|
if(Run.pidfile) { |
1113 |
|
|
1114 |
|
if(is(Run.pidfile, pidfile)) { |
1115 |
|
|
1116 |
|
return; |
1117 |
|
|
1118 |
|
} else { |
1119 |
|
|
1120 |
|
free(Run.pidfile); |
1121 |
|
|
1122 |
|
} |
1123 |
|
} |
1124 |
|
|
1125 |
|
Run.pidfile= pidfile; |
1126 |
|
|
1127 |
|
} |
1128 |
|
|
1129 |
|
|
1130 |
/* |
/* |
1131 |
* Set mailserver if changed |
* Set mailserver if changed |