[PATCH] fix #23432
| From: | Nuno Lopes | Date: | Mon, 09 Feb 2004 16:09:02 +0000 |
| Subject: | [PATCH] fix #23432 | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-7668@lists.php.net to get a copy of this message | ||
Hi,
As I don't have sufficient karma, here is a patch to fix bug #23432 (PHP
using mtime instead of atime to clean session files).
Nuno
Index: mod_files.c =================================================================== RCS file: /repository/php-src/ext/session/mod_files.c,v retrieving revision 1.94 diff -u -r1.94 mod_files.c --- mod_files.c 8 Jan 2004 08:17:23 -0000 1.94 +++ mod_files.c 9 Feb 2004 16:02:57 -0000 @@ -215,7 +215,7 @@ buf[dirname_len + entry_len + 1] = '\0'; /* check whether its last access was more than maxlifet ago */ if (VCWD_STAT(buf, &sbuf) == 0 && - (now - sbuf.st_mtime) > maxlifetime) { + (now - sbuf.st_atime) > maxlifetime) { VCWD_UNLINK(buf); nrdels++; }
Index: mod_files.c =================================================================== RCS file: /repository/php-src/ext/session/mod_files.c,v retrieving revision 1.94 diff -u -r1.94 mod_files.c --- mod_files.c 8 Jan 2004 08:17:23 -0000 1.94 +++ mod_files.c 9 Feb 2004 16:02:57 -0000 @@ -215,7 +215,7 @@ buf[dirname_len + entry_len + 1] = '\0'; /* check whether its last access was more than maxlifet ago */ if (VCWD_STAT(buf, &sbuf) == 0 && - (now - sbuf.st_mtime) > maxlifetime) { + (now - sbuf.st_atime) > maxlifetime) { VCWD_UNLINK(buf); nrdels++; }