pipe-logging-fix-20050610

fstat calls should be lstat

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

fstat calls should be lstat

bang in the wrong place
This commit is contained in:
Jeffrey Altman 2005-06-10 22:37:37 +00:00
parent 72de37a9c4
commit 324cd97105
2 changed files with 4 additions and 4 deletions

View File

@ -870,8 +870,8 @@ main(int argc, char **argv, char **envp)
if ((!DoSyslog) if ((!DoSyslog)
#ifndef AFS_NT40_ENV #ifndef AFS_NT40_ENV
&& (!(fstat(AFSDIR_BOZLOG_FILE, &sb) == 0) && && ((lstat(AFSDIR_BOZLOG_FILE, &sb) == 0) &&
(S_ISFIFO(sb.st_mode))) !(S_ISFIFO(sb.st_mode)))
#endif #endif
) { ) {
strcpy(namebuf, AFSDIR_BOZLOG_FILE); strcpy(namebuf, AFSDIR_BOZLOG_FILE);

View File

@ -241,7 +241,7 @@ OpenLog(const char *fileName)
} }
/* Support named pipes as logs by not rotating them */ /* Support named pipes as logs by not rotating them */
if ((fstat(fileName, &statbuf) == 0) && (S_ISFIFO(statbuf.st_mode))) { if ((lstat(fileName, &statbuf) == 0) && (S_ISFIFO(statbuf.st_mode))) {
isfifo = 1; isfifo = 1;
} }
#endif #endif
@ -314,7 +314,7 @@ ReOpenLog(const char *fileName)
} }
/* Support named pipes as logs by not rotating them */ /* Support named pipes as logs by not rotating them */
if ((fstat(fileName, &statbuf) == 0) && (S_ISFIFO(statbuf.st_mode))) { if ((lstat(fileName, &statbuf) == 0) && (S_ISFIFO(statbuf.st_mode))) {
isfifo = 1; isfifo = 1;
} }
#endif #endif