mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Revise the SQLITE_OPEN_NOFOLLOW so that it actually uses O_NOFOLLOW in the
open() system call. This backs out the SQLITE_ACCESS_SYMLINK value but adds the new SQLITE_OK_SYMLINK return code from the xFullPathname method of sqlite3_vfs when that routine resolves symbolic links. O_NOFOLLOW is always included in open() system calls for journal files. FossilOrigin-Name: 6a64fb6a2da6c98f1e87b55ad5689967e1db4eae2e08345471d95e28cd567e0f
This commit is contained in:
12
src/os_win.c
12
src/os_win.c
@@ -80,14 +80,6 @@
|
||||
# define NTDDI_WINTHRESHOLD 0x06040000
|
||||
#endif
|
||||
|
||||
/*
|
||||
** This constant is needed by the winAccess function; therefore, define
|
||||
** it when it is missing from the SDK header files.
|
||||
*/
|
||||
#ifndef FILE_ATTRIBUTE_REPARSE_POINT
|
||||
# define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Check to see if the GetVersionEx[AW] functions are deprecated on the
|
||||
** target system. GetVersionEx was first deprecated in Win8.1.
|
||||
@@ -5480,10 +5472,6 @@ static int winAccess(
|
||||
rc = attr!=INVALID_FILE_ATTRIBUTES &&
|
||||
(attr & FILE_ATTRIBUTE_READONLY)==0;
|
||||
break;
|
||||
case SQLITE_ACCESS_SYMLINK:
|
||||
rc = attr!=INVALID_FILE_ATTRIBUTES &&
|
||||
(attr & FILE_ATTRIBUTE_REPARSE_POINT)!=0;
|
||||
break;
|
||||
default:
|
||||
assert(!"Invalid flags argument");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user