To prevent deletion from another program and the same vulnerability we prevented in #165, the temporary directory should be locked to prevent an attacker from replacing its path with a symlink
- NTFS supports atomic mandatory locking when using
CreateFile
- Some Linux systems support mandatory locking for tmpfs
- At the very least, advisory locking should be added to all systems, as discussed here
To prevent deletion from another program and the same vulnerability we prevented in #165, the temporary directory should be locked to prevent an attacker from replacing its path with a symlink
CreateFile