summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtokenautomaton
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-05 08:45:08 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2011-08-17 15:52:22 (GMT)
commitff9b69838ec146aeb43d4af8a03043f9c5f0454d (patch)
tree8f9aee44269766c67dca8987bce308a32d0cdde2 /tests/auto/qtokenautomaton
parent9a76587363a2f37312326286e08cce502f7fe27e (diff)
downloadQt-ff9b69838ec146aeb43d4af8a03043f9c5f0454d.zip
Qt-ff9b69838ec146aeb43d4af8a03043f9c5f0454d.tar.gz
Qt-ff9b69838ec146aeb43d4af8a03043f9c5f0454d.tar.bz2
Atomic implementation of create file and obtain handle for Win/Symbian
Besides generating a unique name, createFileFromTemplate now also acquires a file handle on all platforms. The file engine's native handle is passed by reference and modified in place. This fixes a long standing security issue on Windows. On Windows and Symbian platforms we directly use the "native" file path when processing the template and generating the unique name. Since the native encoding is known, conversions at this point are safe. Errors other than "file exists" are propagated to Q(Temporary)File, and result in a failure in open(). The changes also unify error handling and should give consistent behaviour across all platforms. Worthy of note, there's a change in behaviour on Windows and Symbian: fileNames returned by QTemporaryFile on Windows and Symbian are always absolute after open has been called. This has to do with how QFileSystemEntry::nativeFilePath works on these platforms. (Test was updated to reflect change in behaviour.) Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns
Diffstat (limited to 'tests/auto/qtokenautomaton')
0 files changed, 0 insertions, 0 deletions