From: Michael Meffie Date: Wed, 4 Feb 2015 17:19:32 +0000 (-0500) Subject: util: always reopen the log file X-Git-Tag: upstream/1.8.0_pre1^2~115 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d92ef173bc6ab7dd85bd2cbadbb2a089a9d4bacf;p=packages%2Fo%2Fopenafs.git util: always reopen the log file Reopen the log file even if the filename exists. This fixes the situation where an external program moves or deletes the log file, then creates a new file with the same log file name. Change-Id: I3b98d6fc0d05c7ab231f84e9a271f925506ab51f Reviewed-on: https://gerrit.openafs.org/11725 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- diff --git a/src/util/serverLog.c b/src/util/serverLog.c index 8b6ea85ed..b42525b74 100644 --- a/src/util/serverLog.c +++ b/src/util/serverLog.c @@ -465,9 +465,6 @@ ReOpenLog(const char *fileName) { int flags = O_WRONLY | O_APPEND | O_CREAT; - if (access(fileName, F_OK) == 0) - return 0; /* exists, no need to reopen. */ - #if !defined(AFS_NT40_ENV) if (serverLogSyslog) { return 0;