mirror of
https://github.com/restic/restic.git
synced 2026-11-21 13:02:42 +00:00
fs: stricter enforcement to only call readdir on a directory
Use O_DIRECTORY to prevent opening any other than a directory in readdirnames.
This commit is contained in:
1 parent
f8031561f2
commit
b402e8a6fc
4 files changed
+33
-2
No files matched your search
@@ -3,5 +3,10 @@
|
||||
|
||||
package fs
|
||||
|
||||
// TODO honor flags when opening files
|
||||
|
||||
// O_NOFOLLOW is a noop on Windows.
|
||||
const O_NOFOLLOW int = 0
|
||||
|
||||
// O_DIRECTORY is a noop on Windows.
|
||||
const O_DIRECTORY int = 0
|
||||
Reference in new issue
Block a user