diff options
author | drh <drh@noemail.net> | 2019-11-22 00:42:01 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-11-22 00:42:01 +0000 |
commit | c398c65bee850b6b8f24a44852872a27f114535d (patch) | |
tree | 400756f2c2735468faaa02daa969838df2854778 /src/btree.c | |
parent | cd30064bd502b9b42a4e0c0e04850f09cefa2617 (diff) | |
download | sqlite-c398c65bee850b6b8f24a44852872a27f114535d.tar.gz sqlite-c398c65bee850b6b8f24a44852872a27f114535d.zip |
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
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/btree.c b/src/btree.c index 57634f69b..d0eed5dd4 100644 --- a/src/btree.c +++ b/src/btree.c @@ -2403,9 +2403,13 @@ int sqlite3BtreeOpen( rc = sqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname); if( rc ){ - sqlite3_free(zFullPathname); - sqlite3_free(p); - return rc; + if( rc==SQLITE_OK_SYMLINK ){ + rc = SQLITE_OK; + }else{ + sqlite3_free(zFullPathname); + sqlite3_free(p); + return rc; + } } } #if SQLITE_THREADSAFE |