1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-21 09:00:59 +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:
drh
2019-11-22 00:42:01 +00:00
parent cd30064bd5
commit c398c65bee
10 changed files with 50 additions and 68 deletions

View File

@@ -541,6 +541,7 @@ int sqlite3_exec(
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8))
#define SQLITE_OK_SYMLINK (SQLITE_OK | (2<<8))
/*
** CAPI3REF: Flags For File Open Operations
@@ -1408,7 +1409,6 @@ struct sqlite3_vfs {
#define SQLITE_ACCESS_EXISTS 0
#define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */
#define SQLITE_ACCESS_READ 2 /* Unused */
#define SQLITE_ACCESS_SYMLINK 3 /* Test if file is symbolic link */
/*
** CAPI3REF: Flags for the xShmLock VFS method