1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
--- ./webfsd.c +++ ./webfsd.c @@ -918,8 +918,11 @@ } else { if (NULL == (logfh = fopen(logfile,"a"))) xperror(LOG_WARNING,"open access log",NULL); - else + else { close_on_exec(fileno(logfh)); + if (0 != chmod(logfile,S_IRUSR|S_IWUSR)) + xperror(LOG_WARNING,"chmod access log",NULL); + } } }