cvs: php4(PHP_4_3) /main php_open_temporary_file.c
| From: | Wez Furlong | Date: | Fri, 11 Apr 2003 11:10:39 +0000 |
| Subject: | cvs: php4(PHP_4_3) /main php_open_temporary_file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20234@lists.php.net to get a copy of this message | ||
wez Fri Apr 11 07:10:39 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/main php_open_temporary_file.c
Log:
MFH: Fix for Bug #23069
Index: php4/main/php_open_temporary_file.c
diff -u php4/main/php_open_temporary_file.c:1.18.2.6 php4/main/php_open_temporary_file.c:1.18.2.7
--- php4/main/php_open_temporary_file.c:1.18.2.6 Tue Mar 18 11:39:06 2003
+++ php4/main/php_open_temporary_file.c Fri Apr 11 07:10:39 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_open_temporary_file.c,v 1.18.2.6 2003/03/18 16:39:06 wez Exp $ */
+/* $Id: php_open_temporary_file.c,v 1.18.2.7 2003/04/11 11:10:39 wez Exp $ */
#include "php.h"
@@ -134,7 +134,10 @@
#ifdef PHP_WIN32
if (GetTempFileName(path, pfx, 0, opened_path)) {
- fd = VCWD_OPEN(opened_path, open_flags);
+ /* Some versions of windows set the temp file to be read-only,
+ * which means that opening it will fail... */
+ VCWD_CHMOD(opened_path, 0600);
+ fd = VCWD_OPEN_MODE(opened_path, open_flags, 0600);
}
#elif defined(NETWARE)
/* Using standard mktemp() implementation for NetWare */