logging.c (bftpd-6.0) | : | logging.c (bftpd-6.1) | ||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
FILE *statuslog = NULL; | FILE *statuslog = NULL; | |||
FILE *statuslogforreading = NULL; | FILE *statuslogforreading = NULL; | |||
int time_zone_difference = 0; | int time_zone_difference = 0; | |||
char log_syslog = 0; | char log_syslog = 0; | |||
void log_init() | void log_init() | |||
{ | { | |||
char *foo = config_getoption("LOGFILE"); | char *foo = config_getoption("LOGFILE"); | |||
#ifdef HAVE_SYSLOG_H | #ifdef HAVE_SYSLOG_H | |||
if (!strcasecmp(foo, "syslog")) { | if (!strcasecmp(foo, "syslog")) { | |||
log_syslog = 1; | log_syslog = 1; | |||
openlog(global_argv[0], LOG_PID, LOG_DAEMON); | openlog(global_argv[0], LOG_PID, LOG_DAEMON); | |||
} else | } else | |||
#endif | #endif | |||
if (foo[0]) | if (foo[0]) | |||
if (!(logfile = fopen(foo, "a"))) { | if (!(logfile = fopen(foo, "a"))) { | |||
control_printf(SL_FAILURE, "421-Could not open log file.\r\n" | control_printf(SL_FAILURE, "421-Could not open log file.\r\n" | |||
"421 Server disabled for security reasons."); | "421 Server disabled for security reasons."); | |||
exit(1); | exit(1); | |||
} | } | |||
statuslog = fopen(PATH_STATUSLOG, "a"); | statuslog = fopen(PATH_STATUSLOG, "a"); | |||
if (! statuslog) { | if (! statuslog) { | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |