mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to 8397d0b9
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
21
vendor/github.com/moby/buildkit/session/filesync/diffcopy_windows.go
generated
vendored
Normal file
21
vendor/github.com/moby/buildkit/session/filesync/diffcopy_windows.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package filesync
|
||||
|
||||
import (
|
||||
"github.com/Microsoft/go-winio"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/tonistiigi/fsutil"
|
||||
)
|
||||
|
||||
func sendDiffCopy(stream Stream, fs fsutil.FS, progress progressCb) error {
|
||||
// adding one SeBackupPrivilege to the process so as to be able
|
||||
// to run the subsequent goroutines in fsutil.Send that need
|
||||
// to copy over special Windows metadata files.
|
||||
// TODO(profnandaa): need to cross-check that this cannot be
|
||||
// exploited in any way.
|
||||
winio.EnableProcessPrivileges([]string{winio.SeBackupPrivilege})
|
||||
defer winio.DisableProcessPrivileges([]string{winio.SeBackupPrivilege})
|
||||
return errors.WithStack(fsutil.Send(stream.Context(), stream, fs, progress))
|
||||
}
|
Reference in New Issue
Block a user