-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Hi,
FILE_FLAG_BACKUP_SEMANTICS
is an optional flag to the Windows CreateFile
API. It allows accessing files when privilege would be denied by normal Windows ACLs, except for that the user account has the SE_BACKUP_NAME
privilege. If the calling user account does not have this privilege, adding this flag has no impact to behaviour nor performance.
Go already uses FILE_FLAG_BACKUP_SEMANTICS
in some CreateFile calls (e.g. Readlink
, Utimes
, UtimesNano
, from issues #8090 and #10804) but not in other cases (notably Open
). So it's inconsistent.
I would like to request that FILE_FLAG_BACKUP_SEMANTICS
is added to the Open
call in src/syscall/syscall_windows.go
.
As well as fixing the inconsistency, this would allow Go users to open files on disk, in those cases where their permission to do so comes via SE_BACKUP_NAME
instead of windows ACLs.
Thanks
mappu
More information:
- https://github.com/giuliano108/SeBackupPrivilege
- https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716.aspx
What version of Go are you using (go version
)?
go version go1.9.2 windows/amd64
Does this issue reproduce with the latest release?
Yes