From: wessels <> Date: Sat, 1 Feb 1997 04:16:48 +0000 (+0000) Subject: protect S_ISREG X-Git-Tag: SQUID_3_0_PRE1~5159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71d95578dcd09e26f7343021dfda09ce9761f536;p=thirdparty%2Fsquid.git protect S_ISREG --- diff --git a/src/debug.cc b/src/debug.cc index e57da3e593..d6a9724eef 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,5 +1,5 @@ /* - * $Id: debug.cc,v 1.41 1997/01/15 18:41:47 wessels Exp $ + * $Id: debug.cc,v 1.42 1997/01/31 21:16:48 wessels Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -251,9 +251,11 @@ _db_rotate_log(void) if (debug_log_file == NULL) return; +#ifdef S_ISREG if (stat(debug_log_file, &sb) == 0) if (S_ISREG(sb.st_mode) == 0) return; +#endif /* Rotate numbers 0 through N up one */ for (i = Config.Log.rotateNumber; i > 1;) { diff --git a/src/stat.cc b/src/stat.cc index 9761d433b7..128de6c758 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.121 1997/01/19 08:32:13 wessels Exp $ + * $Id: stat.cc,v 1.122 1997/01/31 21:16:49 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -1348,9 +1348,11 @@ stat_rotate_log(void) if ((fname = HTTPCacheInfo->logfilename) == NULL) return; +#ifdef S_ISREG if (stat(fname, &sb) == 0) if (S_ISREG(sb.st_mode) == 0) return; +#endif debug(18, 1, "stat_rotate_log: Rotating\n"); diff --git a/src/store.cc b/src/store.cc index 9589a36621..23fe5ea02d 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.203 1997/01/31 20:14:53 wessels Exp $ + * $Id: store.cc,v 1.204 1997/01/31 21:16:50 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -2735,9 +2735,11 @@ storeRotateLog(void) return; if (strcmp(fname, "none") == 0) return; +#ifdef S_ISREG if (stat(fname, &sb) == 0) if (S_ISREG(sb.st_mode) == 0) return; +#endif debug(20, 1, "storeRotateLog: Rotating.\n"); diff --git a/src/useragent.cc b/src/useragent.cc index d76f1f0999..0e59c52bf4 100644 --- a/src/useragent.cc +++ b/src/useragent.cc @@ -1,6 +1,6 @@ /* - * $Id: useragent.cc,v 1.3 1997/01/15 18:41:50 wessels Exp $ + * $Id: useragent.cc,v 1.4 1997/01/31 21:16:51 wessels Exp $ * * DEBUG: section 40 User-Agent logging * AUTHOR: Joe Ramey @@ -74,9 +74,11 @@ useragentRotateLog(void) return; if (strcmp(fname, "none") == 0) return; +#ifdef S_ISREG if (stat(fname, &sb) == 0) if (S_ISREG(sb.st_mode) == 0) return; +#endif debug(40, 1, "useragentRotateLog: Rotating.\n"); /* Rotate numbers 0 through N up one */ for (i = Config.Log.rotateNumber; i > 1;) {