Files
Paweł Gronowski f66f555ad4 graphdriver/windows: Potential fix for access denied
Use `winio.RunWithPrivileges` to get the privileges.
It's better because it also locks the Go runtime thread so if the Go
scheduler decides to run this code on a different thread, it will still
have the expected privileges.

A naive attempt at fixing an error experienced by Docker Desktop user
when using Windows containers:

```
failed to register layer: re-exec error: exit status 1: output: hcsshim::ProcessUtilityVMImage \\?\C:\ProgramData\Docker\windowsfilter\<hash1>\UtilityVM: Access is denied.
failed to register layer: re-exec error: exit status 1: output: hcsshim::ProcessBaseLayer \\?\C:\ProgramData\Docker\windowsfilter\<hash2>: Access is denied.
failed to register layer: re-exec error: exit status 1: output: hcsshim::ProcessBaseLayer \\?\C:\ProgramData\Docker\windowsfilter\<hash3>: Access is denied.
```

Unfortunately I can't reproduce the issue on a Windows VM, but this
definitely won't hurt.

At least, I verified that the daemon still works on Windows.

Inspired by: https://github.com/containerd/containerd/issues/8206

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-01 16:16:28 +02:00
..