file" option. I wonder why noone reported it? Or did everyone just use
"log file" ?
if (code) {
kill_all(SIGUSR1);
}
- if ((cleanup_pid != 0) && (cleanup_pid == (int) getpid()))
- unlink(lp_pid_file());
+ if ((cleanup_pid != 0) && (cleanup_pid == (int) getpid())) {
+ char *pidf = lp_pid_file();
+ if (pidf && *pidf) {
+ unlink(lp_pid_file());
+ }
+ }
exit(code);
}
io_printf(fd,"@RSYNCD: %d\n", PROTOCOL_VERSION);
motd = lp_motd_file();
- if (*motd) {
+ if (motd && *motd) {
FILE *f = fopen(motd,"r");
while (f && !feof(f)) {
int len = fread(line, 1, sizeof(line)-1, f);
static int initialised;
int options = LOG_PID;
time_t t;
+ char *logf;
if (initialised) return;
initialised = 1;
- if (lp_log_file()) {
- logfile = fopen(lp_log_file(), "a");
+ logf = lp_log_file();
+ if (logf && *logf) {
+ logfile = fopen(logf, "a");
return;
}