+Thu Aug 23 15:22:55 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/security.c: applied patch from Roland Schwarz and Rob
+ Richards to fix the security file checks on Windows, should
+ close #464432
+
Thu Aug 23 21:15:28 HKT 2007 William Brack <wbrack@mmm.com.hk>
* tests/general/bug-165.[xsl,out,err], tests/docs/bug-165.xml,
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XSLTPROC" "1" "$Date: 2007\-01\-11 20:12:45 +0100 (Thu, 11 Jan 2007) $" "libxslt" ""
+.TH "XSLTPROC" "1" "$Date: 2007\-08\-23 14:20:49 +0200 (Thu, 23 Aug 2007) $" "libxslt" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
#include <ctype.h>
#endif
+#if defined(WIN32) && !defined(__CYGWIN__)
+#include <windows.h>
+#ifndef INVALID_FILE_ATTRIBUTES
+#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+#endif
+#endif
+
#ifndef HAVE_STAT
# ifdef HAVE__STAT
/* MS C library seems to define stat and _stat. The definition
{
#ifdef HAVE_STAT
struct stat stat_buffer;
+#if defined(WIN32) && !defined(__CYGWIN__)
+ DWORD dwAttrs;
+
+ dwAttrs = GetFileAttributes(path);
+ if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
+ if (dwAttrs & FILE_ATTRIBUTE_DIRECTORY) {
+ return 2;
+ }
+ }
+#endif
if (stat(path, &stat_buffer) == -1)
return 0;
if ((uri->scheme == NULL) ||
(xmlStrEqual(BAD_CAST uri->scheme, BAD_CAST "file"))) {
+#if defined(WIN32) && !defined(__CYGWIN__)
+ if ((uri->path)&&(uri->path[0]=='/')&&
+ (uri->path[1]!='\0')&&(uri->path[2]==':'))
+ ret = xsltCheckWritePath(sec, ctxt, uri->path+1);
+ else
+#endif
+
/*
* Check if we are allowed to write this file
*/