Merge ~kajiya/+git/google-guest-agent:update-bionic-to-20240716.00 into ~ubuntu-core-dev/+git/google-guest-agent:ubuntu/bionic

Proposed by Chloé Smith
Status: Rejected
Rejected by: Utkarsh Gupta
Proposed branch: ~kajiya/+git/google-guest-agent:update-bionic-to-20240716.00
Merge into: ~ubuntu-core-dev/+git/google-guest-agent:ubuntu/bionic
Diff against target: 61149 lines (+42633/-4527)
659 files modified
.gitignore (+11/-1)
OWNERS (+2/-1)
THIRD_PARTY_LICENSES/github.com/Microsoft/go-winio/LICENSE (+22/-0)
THIRD_PARTY_LICENSES/github.com/hashicorp/hcl/LICENSE (+355/-0)
THIRD_PARTY_LICENSES/github.com/mitchellh/go-homedir/LICENSE (+21/-0)
THIRD_PARTY_LICENSES/golang.org/x/mod/LICENSE (+27/-0)
THIRD_PARTY_LICENSES/golang.org/x/tools/LICENSE (+27/-0)
debian/changelog (+78/-0)
debian/control (+2/-1)
debian/extra/vendor/github.com/Microsoft/go-winio/.gitattributes (+1/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/.gitignore (+10/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/.golangci.yml (+149/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/CODEOWNERS (+1/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/LICENSE (+22/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/README.md (+89/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/SECURITY.md (+41/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/backup.go (+290/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/doc.go (+22/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/ea.go (+137/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/file.go (+331/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/fileinfo.go (+92/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/hvsock.go (+575/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go (+2/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go (+202/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/security.go (+12/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go (+64/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go (+20/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go (+179/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go (+72/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go (+132/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/pipe.go (+525/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go (+232/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go (+16/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go (+13/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go (+27/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/privilege.go (+197/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/reparse.go (+131/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/sd.go (+144/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/syscall.go (+5/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/tools.go (+5/-0)
debian/extra/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go (+419/-0)
debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go (+1/-0)
debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go (+1/-0)
debian/extra/vendor/github.com/golang/protobuf/ptypes/any.go (+4/-3)
debian/extra/vendor/golang.org/x/crypto/blowfish/block.go (+159/-0)
debian/extra/vendor/golang.org/x/crypto/blowfish/cipher.go (+99/-0)
debian/extra/vendor/golang.org/x/crypto/blowfish/const.go (+199/-0)
debian/extra/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go (+1/-2)
debian/extra/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s (+1/-2)
debian/extra/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go (+1/-2)
debian/extra/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.s (+0/-1)
debian/extra/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/chacha20/chacha_s390x.s (+0/-1)
debian/extra/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s (+22/-3)
debian/extra/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_noasm.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/cryptobyte/asn1.go (+7/-6)
debian/extra/vendor/golang.org/x/crypto/cryptobyte/builder.go (+5/-0)
debian/extra/vendor/golang.org/x/crypto/cryptobyte/string.go (+11/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/curve25519.go (+59/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go (+105/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go (+46/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/README (+7/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go (+416/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go (+15/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s (+378/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go (+11/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go (+15/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s (+42/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go (+11/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go (+264/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint (+1/-0)
debian/extra/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh (+19/-0)
debian/extra/vendor/golang.org/x/crypto/hkdf/hkdf.go (+3/-1)
debian/extra/vendor/golang.org/x/crypto/internal/alias/alias.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/alias/alias_purego.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/crypto/internal/poly1305/sum_s390x.s (+0/-1)
debian/extra/vendor/golang.org/x/crypto/ssh/buffer.go (+97/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/certs.go (+611/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/channel.go (+645/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/cipher.go (+789/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/client.go (+282/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/client_auth.go (+779/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/common.go (+476/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/connection.go (+143/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/doc.go (+23/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/handshake.go (+806/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf/bcrypt_pbkdf.go (+93/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/kex.go (+786/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/keys.go (+1728/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/mac.go (+68/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/messages.go (+891/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/mux.go (+357/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/server.go (+802/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/session.go (+647/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/ssh_gss.go (+139/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/streamlocal.go (+116/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/tcpip.go (+509/-0)
debian/extra/vendor/golang.org/x/crypto/ssh/transport.go (+380/-0)
debian/extra/vendor/golang.org/x/mod/LICENSE (+27/-0)
debian/extra/vendor/golang.org/x/mod/PATENTS (+22/-0)
debian/extra/vendor/golang.org/x/mod/semver/semver.go (+401/-0)
debian/extra/vendor/golang.org/x/net/http2/server.go (+70/-16)
debian/extra/vendor/golang.org/x/net/http2/transport.go (+31/-7)
debian/extra/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu.go (+4/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_aix.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_arm64.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c (+0/-2)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_linux.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_loong64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_mips64x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_mipsx.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_other_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go (+0/-3)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_riscv64.go (+1/-2)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_s390x.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_wasm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_x86.go (+7/-1)
debian/extra/vendor/golang.org/x/sys/cpu/cpu_x86.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/cpu/endian_big.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/endian_little.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/hwcap_linux.go (+2/-2)
debian/extra/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/execabs/execabs.go (+102/-0)
debian/extra/vendor/golang.org/x/sys/execabs/execabs_go118.go (+17/-0)
debian/extra/vendor/golang.org/x/sys/execabs/execabs_go119.go (+20/-0)
debian/extra/vendor/golang.org/x/sys/unix/aliases.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/asm_bsd_386.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_bsd_arm.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_386.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_amd64.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_arm.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_arm64.s (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_loong64.s (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/asm_linux_s390x.s (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/asm_zos_s390x.s (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/cap_freebsd.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/constants.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/dev_aix_ppc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/dev_zos.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/dirent.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/endian_big.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/endian_little.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/env_unix.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/epoll_zos.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/fcntl.go (+1/-2)
debian/extra/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/fdset.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/fstatfs_zos.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/gccgo.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/gccgo_c.c (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ifreq_linux.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ioctl_linux.go (+5/-0)
debian/extra/vendor/golang.org/x/sys/unix/ioctl_signed.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ioctl_unsigned.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ioctl_zos.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/mkerrors.sh (+3/-2)
debian/extra/vendor/golang.org/x/sys/unix/mmap_nomremap.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/mremap.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/pagesize_unix.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/pledge_openbsd.go (+20/-72)
debian/extra/vendor/golang.org/x/sys/unix/ptrace_darwin.go (+0/-7)
debian/extra/vendor/golang.org/x/sys/unix/ptrace_ios.go (+0/-7)
debian/extra/vendor/golang.org/x/sys/unix/race.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/race0.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/readdirent_getdents.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/sockcmsg_unix.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_aix.go (+2/-4)
debian/extra/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_bsd.go (+1/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_darwin.go (+0/-186)
debian/extra/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_dragonfly.go (+0/-198)
debian/extra/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_freebsd.go (+0/-192)
debian/extra/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_hurd.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_hurd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_illumos.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux.go (+48/-121)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_gc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_netbsd.go (+0/-261)
debian/extra/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd.go (+20/-82)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_solaris.go (+3/-20)
debian/extra/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_unix.go (+3/-1)
debian/extra/vendor/golang.org/x/sys/unix/syscall_unix_gc.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go (+0/-3)
debian/extra/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go (+1/-3)
debian/extra/vendor/golang.org/x/sys/unix/sysvshm_linux.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/sysvshm_unix.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/timestruct.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/unveil_openbsd.go (+25/-16)
debian/extra/vendor/golang.org/x/sys/unix/xattr_bsd.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux.go (+38/-2)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_386.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go (+5/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go (+5/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go (+0/-2)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go (+6/-35)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s (+0/-149)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go (+6/-35)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s (+0/-149)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go (+5/-6)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux.go (+45/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go (+0/-23)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go (+66/-16)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s (+20/-0)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go (+60/-12)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s (+20/-0)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go (+66/-16)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s (+20/-0)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go (+66/-16)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s (+20/-0)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go (+66/-16)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s (+20/-0)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go (+66/-16)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s (+24/-0)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go (+66/-16)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s (+20/-0)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go (+128/-129)
debian/extra/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go (+0/-12)
debian/extra/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go (+3/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go (+2/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux.go (+63/-5)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go (+4/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/aliases.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/empty.s (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/eventlog.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/exec_windows.go (+77/-12)
debian/extra/vendor/golang.org/x/sys/windows/mksyscall.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/race.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/race0.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/registry/key.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/registry/mksyscall.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/registry/syscall.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/registry/value.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/security_windows.go (+6/-15)
debian/extra/vendor/golang.org/x/sys/windows/service.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/str.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/svc/eventlog/install.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/svc/eventlog/log.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/svc/mgr/config.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go (+1/-8)
debian/extra/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go (+1/-8)
debian/extra/vendor/golang.org/x/sys/windows/svc/mgr/service.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/svc/security.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/svc/service.go (+1/-7)
debian/extra/vendor/golang.org/x/sys/windows/syscall.go (+0/-1)
debian/extra/vendor/golang.org/x/sys/windows/syscall_windows.go (+38/-21)
debian/extra/vendor/golang.org/x/sys/windows/types_windows.go (+34/-1)
debian/extra/vendor/golang.org/x/sys/windows/zsyscall_windows.go (+75/-7)
debian/extra/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/norm/tables13.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go (+0/-1)
debian/extra/vendor/golang.org/x/text/unicode/norm/trie.go (+1/-1)
debian/extra/vendor/golang.org/x/tools/LICENSE (+27/-0)
debian/extra/vendor/golang.org/x/tools/PATENTS (+22/-0)
debian/extra/vendor/golang.org/x/tools/cmd/stringer/stringer.go (+657/-0)
debian/extra/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go (+187/-0)
debian/extra/vendor/golang.org/x/tools/go/gcexportdata/importer.go (+75/-0)
debian/extra/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go (+49/-0)
debian/extra/vendor/golang.org/x/tools/go/packages/doc.go (+220/-0)
debian/extra/vendor/golang.org/x/tools/go/packages/external.go (+101/-0)
debian/extra/vendor/golang.org/x/tools/go/packages/golist.go (+1173/-0)
debian/extra/vendor/golang.org/x/tools/go/packages/golist_overlay.go (+575/-0)
debian/extra/vendor/golang.org/x/tools/go/packages/loadmode_string.go (+57/-0)
debian/extra/vendor/golang.org/x/tools/go/packages/packages.go (+1326/-0)
debian/extra/vendor/golang.org/x/tools/go/packages/visit.go (+59/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/core/event.go (+85/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/core/export.go (+70/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/core/fast.go (+77/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/doc.go (+7/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/event.go (+127/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/keys/keys.go (+564/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/keys/standard.go (+22/-0)
debian/extra/vendor/golang.org/x/tools/internal/event/label/label.go (+215/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/bexport.go (+852/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/bimport.go (+1053/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/exportdata.go (+99/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go (+265/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/iexport.go (+1180/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/iimport.go (+976/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/newInterface10.go (+22/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/newInterface11.go (+14/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go (+16/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go (+37/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go (+10/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go (+10/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go (+19/-0)
debian/extra/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go (+738/-0)
debian/extra/vendor/golang.org/x/tools/internal/gocommand/invoke.go (+356/-0)
debian/extra/vendor/golang.org/x/tools/internal/gocommand/vendor.go (+109/-0)
debian/extra/vendor/golang.org/x/tools/internal/gocommand/version.go (+81/-0)
debian/extra/vendor/golang.org/x/tools/internal/packagesinternal/packages.go (+30/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/codes.go (+77/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/decoder.go (+517/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/doc.go (+32/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/encoder.go (+383/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/flags.go (+9/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go (+21/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go (+28/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/reloc.go (+42/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/support.go (+17/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/sync.go (+113/-0)
debian/extra/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go (+89/-0)
debian/extra/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go (+59/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/common.go (+179/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/coretype.go (+122/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go (+12/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go (+15/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/normalize.go (+218/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/termlist.go (+163/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go (+197/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go (+151/-0)
debian/extra/vendor/golang.org/x/tools/internal/typeparams/typeterm.go (+170/-0)
debian/extra/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go (+1560/-0)
debian/extra/vendor/golang.org/x/tools/internal/typesinternal/errorcode_string.go (+179/-0)
debian/extra/vendor/golang.org/x/tools/internal/typesinternal/types.go (+52/-0)
debian/extra/vendor/golang.org/x/tools/internal/typesinternal/types_118.go (+19/-0)
debian/extra/vendor/google.golang.org/grpc/internal/transport/http2_server.go (+3/-8)
debian/extra/vendor/google.golang.org/grpc/server.go (+48/-21)
debian/extra/vendor/google.golang.org/grpc/version.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/encoding/protojson/decode.go (+29/-9)
debian/extra/vendor/google.golang.org/protobuf/encoding/protojson/doc.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/encoding/protojson/encode.go (+34/-5)
debian/extra/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go (+20/-39)
debian/extra/vendor/google.golang.org/protobuf/encoding/prototext/decode.go (+5/-3)
debian/extra/vendor/google.golang.org/protobuf/encoding/prototext/encode.go (+2/-2)
debian/extra/vendor/google.golang.org/protobuf/encoding/protowire/wire.go (+14/-14)
debian/extra/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go (+139/-44)
debian/extra/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go (+12/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb (+4/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/internal/filedesc/desc.go (+86/-16)
debian/extra/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go (+52/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go (+28/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/filedesc/editions.go (+142/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go (+339/-25)
debian/extra/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go (+31/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go (+5/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/genid/type_gen.go (+38/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go (+7/-15)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/codec_gen.go (+100/-13)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go (+12/-7)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/message.go (+11/-6)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go (+36/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go (+40/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/strs/strings.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go (+2/-2)
debian/extra/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go (+74/-0)
debian/extra/vendor/google.golang.org/protobuf/internal/version/version.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/proto/decode.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/proto/doc.go (+29/-29)
debian/extra/vendor/google.golang.org/protobuf/proto/encode.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/proto/extension.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/proto/merge.go (+1/-1)
debian/extra/vendor/google.golang.org/protobuf/proto/proto.go (+10/-8)
debian/extra/vendor/google.golang.org/protobuf/reflect/protodesc/desc.go (+19/-10)
debian/extra/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go (+56/-0)
debian/extra/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go (+2/-2)
debian/extra/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go (+3/-3)
debian/extra/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go (+148/-0)
debian/extra/vendor/google.golang.org/protobuf/reflect/protodesc/proto.go (+9/-9)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go (+45/-40)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go (+57/-7)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go (+22/-22)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go (+12/-12)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go (+4/-4)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go (+22/-22)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go (+2/-2)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go (+87/-0)
debian/extra/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go (+12/-12)
debian/extra/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go (+1759/-716)
debian/extra/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go (+177/-0)
debian/extra/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto (+28/-0)
debian/extra/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go (+2/-1)
debian/extra/vendor/modules.txt (+47/-13)
debian/patches/0006-add-after-cloud-config-service.patch (+19/-0)
debian/patches/series (+1/-0)
debian/rules (+1/-0)
debian/source/include-binaries (+9/-0)
dev/null (+0/-30)
gce_workload_cert_refresh/main.go (+169/-152)
gce_workload_cert_refresh/main_test.go (+495/-0)
go.mod (+11/-8)
go.sum (+21/-14)
google_authorized_keys/main.go (+14/-49)
google_authorized_keys/main_test.go (+103/-44)
google_guest_agent/agentcrypto/mtls_mds.go (+1/-1)
google_guest_agent/agentcrypto/mtls_mds_linux.go (+35/-14)
google_guest_agent/agentcrypto/mtls_mds_linux_test.go (+21/-4)
google_guest_agent/agentcrypto/mtls_mds_windows.go (+25/-0)
google_guest_agent/cfg/cfg.go (+30/-8)
google_guest_agent/cfg/cfg_test.go (+3/-1)
google_guest_agent/command/Readme.md (+24/-0)
google_guest_agent/command/command.go (+146/-0)
google_guest_agent/command/command_linux.go (+140/-0)
google_guest_agent/command/command_monitor.go (+228/-0)
google_guest_agent/command/command_test.go (+209/-0)
google_guest_agent/command/command_windows.go (+104/-0)
google_guest_agent/command/command_windows_test.go (+73/-0)
google_guest_agent/events/events.go (+308/-138)
google_guest_agent/events/events_test.go (+372/-107)
google_guest_agent/events/metadata/metadata.go (+0/-6)
google_guest_agent/events/metadata/metadata_test.go (+4/-0)
google_guest_agent/fakes/fake_mds.go (+5/-0)
google_guest_agent/instance_setup.go (+18/-7)
google_guest_agent/main.go (+22/-20)
google_guest_agent/non_windows_accounts.go (+1/-0)
google_guest_agent/oslogin.go (+32/-0)
google_guest_agent/scheduler/logger.go (+2/-2)
google_guest_agent/scheduler/scheduler.go (+1/-0)
google_guest_agent/scheduler/scheduler_test.go (+8/-8)
google_guest_agent/snapshot_listener.go (+7/-5)
google_guest_agent/sshca/sshca.go (+9/-11)
google_guest_agent/windows_accounts_test.go (+22/-15)
google_metadata_script_runner/main.go (+62/-77)
google_metadata_script_runner/main_test.go (+78/-11)
metadata/metadata.go (+16/-0)
metadata/metadata_test.go (+30/-0)
utils/main.go (+18/-20)
utils/main_test.go (+32/-20)
utils/test.go (+38/-0)
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+471839@code.launchpad.net

Commit message

* d/ch entry for bionic
* Merge remote-tracking branch 'ubuntu-core-dev/ubuntu/focal' into 'ubuntu-core-dev/ubuntu/bionic'

Description of the change

Built locally using sbuild -s --force-orig-source --extra-repository="deb [trusted=yes] https://kajiya:<email address hidden>/ubuntu-esm/esm-apps-updates-staging/ubuntu bionic main"

To post a comment you must log in.
6428ad7... by Chloé Smith

Merge remote-tracking branch 'ubuntu-core-dev/ubuntu/focal' into 'ubuntu-core-dev/ubuntu/bionic'

e344d9f... by Chloé Smith

d/ch entry for bionic

Unmerged commits

e344d9f... by Chloé Smith

d/ch entry for bionic

6428ad7... by Chloé Smith

Merge remote-tracking branch 'ubuntu-core-dev/ubuntu/focal' into 'ubuntu-core-dev/ubuntu/bionic'

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2index 2ceee21..85eb02e 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -1,5 +1,15 @@
6-# ignore all built binaries
7+# Ignore all built binaries.
8 **/gce_workload_cert_refresh
9+**/gce_workload_cert_refresh.exe
10 **/google_authorized_keys
11+**/google_authorized_keys.exe
12 **/google_guest_agent
13+**/google_guest_agent.exe
14 **/google_metadata_script_runner
15+**/google_metadata_script_runner.exe
16+
17+# Don't ignore new content to directories.
18+!**/gce_workload_cert_refresh/
19+!**/google_authorized_keys/
20+!**/google_guest_agent/
21+!**/google_metadata_script_runner/
22\ No newline at end of file
23diff --git a/OWNERS b/OWNERS
24index edde10e..9f473d5 100644
25--- a/OWNERS
26+++ b/OWNERS
27@@ -3,14 +3,15 @@
28
29 approvers:
30 - a-crate
31+ - ajorg
32 - bkatyl
33 - chaitanyakulkarni28
34 - dorileo
35 - drewhli
36 - elicriffield
37+ - gaughen
38 - jjerger
39 - karnvadaliya
40 - koln67
41 - quintonamore
42- - vorakl
43 - zmarano
44diff --git a/THIRD_PARTY_LICENSES/github.com/Microsoft/go-winio/LICENSE b/THIRD_PARTY_LICENSES/github.com/Microsoft/go-winio/LICENSE
45new file mode 100644
46index 0000000..b8b569d
47--- /dev/null
48+++ b/THIRD_PARTY_LICENSES/github.com/Microsoft/go-winio/LICENSE
49@@ -0,0 +1,22 @@
50+The MIT License (MIT)
51+
52+Copyright (c) 2015 Microsoft
53+
54+Permission is hereby granted, free of charge, to any person obtaining a copy
55+of this software and associated documentation files (the "Software"), to deal
56+in the Software without restriction, including without limitation the rights
57+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
58+copies of the Software, and to permit persons to whom the Software is
59+furnished to do so, subject to the following conditions:
60+
61+The above copyright notice and this permission notice shall be included in all
62+copies or substantial portions of the Software.
63+
64+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
66+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
67+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
68+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
69+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
70+SOFTWARE.
71+
72diff --git a/THIRD_PARTY_LICENSES/github.com/hashicorp/hcl/LICENSE b/THIRD_PARTY_LICENSES/github.com/hashicorp/hcl/LICENSE
73new file mode 100644
74index 0000000..e25da5f
75--- /dev/null
76+++ b/THIRD_PARTY_LICENSES/github.com/hashicorp/hcl/LICENSE
77@@ -0,0 +1,355 @@
78+Copyright (c) 2014 HashiCorp, Inc.
79+
80+Mozilla Public License, version 2.0
81+
82+1. Definitions
83+
84+1.1. “Contributor”
85+
86+ means each individual or legal entity that creates, contributes to the
87+ creation of, or owns Covered Software.
88+
89+1.2. “Contributor Version”
90+
91+ means the combination of the Contributions of others (if any) used by a
92+ Contributor and that particular Contributor’s Contribution.
93+
94+1.3. “Contribution”
95+
96+ means Covered Software of a particular Contributor.
97+
98+1.4. “Covered Software”
99+
100+ means Source Code Form to which the initial Contributor has attached the
101+ notice in Exhibit A, the Executable Form of such Source Code Form, and
102+ Modifications of such Source Code Form, in each case including portions
103+ thereof.
104+
105+1.5. “Incompatible With Secondary Licenses”
106+ means
107+
108+ a. that the initial Contributor has attached the notice described in
109+ Exhibit B to the Covered Software; or
110+
111+ b. that the Covered Software was made available under the terms of version
112+ 1.1 or earlier of the License, but not also under the terms of a
113+ Secondary License.
114+
115+1.6. “Executable Form”
116+
117+ means any form of the work other than Source Code Form.
118+
119+1.7. “Larger Work”
120+
121+ means a work that combines Covered Software with other material, in a separate
122+ file or files, that is not Covered Software.
123+
124+1.8. “License”
125+
126+ means this document.
127+
128+1.9. “Licensable”
129+
130+ means having the right to grant, to the maximum extent possible, whether at the
131+ time of the initial grant or subsequently, any and all of the rights conveyed by
132+ this License.
133+
134+1.10. “Modifications”
135+
136+ means any of the following:
137+
138+ a. any file in Source Code Form that results from an addition to, deletion
139+ from, or modification of the contents of Covered Software; or
140+
141+ b. any new file in Source Code Form that contains any Covered Software.
142+
143+1.11. “Patent Claims” of a Contributor
144+
145+ means any patent claim(s), including without limitation, method, process,
146+ and apparatus claims, in any patent Licensable by such Contributor that
147+ would be infringed, but for the grant of the License, by the making,
148+ using, selling, offering for sale, having made, import, or transfer of
149+ either its Contributions or its Contributor Version.
150+
151+1.12. “Secondary License”
152+
153+ means either the GNU General Public License, Version 2.0, the GNU Lesser
154+ General Public License, Version 2.1, the GNU Affero General Public
155+ License, Version 3.0, or any later versions of those licenses.
156+
157+1.13. “Source Code Form”
158+
159+ means the form of the work preferred for making modifications.
160+
161+1.14. “You” (or “Your”)
162+
163+ means an individual or a legal entity exercising rights under this
164+ License. For legal entities, “You” includes any entity that controls, is
165+ controlled by, or is under common control with You. For purposes of this
166+ definition, “control” means (a) the power, direct or indirect, to cause
167+ the direction or management of such entity, whether by contract or
168+ otherwise, or (b) ownership of more than fifty percent (50%) of the
169+ outstanding shares or beneficial ownership of such entity.
170+
171+
172+2. License Grants and Conditions
173+
174+2.1. Grants
175+
176+ Each Contributor hereby grants You a world-wide, royalty-free,
177+ non-exclusive license:
178+
179+ a. under intellectual property rights (other than patent or trademark)
180+ Licensable by such Contributor to use, reproduce, make available,
181+ modify, display, perform, distribute, and otherwise exploit its
182+ Contributions, either on an unmodified basis, with Modifications, or as
183+ part of a Larger Work; and
184+
185+ b. under Patent Claims of such Contributor to make, use, sell, offer for
186+ sale, have made, import, and otherwise transfer either its Contributions
187+ or its Contributor Version.
188+
189+2.2. Effective Date
190+
191+ The licenses granted in Section 2.1 with respect to any Contribution become
192+ effective for each Contribution on the date the Contributor first distributes
193+ such Contribution.
194+
195+2.3. Limitations on Grant Scope
196+
197+ The licenses granted in this Section 2 are the only rights granted under this
198+ License. No additional rights or licenses will be implied from the distribution
199+ or licensing of Covered Software under this License. Notwithstanding Section
200+ 2.1(b) above, no patent license is granted by a Contributor:
201+
202+ a. for any code that a Contributor has removed from Covered Software; or
203+
204+ b. for infringements caused by: (i) Your and any other third party’s
205+ modifications of Covered Software, or (ii) the combination of its
206+ Contributions with other software (except as part of its Contributor
207+ Version); or
208+
209+ c. under Patent Claims infringed by Covered Software in the absence of its
210+ Contributions.
211+
212+ This License does not grant any rights in the trademarks, service marks, or
213+ logos of any Contributor (except as may be necessary to comply with the
214+ notice requirements in Section 3.4).
215+
216+2.4. Subsequent Licenses
217+
218+ No Contributor makes additional grants as a result of Your choice to
219+ distribute the Covered Software under a subsequent version of this License
220+ (see Section 10.2) or under the terms of a Secondary License (if permitted
221+ under the terms of Section 3.3).
222+
223+2.5. Representation
224+
225+ Each Contributor represents that the Contributor believes its Contributions
226+ are its original creation(s) or it has sufficient rights to grant the
227+ rights to its Contributions conveyed by this License.
228+
229+2.6. Fair Use
230+
231+ This License is not intended to limit any rights You have under applicable
232+ copyright doctrines of fair use, fair dealing, or other equivalents.
233+
234+2.7. Conditions
235+
236+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
237+ Section 2.1.
238+
239+
240+3. Responsibilities
241+
242+3.1. Distribution of Source Form
243+
244+ All distribution of Covered Software in Source Code Form, including any
245+ Modifications that You create or to which You contribute, must be under the
246+ terms of this License. You must inform recipients that the Source Code Form
247+ of the Covered Software is governed by the terms of this License, and how
248+ they can obtain a copy of this License. You may not attempt to alter or
249+ restrict the recipients’ rights in the Source Code Form.
250+
251+3.2. Distribution of Executable Form
252+
253+ If You distribute Covered Software in Executable Form then:
254+
255+ a. such Covered Software must also be made available in Source Code Form,
256+ as described in Section 3.1, and You must inform recipients of the
257+ Executable Form how they can obtain a copy of such Source Code Form by
258+ reasonable means in a timely manner, at a charge no more than the cost
259+ of distribution to the recipient; and
260+
261+ b. You may distribute such Executable Form under the terms of this License,
262+ or sublicense it under different terms, provided that the license for
263+ the Executable Form does not attempt to limit or alter the recipients’
264+ rights in the Source Code Form under this License.
265+
266+3.3. Distribution of a Larger Work
267+
268+ You may create and distribute a Larger Work under terms of Your choice,
269+ provided that You also comply with the requirements of this License for the
270+ Covered Software. If the Larger Work is a combination of Covered Software
271+ with a work governed by one or more Secondary Licenses, and the Covered
272+ Software is not Incompatible With Secondary Licenses, this License permits
273+ You to additionally distribute such Covered Software under the terms of
274+ such Secondary License(s), so that the recipient of the Larger Work may, at
275+ their option, further distribute the Covered Software under the terms of
276+ either this License or such Secondary License(s).
277+
278+3.4. Notices
279+
280+ You may not remove or alter the substance of any license notices (including
281+ copyright notices, patent notices, disclaimers of warranty, or limitations
282+ of liability) contained within the Source Code Form of the Covered
283+ Software, except that You may alter any license notices to the extent
284+ required to remedy known factual inaccuracies.
285+
286+3.5. Application of Additional Terms
287+
288+ You may choose to offer, and to charge a fee for, warranty, support,
289+ indemnity or liability obligations to one or more recipients of Covered
290+ Software. However, You may do so only on Your own behalf, and not on behalf
291+ of any Contributor. You must make it absolutely clear that any such
292+ warranty, support, indemnity, or liability obligation is offered by You
293+ alone, and You hereby agree to indemnify every Contributor for any
294+ liability incurred by such Contributor as a result of warranty, support,
295+ indemnity or liability terms You offer. You may include additional
296+ disclaimers of warranty and limitations of liability specific to any
297+ jurisdiction.
298+
299+4. Inability to Comply Due to Statute or Regulation
300+
301+ If it is impossible for You to comply with any of the terms of this License
302+ with respect to some or all of the Covered Software due to statute, judicial
303+ order, or regulation then You must: (a) comply with the terms of this License
304+ to the maximum extent possible; and (b) describe the limitations and the code
305+ they affect. Such description must be placed in a text file included with all
306+ distributions of the Covered Software under this License. Except to the
307+ extent prohibited by statute or regulation, such description must be
308+ sufficiently detailed for a recipient of ordinary skill to be able to
309+ understand it.
310+
311+5. Termination
312+
313+5.1. The rights granted under this License will terminate automatically if You
314+ fail to comply with any of its terms. However, if You become compliant,
315+ then the rights granted under this License from a particular Contributor
316+ are reinstated (a) provisionally, unless and until such Contributor
317+ explicitly and finally terminates Your grants, and (b) on an ongoing basis,
318+ if such Contributor fails to notify You of the non-compliance by some
319+ reasonable means prior to 60 days after You have come back into compliance.
320+ Moreover, Your grants from a particular Contributor are reinstated on an
321+ ongoing basis if such Contributor notifies You of the non-compliance by
322+ some reasonable means, this is the first time You have received notice of
323+ non-compliance with this License from such Contributor, and You become
324+ compliant prior to 30 days after Your receipt of the notice.
325+
326+5.2. If You initiate litigation against any entity by asserting a patent
327+ infringement claim (excluding declaratory judgment actions, counter-claims,
328+ and cross-claims) alleging that a Contributor Version directly or
329+ indirectly infringes any patent, then the rights granted to You by any and
330+ all Contributors for the Covered Software under Section 2.1 of this License
331+ shall terminate.
332+
333+5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
334+ license agreements (excluding distributors and resellers) which have been
335+ validly granted by You or Your distributors under this License prior to
336+ termination shall survive termination.
337+
338+6. Disclaimer of Warranty
339+
340+ Covered Software is provided under this License on an “as is” basis, without
341+ warranty of any kind, either expressed, implied, or statutory, including,
342+ without limitation, warranties that the Covered Software is free of defects,
343+ merchantable, fit for a particular purpose or non-infringing. The entire
344+ risk as to the quality and performance of the Covered Software is with You.
345+ Should any Covered Software prove defective in any respect, You (not any
346+ Contributor) assume the cost of any necessary servicing, repair, or
347+ correction. This disclaimer of warranty constitutes an essential part of this
348+ License. No use of any Covered Software is authorized under this License
349+ except under this disclaimer.
350+
351+7. Limitation of Liability
352+
353+ Under no circumstances and under no legal theory, whether tort (including
354+ negligence), contract, or otherwise, shall any Contributor, or anyone who
355+ distributes Covered Software as permitted above, be liable to You for any
356+ direct, indirect, special, incidental, or consequential damages of any
357+ character including, without limitation, damages for lost profits, loss of
358+ goodwill, work stoppage, computer failure or malfunction, or any and all
359+ other commercial damages or losses, even if such party shall have been
360+ informed of the possibility of such damages. This limitation of liability
361+ shall not apply to liability for death or personal injury resulting from such
362+ party’s negligence to the extent applicable law prohibits such limitation.
363+ Some jurisdictions do not allow the exclusion or limitation of incidental or
364+ consequential damages, so this exclusion and limitation may not apply to You.
365+
366+8. Litigation
367+
368+ Any litigation relating to this License may be brought only in the courts of
369+ a jurisdiction where the defendant maintains its principal place of business
370+ and such litigation shall be governed by laws of that jurisdiction, without
371+ reference to its conflict-of-law provisions. Nothing in this Section shall
372+ prevent a party’s ability to bring cross-claims or counter-claims.
373+
374+9. Miscellaneous
375+
376+ This License represents the complete agreement concerning the subject matter
377+ hereof. If any provision of this License is held to be unenforceable, such
378+ provision shall be reformed only to the extent necessary to make it
379+ enforceable. Any law or regulation which provides that the language of a
380+ contract shall be construed against the drafter shall not be used to construe
381+ this License against a Contributor.
382+
383+
384+10. Versions of the License
385+
386+10.1. New Versions
387+
388+ Mozilla Foundation is the license steward. Except as provided in Section
389+ 10.3, no one other than the license steward has the right to modify or
390+ publish new versions of this License. Each version will be given a
391+ distinguishing version number.
392+
393+10.2. Effect of New Versions
394+
395+ You may distribute the Covered Software under the terms of the version of
396+ the License under which You originally received the Covered Software, or
397+ under the terms of any subsequent version published by the license
398+ steward.
399+
400+10.3. Modified Versions
401+
402+ If you create software not governed by this License, and you want to
403+ create a new license for such software, you may create and use a modified
404+ version of this License if you rename the license and remove any
405+ references to the name of the license steward (except to note that such
406+ modified license differs from this License).
407+
408+10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
409+ If You choose to distribute Source Code Form that is Incompatible With
410+ Secondary Licenses under the terms of this version of the License, the
411+ notice described in Exhibit B of this License must be attached.
412+
413+Exhibit A - Source Code Form License Notice
414+
415+ This Source Code Form is subject to the
416+ terms of the Mozilla Public License, v.
417+ 2.0. If a copy of the MPL was not
418+ distributed with this file, You can
419+ obtain one at
420+ http://mozilla.org/MPL/2.0/.
421+
422+If it is not possible or desirable to put the notice in a particular file, then
423+You may include the notice in a location (such as a LICENSE file in a relevant
424+directory) where a recipient would be likely to look for such a notice.
425+
426+You may add additional accurate notices of copyright ownership.
427+
428+Exhibit B - “Incompatible With Secondary Licenses” Notice
429+
430+ This Source Code Form is “Incompatible
431+ With Secondary Licenses”, as defined by
432+ the Mozilla Public License, v. 2.0.
433diff --git a/THIRD_PARTY_LICENSES/github.com/mitchellh/go-homedir/LICENSE b/THIRD_PARTY_LICENSES/github.com/mitchellh/go-homedir/LICENSE
434new file mode 100644
435index 0000000..f9c841a
436--- /dev/null
437+++ b/THIRD_PARTY_LICENSES/github.com/mitchellh/go-homedir/LICENSE
438@@ -0,0 +1,21 @@
439+The MIT License (MIT)
440+
441+Copyright (c) 2013 Mitchell Hashimoto
442+
443+Permission is hereby granted, free of charge, to any person obtaining a copy
444+of this software and associated documentation files (the "Software"), to deal
445+in the Software without restriction, including without limitation the rights
446+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
447+copies of the Software, and to permit persons to whom the Software is
448+furnished to do so, subject to the following conditions:
449+
450+The above copyright notice and this permission notice shall be included in
451+all copies or substantial portions of the Software.
452+
453+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
454+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
455+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
456+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
457+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
458+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
459+THE SOFTWARE.
460diff --git a/THIRD_PARTY_LICENSES/golang.org/x/mod/LICENSE b/THIRD_PARTY_LICENSES/golang.org/x/mod/LICENSE
461new file mode 100644
462index 0000000..6a66aea
463--- /dev/null
464+++ b/THIRD_PARTY_LICENSES/golang.org/x/mod/LICENSE
465@@ -0,0 +1,27 @@
466+Copyright (c) 2009 The Go Authors. All rights reserved.
467+
468+Redistribution and use in source and binary forms, with or without
469+modification, are permitted provided that the following conditions are
470+met:
471+
472+ * Redistributions of source code must retain the above copyright
473+notice, this list of conditions and the following disclaimer.
474+ * Redistributions in binary form must reproduce the above
475+copyright notice, this list of conditions and the following disclaimer
476+in the documentation and/or other materials provided with the
477+distribution.
478+ * Neither the name of Google Inc. nor the names of its
479+contributors may be used to endorse or promote products derived from
480+this software without specific prior written permission.
481+
482+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
483+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
484+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
485+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
486+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
487+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
488+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
489+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
490+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
491+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
492+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
493diff --git a/THIRD_PARTY_LICENSES/golang.org/x/tools/LICENSE b/THIRD_PARTY_LICENSES/golang.org/x/tools/LICENSE
494new file mode 100644
495index 0000000..6a66aea
496--- /dev/null
497+++ b/THIRD_PARTY_LICENSES/golang.org/x/tools/LICENSE
498@@ -0,0 +1,27 @@
499+Copyright (c) 2009 The Go Authors. All rights reserved.
500+
501+Redistribution and use in source and binary forms, with or without
502+modification, are permitted provided that the following conditions are
503+met:
504+
505+ * Redistributions of source code must retain the above copyright
506+notice, this list of conditions and the following disclaimer.
507+ * Redistributions in binary form must reproduce the above
508+copyright notice, this list of conditions and the following disclaimer
509+in the documentation and/or other materials provided with the
510+distribution.
511+ * Neither the name of Google Inc. nor the names of its
512+contributors may be used to endorse or promote products derived from
513+this software without specific prior written permission.
514+
515+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
516+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
517+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
518+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
519+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
520+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
521+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
522+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
523+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
524+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
525+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
526diff --git a/debian/changelog b/debian/changelog
527index 1003e9b..3633e5c 100644
528--- a/debian/changelog
529+++ b/debian/changelog
530@@ -1,3 +1,81 @@
531+google-guest-agent (20240716.00-0ubuntu1~18.04.0ubuntu1) bionic; urgency=medium
532+
533+ * Rebuild for Bionic Beaver (LP: #2073163)
534+
535+ -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Thu, 22 Aug 2024 20:36:29 +0100
536+
537+google-guest-agent (20240716.00-0ubuntu1~20.04.0) focal; urgency=medium
538+
539+ * No-change rebuild for Focal.
540+
541+ -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Thu, 25 Jul 2024 20:01:29 +0100
542+
543+google-guest-agent (20240716.00-0ubuntu1) oracular; urgency=medium
544+
545+ [ Utkarsh Gupta ]
546+ * New upstream version 20240716.00. (LP: #2073163)
547+ * Update vendored dependencies.
548+ * Set DH_GOLANG_INSTALL_EXTRA to editions_defaults.binpb.
549+
550+ [ Chloé Smith ]
551+ * d/p/0006-add-after-cloud-config-service.patch: add patch
552+ to force ordering between cloud-init and the guest agent.
553+ (LP: #2057965)
554+
555+ -- Utkarsh Gupta <utkarsh@ubuntu.com> Thu, 18 Jul 2024 23:47:17 +0530
556+
557+google-guest-agent (20240213.00-0ubuntu4) oracular; urgency=medium
558+
559+ * SECURITY UPDATE: Denial of service
560+ - debian/extra/vendor/googgle.golang.org/protobuf was
561+ patched with a backport of f01a588e5810b90996452eec4a28f22a0afae023
562+ in files encoding/protojson/well_known_types.go,
563+ internal/encoding/json/decode.go.
564+ - debian/extra/vendor adding patches-applied and README.txt for
565+ track/documentation propose about patches applied in vendored sources.
566+ - CVE-2024-24786
567+
568+ -- Leonidas Da Silva Barbosa <leo.barbosa@canonical.com> Wed, 12 Jun 2024 10:15:12 -0300
569+
570+google-guest-agent (20240213.00-0ubuntu3) noble; urgency=medium
571+
572+ * No-change rebuild against Go 1.22.
573+
574+ -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 08 Apr 2024 14:53:33 +1200
575+
576+google-guest-agent (20240213.00-0ubuntu2) noble; urgency=medium
577+
578+ * No-change rebuild for CVE-2024-3094
579+
580+ -- William Grant <wgrant@ubuntu.com> Mon, 01 Apr 2024 16:50:39 +1100
581+
582+google-guest-agent (20240213.00-0ubuntu1) noble; urgency=medium
583+
584+ [ Utkarsh Gupta ]
585+ * Add a reason to include include-binaries file.
586+
587+ [ Chloé 'kajiya' Smith ]
588+ * New upstream version, v20240213.00. (LP: #2054484)
589+ * d/extra/vendor: Update the vendored dependencies.
590+ * d/source/include-binaries: add new file.
591+
592+ -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Wed, 21 Feb 2024 00:25:47 +0000
593+
594+google-guest-agent (20231004.02-0ubuntu3) noble; urgency=medium
595+
596+ * d/control: Fix dependency version of `google-compute-engine-oslogin`
597+ to match archive (LP: #2050956)
598+
599+ -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Fri, 26 Jan 2024 15:12:02 +0000
600+
601+google-guest-agent (20231004.02-0ubuntu2) noble; urgency=medium
602+
603+ * d/control: There should b a dependency on `google-compute-engine-oslogin`
604+ to match the Google managed control file (LP: #2050956)
605+ * Also updated the `Vcs-` fields and removed the `Uploaders` field.
606+
607+ -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Tue, 23 Jan 2024 13:43:24 +0000
608+
609 google-guest-agent (20231004.02-0ubuntu1~18.04.2) bionic; urgency=medium
610
611 * Use dh-golang >= 1.34.3 for building g-g-a.
612diff --git a/debian/control b/debian/control
613index 0d54633..cec7c17 100644
614--- a/debian/control
615+++ b/debian/control
616@@ -17,7 +17,8 @@ XS-Go-Import-Path: github.com/GoogleCloudPlatform/guest-agent
617 Package: google-guest-agent
618 Architecture: any
619 Depends: ${misc:Depends},
620- ${shlibs:Depends}
621+ ${shlibs:Depends},
622+ google-compute-engine-oslogin (>= 20231004.00-0ubuntu1)
623 Built-Using: ${misc:Built-Using}
624 Breaks: gce-compute-image-packages (<< 20191115),
625 python3-google-compute-engine
626diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/.gitattributes b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitattributes
627new file mode 100644
628index 0000000..94f480d
629--- /dev/null
630+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitattributes
631@@ -0,0 +1 @@
632+* text=auto eol=lf
633\ No newline at end of file
634diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/.gitignore b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitignore
635new file mode 100644
636index 0000000..815e206
637--- /dev/null
638+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitignore
639@@ -0,0 +1,10 @@
640+.vscode/
641+
642+*.exe
643+
644+# testing
645+testdata
646+
647+# go workspaces
648+go.work
649+go.work.sum
650diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/.golangci.yml b/debian/extra/vendor/github.com/Microsoft/go-winio/.golangci.yml
651new file mode 100644
652index 0000000..7b503d2
653--- /dev/null
654+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/.golangci.yml
655@@ -0,0 +1,149 @@
656+run:
657+ skip-dirs:
658+ - pkg/etw/sample
659+
660+linters:
661+ enable:
662+ # style
663+ - containedctx # struct contains a context
664+ - dupl # duplicate code
665+ - errname # erorrs are named correctly
666+ - nolintlint # "//nolint" directives are properly explained
667+ - revive # golint replacement
668+ - unconvert # unnecessary conversions
669+ - wastedassign
670+
671+ # bugs, performance, unused, etc ...
672+ - contextcheck # function uses a non-inherited context
673+ - errorlint # errors not wrapped for 1.13
674+ - exhaustive # check exhaustiveness of enum switch statements
675+ - gofmt # files are gofmt'ed
676+ - gosec # security
677+ - nilerr # returns nil even with non-nil error
678+ - unparam # unused function params
679+
680+issues:
681+ exclude-rules:
682+ # err is very often shadowed in nested scopes
683+ - linters:
684+ - govet
685+ text: '^shadow: declaration of "err" shadows declaration'
686+
687+ # ignore long lines for skip autogen directives
688+ - linters:
689+ - revive
690+ text: "^line-length-limit: "
691+ source: "^//(go:generate|sys) "
692+
693+ #TODO: remove after upgrading to go1.18
694+ # ignore comment spacing for nolint and sys directives
695+ - linters:
696+ - revive
697+ text: "^comment-spacings: no space between comment delimiter and comment text"
698+ source: "//(cspell:|nolint:|sys |todo)"
699+
700+ # not on go 1.18 yet, so no any
701+ - linters:
702+ - revive
703+ text: "^use-any: since GO 1.18 'interface{}' can be replaced by 'any'"
704+
705+ # allow unjustified ignores of error checks in defer statements
706+ - linters:
707+ - nolintlint
708+ text: "^directive `//nolint:errcheck` should provide explanation"
709+ source: '^\s*defer '
710+
711+ # allow unjustified ignores of error lints for io.EOF
712+ - linters:
713+ - nolintlint
714+ text: "^directive `//nolint:errorlint` should provide explanation"
715+ source: '[=|!]= io.EOF'
716+
717+
718+linters-settings:
719+ exhaustive:
720+ default-signifies-exhaustive: true
721+ govet:
722+ enable-all: true
723+ disable:
724+ # struct order is often for Win32 compat
725+ # also, ignore pointer bytes/GC issues for now until performance becomes an issue
726+ - fieldalignment
727+ check-shadowing: true
728+ nolintlint:
729+ allow-leading-space: false
730+ require-explanation: true
731+ require-specific: true
732+ revive:
733+ # revive is more configurable than static check, so likely the preferred alternative to static-check
734+ # (once the perf issue is solved: https://github.com/golangci/golangci-lint/issues/2997)
735+ enable-all-rules:
736+ true
737+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
738+ rules:
739+ # rules with required arguments
740+ - name: argument-limit
741+ disabled: true
742+ - name: banned-characters
743+ disabled: true
744+ - name: cognitive-complexity
745+ disabled: true
746+ - name: cyclomatic
747+ disabled: true
748+ - name: file-header
749+ disabled: true
750+ - name: function-length
751+ disabled: true
752+ - name: function-result-limit
753+ disabled: true
754+ - name: max-public-structs
755+ disabled: true
756+ # geneally annoying rules
757+ - name: add-constant # complains about any and all strings and integers
758+ disabled: true
759+ - name: confusing-naming # we frequently use "Foo()" and "foo()" together
760+ disabled: true
761+ - name: flag-parameter # excessive, and a common idiom we use
762+ disabled: true
763+ - name: unhandled-error # warns over common fmt.Print* and io.Close; rely on errcheck instead
764+ disabled: true
765+ # general config
766+ - name: line-length-limit
767+ arguments:
768+ - 140
769+ - name: var-naming
770+ arguments:
771+ - []
772+ - - CID
773+ - CRI
774+ - CTRD
775+ - DACL
776+ - DLL
777+ - DOS
778+ - ETW
779+ - FSCTL
780+ - GCS
781+ - GMSA
782+ - HCS
783+ - HV
784+ - IO
785+ - LCOW
786+ - LDAP
787+ - LPAC
788+ - LTSC
789+ - MMIO
790+ - NT
791+ - OCI
792+ - PMEM
793+ - PWSH
794+ - RX
795+ - SACl
796+ - SID
797+ - SMB
798+ - TX
799+ - VHD
800+ - VHDX
801+ - VMID
802+ - VPCI
803+ - WCOW
804+ - WIM
805diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/CODEOWNERS b/debian/extra/vendor/github.com/Microsoft/go-winio/CODEOWNERS
806new file mode 100644
807index 0000000..ae1b494
808--- /dev/null
809+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/CODEOWNERS
810@@ -0,0 +1 @@
811+ * @microsoft/containerplat
812diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/LICENSE b/debian/extra/vendor/github.com/Microsoft/go-winio/LICENSE
813new file mode 100644
814index 0000000..b8b569d
815--- /dev/null
816+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/LICENSE
817@@ -0,0 +1,22 @@
818+The MIT License (MIT)
819+
820+Copyright (c) 2015 Microsoft
821+
822+Permission is hereby granted, free of charge, to any person obtaining a copy
823+of this software and associated documentation files (the "Software"), to deal
824+in the Software without restriction, including without limitation the rights
825+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
826+copies of the Software, and to permit persons to whom the Software is
827+furnished to do so, subject to the following conditions:
828+
829+The above copyright notice and this permission notice shall be included in all
830+copies or substantial portions of the Software.
831+
832+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
833+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
834+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
835+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
836+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
837+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
838+SOFTWARE.
839+
840diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/README.md b/debian/extra/vendor/github.com/Microsoft/go-winio/README.md
841new file mode 100644
842index 0000000..7474b4f
843--- /dev/null
844+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/README.md
845@@ -0,0 +1,89 @@
846+# go-winio [![Build Status](https://github.com/microsoft/go-winio/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/go-winio/actions/workflows/ci.yml)
847+
848+This repository contains utilities for efficiently performing Win32 IO operations in
849+Go. Currently, this is focused on accessing named pipes and other file handles, and
850+for using named pipes as a net transport.
851+
852+This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go
853+to reuse the thread to schedule another goroutine. This limits support to Windows Vista and
854+newer operating systems. This is similar to the implementation of network sockets in Go's net
855+package.
856+
857+Please see the LICENSE file for licensing information.
858+
859+## Contributing
860+
861+This project welcomes contributions and suggestions.
862+Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that
863+you have the right to, and actually do, grant us the rights to use your contribution.
864+For details, visit [Microsoft CLA](https://cla.microsoft.com).
865+
866+When you submit a pull request, a CLA-bot will automatically determine whether you need to
867+provide a CLA and decorate the PR appropriately (e.g., label, comment).
868+Simply follow the instructions provided by the bot.
869+You will only need to do this once across all repos using our CLA.
870+
871+Additionally, the pull request pipeline requires the following steps to be performed before
872+mergining.
873+
874+### Code Sign-Off
875+
876+We require that contributors sign their commits using [`git commit --signoff`][git-commit-s]
877+to certify they either authored the work themselves or otherwise have permission to use it in this project.
878+
879+A range of commits can be signed off using [`git rebase --signoff`][git-rebase-s].
880+
881+Please see [the developer certificate](https://developercertificate.org) for more info,
882+as well as to make sure that you can attest to the rules listed.
883+Our CI uses the DCO Github app to ensure that all commits in a given PR are signed-off.
884+
885+### Linting
886+
887+Code must pass a linting stage, which uses [`golangci-lint`][lint].
888+The linting settings are stored in [`.golangci.yaml`](./.golangci.yaml), and can be run
889+automatically with VSCode by adding the following to your workspace or folder settings:
890+
891+```json
892+ "go.lintTool": "golangci-lint",
893+ "go.lintOnSave": "package",
894+```
895+
896+Additional editor [integrations options are also available][lint-ide].
897+
898+Alternatively, `golangci-lint` can be [installed locally][lint-install] and run from the repo root:
899+
900+```shell
901+# use . or specify a path to only lint a package
902+# to show all lint errors, use flags "--max-issues-per-linter=0 --max-same-issues=0"
903+> golangci-lint run ./...
904+```
905+
906+### Go Generate
907+
908+The pipeline checks that auto-generated code, via `go generate`, are up to date.
909+
910+This can be done for the entire repo:
911+
912+```shell
913+> go generate ./...
914+```
915+
916+## Code of Conduct
917+
918+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
919+For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
920+contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
921+
922+## Special Thanks
923+
924+Thanks to [natefinch][natefinch] for the inspiration for this library.
925+See [npipe](https://github.com/natefinch/npipe) for another named pipe implementation.
926+
927+[lint]: https://golangci-lint.run/
928+[lint-ide]: https://golangci-lint.run/usage/integrations/#editor-integration
929+[lint-install]: https://golangci-lint.run/usage/install/#local-installation
930+
931+[git-commit-s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s
932+[git-rebase-s]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---signoff
933+
934+[natefinch]: https://github.com/natefinch
935diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/SECURITY.md b/debian/extra/vendor/github.com/Microsoft/go-winio/SECURITY.md
936new file mode 100644
937index 0000000..869fdfe
938--- /dev/null
939+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/SECURITY.md
940@@ -0,0 +1,41 @@
941+<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
942+
943+## Security
944+
945+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
946+
947+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
948+
949+## Reporting Security Issues
950+
951+**Please do not report security vulnerabilities through public GitHub issues.**
952+
953+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
954+
955+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
956+
957+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
958+
959+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
960+
961+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
962+ * Full paths of source file(s) related to the manifestation of the issue
963+ * The location of the affected source code (tag/branch/commit or direct URL)
964+ * Any special configuration required to reproduce the issue
965+ * Step-by-step instructions to reproduce the issue
966+ * Proof-of-concept or exploit code (if possible)
967+ * Impact of the issue, including how an attacker might exploit the issue
968+
969+This information will help us triage your report more quickly.
970+
971+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
972+
973+## Preferred Languages
974+
975+We prefer all communications to be in English.
976+
977+## Policy
978+
979+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
980+
981+<!-- END MICROSOFT SECURITY.MD BLOCK -->
982diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/backup.go b/debian/extra/vendor/github.com/Microsoft/go-winio/backup.go
983new file mode 100644
984index 0000000..09621c8
985--- /dev/null
986+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/backup.go
987@@ -0,0 +1,290 @@
988+//go:build windows
989+// +build windows
990+
991+package winio
992+
993+import (
994+ "encoding/binary"
995+ "errors"
996+ "fmt"
997+ "io"
998+ "os"
999+ "runtime"
1000+ "syscall"
1001+ "unicode/utf16"
1002+
1003+ "golang.org/x/sys/windows"
1004+)
1005+
1006+//sys backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead
1007+//sys backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite
1008+
1009+const (
1010+ BackupData = uint32(iota + 1)
1011+ BackupEaData
1012+ BackupSecurity
1013+ BackupAlternateData
1014+ BackupLink
1015+ BackupPropertyData
1016+ BackupObjectId //revive:disable-line:var-naming ID, not Id
1017+ BackupReparseData
1018+ BackupSparseBlock
1019+ BackupTxfsData
1020+)
1021+
1022+const (
1023+ StreamSparseAttributes = uint32(8)
1024+)
1025+
1026+//nolint:revive // var-naming: ALL_CAPS
1027+const (
1028+ WRITE_DAC = windows.WRITE_DAC
1029+ WRITE_OWNER = windows.WRITE_OWNER
1030+ ACCESS_SYSTEM_SECURITY = windows.ACCESS_SYSTEM_SECURITY
1031+)
1032+
1033+// BackupHeader represents a backup stream of a file.
1034+type BackupHeader struct {
1035+ //revive:disable-next-line:var-naming ID, not Id
1036+ Id uint32 // The backup stream ID
1037+ Attributes uint32 // Stream attributes
1038+ Size int64 // The size of the stream in bytes
1039+ Name string // The name of the stream (for BackupAlternateData only).
1040+ Offset int64 // The offset of the stream in the file (for BackupSparseBlock only).
1041+}
1042+
1043+type win32StreamID struct {
1044+ StreamID uint32
1045+ Attributes uint32
1046+ Size uint64
1047+ NameSize uint32
1048+}
1049+
1050+// BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series
1051+// of BackupHeader values.
1052+type BackupStreamReader struct {
1053+ r io.Reader
1054+ bytesLeft int64
1055+}
1056+
1057+// NewBackupStreamReader produces a BackupStreamReader from any io.Reader.
1058+func NewBackupStreamReader(r io.Reader) *BackupStreamReader {
1059+ return &BackupStreamReader{r, 0}
1060+}
1061+
1062+// Next returns the next backup stream and prepares for calls to Read(). It skips the remainder of the current stream if
1063+// it was not completely read.
1064+func (r *BackupStreamReader) Next() (*BackupHeader, error) {
1065+ if r.bytesLeft > 0 { //nolint:nestif // todo: flatten this
1066+ if s, ok := r.r.(io.Seeker); ok {
1067+ // Make sure Seek on io.SeekCurrent sometimes succeeds
1068+ // before trying the actual seek.
1069+ if _, err := s.Seek(0, io.SeekCurrent); err == nil {
1070+ if _, err = s.Seek(r.bytesLeft, io.SeekCurrent); err != nil {
1071+ return nil, err
1072+ }
1073+ r.bytesLeft = 0
1074+ }
1075+ }
1076+ if _, err := io.Copy(io.Discard, r); err != nil {
1077+ return nil, err
1078+ }
1079+ }
1080+ var wsi win32StreamID
1081+ if err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil {
1082+ return nil, err
1083+ }
1084+ hdr := &BackupHeader{
1085+ Id: wsi.StreamID,
1086+ Attributes: wsi.Attributes,
1087+ Size: int64(wsi.Size),
1088+ }
1089+ if wsi.NameSize != 0 {
1090+ name := make([]uint16, int(wsi.NameSize/2))
1091+ if err := binary.Read(r.r, binary.LittleEndian, name); err != nil {
1092+ return nil, err
1093+ }
1094+ hdr.Name = syscall.UTF16ToString(name)
1095+ }
1096+ if wsi.StreamID == BackupSparseBlock {
1097+ if err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil {
1098+ return nil, err
1099+ }
1100+ hdr.Size -= 8
1101+ }
1102+ r.bytesLeft = hdr.Size
1103+ return hdr, nil
1104+}
1105+
1106+// Read reads from the current backup stream.
1107+func (r *BackupStreamReader) Read(b []byte) (int, error) {
1108+ if r.bytesLeft == 0 {
1109+ return 0, io.EOF
1110+ }
1111+ if int64(len(b)) > r.bytesLeft {
1112+ b = b[:r.bytesLeft]
1113+ }
1114+ n, err := r.r.Read(b)
1115+ r.bytesLeft -= int64(n)
1116+ if err == io.EOF {
1117+ err = io.ErrUnexpectedEOF
1118+ } else if r.bytesLeft == 0 && err == nil {
1119+ err = io.EOF
1120+ }
1121+ return n, err
1122+}
1123+
1124+// BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API.
1125+type BackupStreamWriter struct {
1126+ w io.Writer
1127+ bytesLeft int64
1128+}
1129+
1130+// NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer.
1131+func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter {
1132+ return &BackupStreamWriter{w, 0}
1133+}
1134+
1135+// WriteHeader writes the next backup stream header and prepares for calls to Write().
1136+func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error {
1137+ if w.bytesLeft != 0 {
1138+ return fmt.Errorf("missing %d bytes", w.bytesLeft)
1139+ }
1140+ name := utf16.Encode([]rune(hdr.Name))
1141+ wsi := win32StreamID{
1142+ StreamID: hdr.Id,
1143+ Attributes: hdr.Attributes,
1144+ Size: uint64(hdr.Size),
1145+ NameSize: uint32(len(name) * 2),
1146+ }
1147+ if hdr.Id == BackupSparseBlock {
1148+ // Include space for the int64 block offset
1149+ wsi.Size += 8
1150+ }
1151+ if err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil {
1152+ return err
1153+ }
1154+ if len(name) != 0 {
1155+ if err := binary.Write(w.w, binary.LittleEndian, name); err != nil {
1156+ return err
1157+ }
1158+ }
1159+ if hdr.Id == BackupSparseBlock {
1160+ if err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil {
1161+ return err
1162+ }
1163+ }
1164+ w.bytesLeft = hdr.Size
1165+ return nil
1166+}
1167+
1168+// Write writes to the current backup stream.
1169+func (w *BackupStreamWriter) Write(b []byte) (int, error) {
1170+ if w.bytesLeft < int64(len(b)) {
1171+ return 0, fmt.Errorf("too many bytes by %d", int64(len(b))-w.bytesLeft)
1172+ }
1173+ n, err := w.w.Write(b)
1174+ w.bytesLeft -= int64(n)
1175+ return n, err
1176+}
1177+
1178+// BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API.
1179+type BackupFileReader struct {
1180+ f *os.File
1181+ includeSecurity bool
1182+ ctx uintptr
1183+}
1184+
1185+// NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true,
1186+// Read will attempt to read the security descriptor of the file.
1187+func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader {
1188+ r := &BackupFileReader{f, includeSecurity, 0}
1189+ return r
1190+}
1191+
1192+// Read reads a backup stream from the file by calling the Win32 API BackupRead().
1193+func (r *BackupFileReader) Read(b []byte) (int, error) {
1194+ var bytesRead uint32
1195+ err := backupRead(syscall.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx)
1196+ if err != nil {
1197+ return 0, &os.PathError{Op: "BackupRead", Path: r.f.Name(), Err: err}
1198+ }
1199+ runtime.KeepAlive(r.f)
1200+ if bytesRead == 0 {
1201+ return 0, io.EOF
1202+ }
1203+ return int(bytesRead), nil
1204+}
1205+
1206+// Close frees Win32 resources associated with the BackupFileReader. It does not close
1207+// the underlying file.
1208+func (r *BackupFileReader) Close() error {
1209+ if r.ctx != 0 {
1210+ _ = backupRead(syscall.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx)
1211+ runtime.KeepAlive(r.f)
1212+ r.ctx = 0
1213+ }
1214+ return nil
1215+}
1216+
1217+// BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API.
1218+type BackupFileWriter struct {
1219+ f *os.File
1220+ includeSecurity bool
1221+ ctx uintptr
1222+}
1223+
1224+// NewBackupFileWriter returns a new BackupFileWriter from a file handle. If includeSecurity is true,
1225+// Write() will attempt to restore the security descriptor from the stream.
1226+func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter {
1227+ w := &BackupFileWriter{f, includeSecurity, 0}
1228+ return w
1229+}
1230+
1231+// Write restores a portion of the file using the provided backup stream.
1232+func (w *BackupFileWriter) Write(b []byte) (int, error) {
1233+ var bytesWritten uint32
1234+ err := backupWrite(syscall.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx)
1235+ if err != nil {
1236+ return 0, &os.PathError{Op: "BackupWrite", Path: w.f.Name(), Err: err}
1237+ }
1238+ runtime.KeepAlive(w.f)
1239+ if int(bytesWritten) != len(b) {
1240+ return int(bytesWritten), errors.New("not all bytes could be written")
1241+ }
1242+ return len(b), nil
1243+}
1244+
1245+// Close frees Win32 resources associated with the BackupFileWriter. It does not
1246+// close the underlying file.
1247+func (w *BackupFileWriter) Close() error {
1248+ if w.ctx != 0 {
1249+ _ = backupWrite(syscall.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx)
1250+ runtime.KeepAlive(w.f)
1251+ w.ctx = 0
1252+ }
1253+ return nil
1254+}
1255+
1256+// OpenForBackup opens a file or directory, potentially skipping access checks if the backup
1257+// or restore privileges have been acquired.
1258+//
1259+// If the file opened was a directory, it cannot be used with Readdir().
1260+func OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) {
1261+ winPath, err := syscall.UTF16FromString(path)
1262+ if err != nil {
1263+ return nil, err
1264+ }
1265+ h, err := syscall.CreateFile(&winPath[0],
1266+ access,
1267+ share,
1268+ nil,
1269+ createmode,
1270+ syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OPEN_REPARSE_POINT,
1271+ 0)
1272+ if err != nil {
1273+ err = &os.PathError{Op: "open", Path: path, Err: err}
1274+ return nil, err
1275+ }
1276+ return os.NewFile(uintptr(h), path), nil
1277+}
1278diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/doc.go b/debian/extra/vendor/github.com/Microsoft/go-winio/doc.go
1279new file mode 100644
1280index 0000000..1f5bfe2
1281--- /dev/null
1282+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/doc.go
1283@@ -0,0 +1,22 @@
1284+// This package provides utilities for efficiently performing Win32 IO operations in Go.
1285+// Currently, this package is provides support for genreal IO and management of
1286+// - named pipes
1287+// - files
1288+// - [Hyper-V sockets]
1289+//
1290+// This code is similar to Go's [net] package, and uses IO completion ports to avoid
1291+// blocking IO on system threads, allowing Go to reuse the thread to schedule other goroutines.
1292+//
1293+// This limits support to Windows Vista and newer operating systems.
1294+//
1295+// Additionally, this package provides support for:
1296+// - creating and managing GUIDs
1297+// - writing to [ETW]
1298+// - opening and manageing VHDs
1299+// - parsing [Windows Image files]
1300+// - auto-generating Win32 API code
1301+//
1302+// [Hyper-V sockets]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service
1303+// [ETW]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw-
1304+// [Windows Image files]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/work-with-windows-images
1305+package winio
1306diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/ea.go b/debian/extra/vendor/github.com/Microsoft/go-winio/ea.go
1307new file mode 100644
1308index 0000000..e104dbd
1309--- /dev/null
1310+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/ea.go
1311@@ -0,0 +1,137 @@
1312+package winio
1313+
1314+import (
1315+ "bytes"
1316+ "encoding/binary"
1317+ "errors"
1318+)
1319+
1320+type fileFullEaInformation struct {
1321+ NextEntryOffset uint32
1322+ Flags uint8
1323+ NameLength uint8
1324+ ValueLength uint16
1325+}
1326+
1327+var (
1328+ fileFullEaInformationSize = binary.Size(&fileFullEaInformation{})
1329+
1330+ errInvalidEaBuffer = errors.New("invalid extended attribute buffer")
1331+ errEaNameTooLarge = errors.New("extended attribute name too large")
1332+ errEaValueTooLarge = errors.New("extended attribute value too large")
1333+)
1334+
1335+// ExtendedAttribute represents a single Windows EA.
1336+type ExtendedAttribute struct {
1337+ Name string
1338+ Value []byte
1339+ Flags uint8
1340+}
1341+
1342+func parseEa(b []byte) (ea ExtendedAttribute, nb []byte, err error) {
1343+ var info fileFullEaInformation
1344+ err = binary.Read(bytes.NewReader(b), binary.LittleEndian, &info)
1345+ if err != nil {
1346+ err = errInvalidEaBuffer
1347+ return ea, nb, err
1348+ }
1349+
1350+ nameOffset := fileFullEaInformationSize
1351+ nameLen := int(info.NameLength)
1352+ valueOffset := nameOffset + int(info.NameLength) + 1
1353+ valueLen := int(info.ValueLength)
1354+ nextOffset := int(info.NextEntryOffset)
1355+ if valueLen+valueOffset > len(b) || nextOffset < 0 || nextOffset > len(b) {
1356+ err = errInvalidEaBuffer
1357+ return ea, nb, err
1358+ }
1359+
1360+ ea.Name = string(b[nameOffset : nameOffset+nameLen])
1361+ ea.Value = b[valueOffset : valueOffset+valueLen]
1362+ ea.Flags = info.Flags
1363+ if info.NextEntryOffset != 0 {
1364+ nb = b[info.NextEntryOffset:]
1365+ }
1366+ return ea, nb, err
1367+}
1368+
1369+// DecodeExtendedAttributes decodes a list of EAs from a FILE_FULL_EA_INFORMATION
1370+// buffer retrieved from BackupRead, ZwQueryEaFile, etc.
1371+func DecodeExtendedAttributes(b []byte) (eas []ExtendedAttribute, err error) {
1372+ for len(b) != 0 {
1373+ ea, nb, err := parseEa(b)
1374+ if err != nil {
1375+ return nil, err
1376+ }
1377+
1378+ eas = append(eas, ea)
1379+ b = nb
1380+ }
1381+ return eas, err
1382+}
1383+
1384+func writeEa(buf *bytes.Buffer, ea *ExtendedAttribute, last bool) error {
1385+ if int(uint8(len(ea.Name))) != len(ea.Name) {
1386+ return errEaNameTooLarge
1387+ }
1388+ if int(uint16(len(ea.Value))) != len(ea.Value) {
1389+ return errEaValueTooLarge
1390+ }
1391+ entrySize := uint32(fileFullEaInformationSize + len(ea.Name) + 1 + len(ea.Value))
1392+ withPadding := (entrySize + 3) &^ 3
1393+ nextOffset := uint32(0)
1394+ if !last {
1395+ nextOffset = withPadding
1396+ }
1397+ info := fileFullEaInformation{
1398+ NextEntryOffset: nextOffset,
1399+ Flags: ea.Flags,
1400+ NameLength: uint8(len(ea.Name)),
1401+ ValueLength: uint16(len(ea.Value)),
1402+ }
1403+
1404+ err := binary.Write(buf, binary.LittleEndian, &info)
1405+ if err != nil {
1406+ return err
1407+ }
1408+
1409+ _, err = buf.Write([]byte(ea.Name))
1410+ if err != nil {
1411+ return err
1412+ }
1413+
1414+ err = buf.WriteByte(0)
1415+ if err != nil {
1416+ return err
1417+ }
1418+
1419+ _, err = buf.Write(ea.Value)
1420+ if err != nil {
1421+ return err
1422+ }
1423+
1424+ _, err = buf.Write([]byte{0, 0, 0}[0 : withPadding-entrySize])
1425+ if err != nil {
1426+ return err
1427+ }
1428+
1429+ return nil
1430+}
1431+
1432+// EncodeExtendedAttributes encodes a list of EAs into a FILE_FULL_EA_INFORMATION
1433+// buffer for use with BackupWrite, ZwSetEaFile, etc.
1434+func EncodeExtendedAttributes(eas []ExtendedAttribute) ([]byte, error) {
1435+ var buf bytes.Buffer
1436+ for i := range eas {
1437+ last := false
1438+ if i == len(eas)-1 {
1439+ last = true
1440+ }
1441+
1442+ err := writeEa(&buf, &eas[i], last)
1443+ if err != nil {
1444+ return nil, err
1445+ }
1446+ }
1447+ return buf.Bytes(), nil
1448+}
1449diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/file.go b/debian/extra/vendor/github.com/Microsoft/go-winio/file.go
1450new file mode 100644
1451index 0000000..175a99d
1452--- /dev/null
1453+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/file.go
1454@@ -0,0 +1,331 @@
1455+//go:build windows
1456+// +build windows
1457+
1458+package winio
1459+
1460+import (
1461+ "errors"
1462+ "io"
1463+ "runtime"
1464+ "sync"
1465+ "sync/atomic"
1466+ "syscall"
1467+ "time"
1468+
1469+ "golang.org/x/sys/windows"
1470+)
1471+
1472+//sys cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) = CancelIoEx
1473+//sys createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) = CreateIoCompletionPort
1474+//sys getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus
1475+//sys setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes
1476+//sys wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
1477+
1478+type atomicBool int32
1479+
1480+func (b *atomicBool) isSet() bool { return atomic.LoadInt32((*int32)(b)) != 0 }
1481+func (b *atomicBool) setFalse() { atomic.StoreInt32((*int32)(b), 0) }
1482+func (b *atomicBool) setTrue() { atomic.StoreInt32((*int32)(b), 1) }
1483+
1484+//revive:disable-next-line:predeclared Keep "new" to maintain consistency with "atomic" pkg
1485+func (b *atomicBool) swap(new bool) bool {
1486+ var newInt int32
1487+ if new {
1488+ newInt = 1
1489+ }
1490+ return atomic.SwapInt32((*int32)(b), newInt) == 1
1491+}
1492+
1493+var (
1494+ ErrFileClosed = errors.New("file has already been closed")
1495+ ErrTimeout = &timeoutError{}
1496+)
1497+
1498+type timeoutError struct{}
1499+
1500+func (*timeoutError) Error() string { return "i/o timeout" }
1501+func (*timeoutError) Timeout() bool { return true }
1502+func (*timeoutError) Temporary() bool { return true }
1503+
1504+type timeoutChan chan struct{}
1505+
1506+var ioInitOnce sync.Once
1507+var ioCompletionPort syscall.Handle
1508+
1509+// ioResult contains the result of an asynchronous IO operation.
1510+type ioResult struct {
1511+ bytes uint32
1512+ err error
1513+}
1514+
1515+// ioOperation represents an outstanding asynchronous Win32 IO.
1516+type ioOperation struct {
1517+ o syscall.Overlapped
1518+ ch chan ioResult
1519+}
1520+
1521+func initIO() {
1522+ h, err := createIoCompletionPort(syscall.InvalidHandle, 0, 0, 0xffffffff)
1523+ if err != nil {
1524+ panic(err)
1525+ }
1526+ ioCompletionPort = h
1527+ go ioCompletionProcessor(h)
1528+}
1529+
1530+// win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall.
1531+// It takes ownership of this handle and will close it if it is garbage collected.
1532+type win32File struct {
1533+ handle syscall.Handle
1534+ wg sync.WaitGroup
1535+ wgLock sync.RWMutex
1536+ closing atomicBool
1537+ socket bool
1538+ readDeadline deadlineHandler
1539+ writeDeadline deadlineHandler
1540+}
1541+
1542+type deadlineHandler struct {
1543+ setLock sync.Mutex
1544+ channel timeoutChan
1545+ channelLock sync.RWMutex
1546+ timer *time.Timer
1547+ timedout atomicBool
1548+}
1549+
1550+// makeWin32File makes a new win32File from an existing file handle.
1551+func makeWin32File(h syscall.Handle) (*win32File, error) {
1552+ f := &win32File{handle: h}
1553+ ioInitOnce.Do(initIO)
1554+ _, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff)
1555+ if err != nil {
1556+ return nil, err
1557+ }
1558+ err = setFileCompletionNotificationModes(h, windows.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS|windows.FILE_SKIP_SET_EVENT_ON_HANDLE)
1559+ if err != nil {
1560+ return nil, err
1561+ }
1562+ f.readDeadline.channel = make(timeoutChan)
1563+ f.writeDeadline.channel = make(timeoutChan)
1564+ return f, nil
1565+}
1566+
1567+func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) {
1568+ // If we return the result of makeWin32File directly, it can result in an
1569+ // interface-wrapped nil, rather than a nil interface value.
1570+ f, err := makeWin32File(h)
1571+ if err != nil {
1572+ return nil, err
1573+ }
1574+ return f, nil
1575+}
1576+
1577+// closeHandle closes the resources associated with a Win32 handle.
1578+func (f *win32File) closeHandle() {
1579+ f.wgLock.Lock()
1580+ // Atomically set that we are closing, releasing the resources only once.
1581+ if !f.closing.swap(true) {
1582+ f.wgLock.Unlock()
1583+ // cancel all IO and wait for it to complete
1584+ _ = cancelIoEx(f.handle, nil)
1585+ f.wg.Wait()
1586+ // at this point, no new IO can start
1587+ syscall.Close(f.handle)
1588+ f.handle = 0
1589+ } else {
1590+ f.wgLock.Unlock()
1591+ }
1592+}
1593+
1594+// Close closes a win32File.
1595+func (f *win32File) Close() error {
1596+ f.closeHandle()
1597+ return nil
1598+}
1599+
1600+// IsClosed checks if the file has been closed.
1601+func (f *win32File) IsClosed() bool {
1602+ return f.closing.isSet()
1603+}
1604+
1605+// prepareIO prepares for a new IO operation.
1606+// The caller must call f.wg.Done() when the IO is finished, prior to Close() returning.
1607+func (f *win32File) prepareIO() (*ioOperation, error) {
1608+ f.wgLock.RLock()
1609+ if f.closing.isSet() {
1610+ f.wgLock.RUnlock()
1611+ return nil, ErrFileClosed
1612+ }
1613+ f.wg.Add(1)
1614+ f.wgLock.RUnlock()
1615+ c := &ioOperation{}
1616+ c.ch = make(chan ioResult)
1617+ return c, nil
1618+}
1619+
1620+// ioCompletionProcessor processes completed async IOs forever.
1621+func ioCompletionProcessor(h syscall.Handle) {
1622+ for {
1623+ var bytes uint32
1624+ var key uintptr
1625+ var op *ioOperation
1626+ err := getQueuedCompletionStatus(h, &bytes, &key, &op, syscall.INFINITE)
1627+ if op == nil {
1628+ panic(err)
1629+ }
1630+ op.ch <- ioResult{bytes, err}
1631+ }
1632+}
1633+
1634+// todo: helsaawy - create an asyncIO version that takes a context
1635+
1636+// asyncIO processes the return value from ReadFile or WriteFile, blocking until
1637+// the operation has actually completed.
1638+func (f *win32File) asyncIO(c *ioOperation, d *deadlineHandler, bytes uint32, err error) (int, error) {
1639+ if err != syscall.ERROR_IO_PENDING { //nolint:errorlint // err is Errno
1640+ return int(bytes), err
1641+ }
1642+
1643+ if f.closing.isSet() {
1644+ _ = cancelIoEx(f.handle, &c.o)
1645+ }
1646+
1647+ var timeout timeoutChan
1648+ if d != nil {
1649+ d.channelLock.Lock()
1650+ timeout = d.channel
1651+ d.channelLock.Unlock()
1652+ }
1653+
1654+ var r ioResult
1655+ select {
1656+ case r = <-c.ch:
1657+ err = r.err
1658+ if err == syscall.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno
1659+ if f.closing.isSet() {
1660+ err = ErrFileClosed
1661+ }
1662+ } else if err != nil && f.socket {
1663+ // err is from Win32. Query the overlapped structure to get the winsock error.
1664+ var bytes, flags uint32
1665+ err = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags)
1666+ }
1667+ case <-timeout:
1668+ _ = cancelIoEx(f.handle, &c.o)
1669+ r = <-c.ch
1670+ err = r.err
1671+ if err == syscall.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno
1672+ err = ErrTimeout
1673+ }
1674+ }
1675+
1676+ // runtime.KeepAlive is needed, as c is passed via native
1677+ // code to ioCompletionProcessor, c must remain alive
1678+ // until the channel read is complete.
1679+ // todo: (de)allocate *ioOperation via win32 heap functions, instead of needing to KeepAlive?
1680+ runtime.KeepAlive(c)
1681+ return int(r.bytes), err
1682+}
1683+
1684+// Read reads from a file handle.
1685+func (f *win32File) Read(b []byte) (int, error) {
1686+ c, err := f.prepareIO()
1687+ if err != nil {
1688+ return 0, err
1689+ }
1690+ defer f.wg.Done()
1691+
1692+ if f.readDeadline.timedout.isSet() {
1693+ return 0, ErrTimeout
1694+ }
1695+
1696+ var bytes uint32
1697+ err = syscall.ReadFile(f.handle, b, &bytes, &c.o)
1698+ n, err := f.asyncIO(c, &f.readDeadline, bytes, err)
1699+ runtime.KeepAlive(b)
1700+
1701+ // Handle EOF conditions.
1702+ if err == nil && n == 0 && len(b) != 0 {
1703+ return 0, io.EOF
1704+ } else if err == syscall.ERROR_BROKEN_PIPE { //nolint:errorlint // err is Errno
1705+ return 0, io.EOF
1706+ } else {
1707+ return n, err
1708+ }
1709+}
1710+
1711+// Write writes to a file handle.
1712+func (f *win32File) Write(b []byte) (int, error) {
1713+ c, err := f.prepareIO()
1714+ if err != nil {
1715+ return 0, err
1716+ }
1717+ defer f.wg.Done()
1718+
1719+ if f.writeDeadline.timedout.isSet() {
1720+ return 0, ErrTimeout
1721+ }
1722+
1723+ var bytes uint32
1724+ err = syscall.WriteFile(f.handle, b, &bytes, &c.o)
1725+ n, err := f.asyncIO(c, &f.writeDeadline, bytes, err)
1726+ runtime.KeepAlive(b)
1727+ return n, err
1728+}
1729+
1730+func (f *win32File) SetReadDeadline(deadline time.Time) error {
1731+ return f.readDeadline.set(deadline)
1732+}
1733+
1734+func (f *win32File) SetWriteDeadline(deadline time.Time) error {
1735+ return f.writeDeadline.set(deadline)
1736+}
1737+
1738+func (f *win32File) Flush() error {
1739+ return syscall.FlushFileBuffers(f.handle)
1740+}
1741+
1742+func (f *win32File) Fd() uintptr {
1743+ return uintptr(f.handle)
1744+}
1745+
1746+func (d *deadlineHandler) set(deadline time.Time) error {
1747+ d.setLock.Lock()
1748+ defer d.setLock.Unlock()
1749+
1750+ if d.timer != nil {
1751+ if !d.timer.Stop() {
1752+ <-d.channel
1753+ }
1754+ d.timer = nil
1755+ }
1756+ d.timedout.setFalse()
1757+
1758+ select {
1759+ case <-d.channel:
1760+ d.channelLock.Lock()
1761+ d.channel = make(chan struct{})
1762+ d.channelLock.Unlock()
1763+ default:
1764+ }
1765+
1766+ if deadline.IsZero() {
1767+ return nil
1768+ }
1769+
1770+ timeoutIO := func() {
1771+ d.timedout.setTrue()
1772+ close(d.channel)
1773+ }
1774+
1775+ now := time.Now()
1776+ duration := deadline.Sub(now)
1777+ if deadline.After(now) {
1778+ // Deadline is in the future, set a timer to wait
1779+ d.timer = time.AfterFunc(duration, timeoutIO)
1780+ } else {
1781+ // Deadline is in the past. Cancel all pending IO now.
1782+ timeoutIO()
1783+ }
1784+ return nil
1785+}
1786diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/fileinfo.go b/debian/extra/vendor/github.com/Microsoft/go-winio/fileinfo.go
1787new file mode 100644
1788index 0000000..702950e
1789--- /dev/null
1790+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/fileinfo.go
1791@@ -0,0 +1,92 @@
1792+//go:build windows
1793+// +build windows
1794+
1795+package winio
1796+
1797+import (
1798+ "os"
1799+ "runtime"
1800+ "unsafe"
1801+
1802+ "golang.org/x/sys/windows"
1803+)
1804+
1805+// FileBasicInfo contains file access time and file attributes information.
1806+type FileBasicInfo struct {
1807+ CreationTime, LastAccessTime, LastWriteTime, ChangeTime windows.Filetime
1808+ FileAttributes uint32
1809+ _ uint32 // padding
1810+}
1811+
1812+// GetFileBasicInfo retrieves times and attributes for a file.
1813+func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) {
1814+ bi := &FileBasicInfo{}
1815+ if err := windows.GetFileInformationByHandleEx(
1816+ windows.Handle(f.Fd()),
1817+ windows.FileBasicInfo,
1818+ (*byte)(unsafe.Pointer(bi)),
1819+ uint32(unsafe.Sizeof(*bi)),
1820+ ); err != nil {
1821+ return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
1822+ }
1823+ runtime.KeepAlive(f)
1824+ return bi, nil
1825+}
1826+
1827+// SetFileBasicInfo sets times and attributes for a file.
1828+func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error {
1829+ if err := windows.SetFileInformationByHandle(
1830+ windows.Handle(f.Fd()),
1831+ windows.FileBasicInfo,
1832+ (*byte)(unsafe.Pointer(bi)),
1833+ uint32(unsafe.Sizeof(*bi)),
1834+ ); err != nil {
1835+ return &os.PathError{Op: "SetFileInformationByHandle", Path: f.Name(), Err: err}
1836+ }
1837+ runtime.KeepAlive(f)
1838+ return nil
1839+}
1840+
1841+// FileStandardInfo contains extended information for the file.
1842+// FILE_STANDARD_INFO in WinBase.h
1843+// https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_standard_info
1844+type FileStandardInfo struct {
1845+ AllocationSize, EndOfFile int64
1846+ NumberOfLinks uint32
1847+ DeletePending, Directory bool
1848+}
1849+
1850+// GetFileStandardInfo retrieves ended information for the file.
1851+func GetFileStandardInfo(f *os.File) (*FileStandardInfo, error) {
1852+ si := &FileStandardInfo{}
1853+ if err := windows.GetFileInformationByHandleEx(windows.Handle(f.Fd()),
1854+ windows.FileStandardInfo,
1855+ (*byte)(unsafe.Pointer(si)),
1856+ uint32(unsafe.Sizeof(*si))); err != nil {
1857+ return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
1858+ }
1859+ runtime.KeepAlive(f)
1860+ return si, nil
1861+}
1862+
1863+// FileIDInfo contains the volume serial number and file ID for a file. This pair should be
1864+// unique on a system.
1865+type FileIDInfo struct {
1866+ VolumeSerialNumber uint64
1867+ FileID [16]byte
1868+}
1869+
1870+// GetFileID retrieves the unique (volume, file ID) pair for a file.
1871+func GetFileID(f *os.File) (*FileIDInfo, error) {
1872+ fileID := &FileIDInfo{}
1873+ if err := windows.GetFileInformationByHandleEx(
1874+ windows.Handle(f.Fd()),
1875+ windows.FileIdInfo,
1876+ (*byte)(unsafe.Pointer(fileID)),
1877+ uint32(unsafe.Sizeof(*fileID)),
1878+ ); err != nil {
1879+ return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
1880+ }
1881+ runtime.KeepAlive(f)
1882+ return fileID, nil
1883+}
1884diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/hvsock.go b/debian/extra/vendor/github.com/Microsoft/go-winio/hvsock.go
1885new file mode 100644
1886index 0000000..c881916
1887--- /dev/null
1888+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/hvsock.go
1889@@ -0,0 +1,575 @@
1890+//go:build windows
1891+// +build windows
1892+
1893+package winio
1894+
1895+import (
1896+ "context"
1897+ "errors"
1898+ "fmt"
1899+ "io"
1900+ "net"
1901+ "os"
1902+ "syscall"
1903+ "time"
1904+ "unsafe"
1905+
1906+ "golang.org/x/sys/windows"
1907+
1908+ "github.com/Microsoft/go-winio/internal/socket"
1909+ "github.com/Microsoft/go-winio/pkg/guid"
1910+)
1911+
1912+const afHVSock = 34 // AF_HYPERV
1913+
1914+// Well known Service and VM IDs
1915+// https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards
1916+
1917+// HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions.
1918+func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000
1919+ return guid.GUID{}
1920+}
1921+
1922+// HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions.
1923+func HvsockGUIDBroadcast() guid.GUID { // ffffffff-ffff-ffff-ffff-ffffffffffff
1924+ return guid.GUID{
1925+ Data1: 0xffffffff,
1926+ Data2: 0xffff,
1927+ Data3: 0xffff,
1928+ Data4: [8]uint8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
1929+ }
1930+}
1931+
1932+// HvsockGUIDLoopback is the Loopback VmId for accepting connections to the same partition as the connector.
1933+func HvsockGUIDLoopback() guid.GUID { // e0e16197-dd56-4a10-9195-5ee7a155a838
1934+ return guid.GUID{
1935+ Data1: 0xe0e16197,
1936+ Data2: 0xdd56,
1937+ Data3: 0x4a10,
1938+ Data4: [8]uint8{0x91, 0x95, 0x5e, 0xe7, 0xa1, 0x55, 0xa8, 0x38},
1939+ }
1940+}
1941+
1942+// HvsockGUIDSiloHost is the address of a silo's host partition:
1943+// - The silo host of a hosted silo is the utility VM.
1944+// - The silo host of a silo on a physical host is the physical host.
1945+func HvsockGUIDSiloHost() guid.GUID { // 36bd0c5c-7276-4223-88ba-7d03b654c568
1946+ return guid.GUID{
1947+ Data1: 0x36bd0c5c,
1948+ Data2: 0x7276,
1949+ Data3: 0x4223,
1950+ Data4: [8]byte{0x88, 0xba, 0x7d, 0x03, 0xb6, 0x54, 0xc5, 0x68},
1951+ }
1952+}
1953+
1954+// HvsockGUIDChildren is the wildcard VmId for accepting connections from the connector's child partitions.
1955+func HvsockGUIDChildren() guid.GUID { // 90db8b89-0d35-4f79-8ce9-49ea0ac8b7cd
1956+ return guid.GUID{
1957+ Data1: 0x90db8b89,
1958+ Data2: 0xd35,
1959+ Data3: 0x4f79,
1960+ Data4: [8]uint8{0x8c, 0xe9, 0x49, 0xea, 0xa, 0xc8, 0xb7, 0xcd},
1961+ }
1962+}
1963+
1964+// HvsockGUIDParent is the wildcard VmId for accepting connections from the connector's parent partition.
1965+// Listening on this VmId accepts connection from:
1966+// - Inside silos: silo host partition.
1967+// - Inside hosted silo: host of the VM.
1968+// - Inside VM: VM host.
1969+// - Physical host: Not supported.
1970+func HvsockGUIDParent() guid.GUID { // a42e7cda-d03f-480c-9cc2-a4de20abb878
1971+ return guid.GUID{
1972+ Data1: 0xa42e7cda,
1973+ Data2: 0xd03f,
1974+ Data3: 0x480c,
1975+ Data4: [8]uint8{0x9c, 0xc2, 0xa4, 0xde, 0x20, 0xab, 0xb8, 0x78},
1976+ }
1977+}
1978+
1979+// hvsockVsockServiceTemplate is the Service GUID used for the VSOCK protocol.
1980+func hvsockVsockServiceTemplate() guid.GUID { // 00000000-facb-11e6-bd58-64006a7986d3
1981+ return guid.GUID{
1982+ Data2: 0xfacb,
1983+ Data3: 0x11e6,
1984+ Data4: [8]uint8{0xbd, 0x58, 0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3},
1985+ }
1986+}
1987+
1988+// An HvsockAddr is an address for a AF_HYPERV socket.
1989+type HvsockAddr struct {
1990+ VMID guid.GUID
1991+ ServiceID guid.GUID
1992+}
1993+
1994+type rawHvsockAddr struct {
1995+ Family uint16
1996+ _ uint16
1997+ VMID guid.GUID
1998+ ServiceID guid.GUID
1999+}
2000+
2001+var _ socket.RawSockaddr = &rawHvsockAddr{}
2002+
2003+// Network returns the address's network name, "hvsock".
2004+func (*HvsockAddr) Network() string {
2005+ return "hvsock"
2006+}
2007+
2008+func (addr *HvsockAddr) String() string {
2009+ return fmt.Sprintf("%s:%s", &addr.VMID, &addr.ServiceID)
2010+}
2011+
2012+// VsockServiceID returns an hvsock service ID corresponding to the specified AF_VSOCK port.
2013+func VsockServiceID(port uint32) guid.GUID {
2014+ g := hvsockVsockServiceTemplate() // make a copy
2015+ g.Data1 = port
2016+ return g
2017+}
2018+
2019+func (addr *HvsockAddr) raw() rawHvsockAddr {
2020+ return rawHvsockAddr{
2021+ Family: afHVSock,
2022+ VMID: addr.VMID,
2023+ ServiceID: addr.ServiceID,
2024+ }
2025+}
2026+
2027+func (addr *HvsockAddr) fromRaw(raw *rawHvsockAddr) {
2028+ addr.VMID = raw.VMID
2029+ addr.ServiceID = raw.ServiceID
2030+}
2031+
2032+// Sockaddr returns a pointer to and the size of this struct.
2033+//
2034+// Implements the [socket.RawSockaddr] interface, and allows use in
2035+// [socket.Bind] and [socket.ConnectEx].
2036+func (r *rawHvsockAddr) Sockaddr() (unsafe.Pointer, int32, error) {
2037+ return unsafe.Pointer(r), int32(unsafe.Sizeof(rawHvsockAddr{})), nil
2038+}
2039+
2040+// Sockaddr interface allows use with `sockets.Bind()` and `.ConnectEx()`.
2041+func (r *rawHvsockAddr) FromBytes(b []byte) error {
2042+ n := int(unsafe.Sizeof(rawHvsockAddr{}))
2043+
2044+ if len(b) < n {
2045+ return fmt.Errorf("got %d, want %d: %w", len(b), n, socket.ErrBufferSize)
2046+ }
2047+
2048+ copy(unsafe.Slice((*byte)(unsafe.Pointer(r)), n), b[:n])
2049+ if r.Family != afHVSock {
2050+ return fmt.Errorf("got %d, want %d: %w", r.Family, afHVSock, socket.ErrAddrFamily)
2051+ }
2052+
2053+ return nil
2054+}
2055+
2056+// HvsockListener is a socket listener for the AF_HYPERV address family.
2057+type HvsockListener struct {
2058+ sock *win32File
2059+ addr HvsockAddr
2060+}
2061+
2062+var _ net.Listener = &HvsockListener{}
2063+
2064+// HvsockConn is a connected socket of the AF_HYPERV address family.
2065+type HvsockConn struct {
2066+ sock *win32File
2067+ local, remote HvsockAddr
2068+}
2069+
2070+var _ net.Conn = &HvsockConn{}
2071+
2072+func newHVSocket() (*win32File, error) {
2073+ fd, err := syscall.Socket(afHVSock, syscall.SOCK_STREAM, 1)
2074+ if err != nil {
2075+ return nil, os.NewSyscallError("socket", err)
2076+ }
2077+ f, err := makeWin32File(fd)
2078+ if err != nil {
2079+ syscall.Close(fd)
2080+ return nil, err
2081+ }
2082+ f.socket = true
2083+ return f, nil
2084+}
2085+
2086+// ListenHvsock listens for connections on the specified hvsock address.
2087+func ListenHvsock(addr *HvsockAddr) (_ *HvsockListener, err error) {
2088+ l := &HvsockListener{addr: *addr}
2089+ sock, err := newHVSocket()
2090+ if err != nil {
2091+ return nil, l.opErr("listen", err)
2092+ }
2093+ sa := addr.raw()
2094+ err = socket.Bind(windows.Handle(sock.handle), &sa)
2095+ if err != nil {
2096+ return nil, l.opErr("listen", os.NewSyscallError("socket", err))
2097+ }
2098+ err = syscall.Listen(sock.handle, 16)
2099+ if err != nil {
2100+ return nil, l.opErr("listen", os.NewSyscallError("listen", err))
2101+ }
2102+ return &HvsockListener{sock: sock, addr: *addr}, nil
2103+}
2104+
2105+func (l *HvsockListener) opErr(op string, err error) error {
2106+ return &net.OpError{Op: op, Net: "hvsock", Addr: &l.addr, Err: err}
2107+}
2108+
2109+// Addr returns the listener's network address.
2110+func (l *HvsockListener) Addr() net.Addr {
2111+ return &l.addr
2112+}
2113+
2114+// Accept waits for the next connection and returns it.
2115+func (l *HvsockListener) Accept() (_ net.Conn, err error) {
2116+ sock, err := newHVSocket()
2117+ if err != nil {
2118+ return nil, l.opErr("accept", err)
2119+ }
2120+ defer func() {
2121+ if sock != nil {
2122+ sock.Close()
2123+ }
2124+ }()
2125+ c, err := l.sock.prepareIO()
2126+ if err != nil {
2127+ return nil, l.opErr("accept", err)
2128+ }
2129+ defer l.sock.wg.Done()
2130+
2131+ // AcceptEx, per documentation, requires an extra 16 bytes per address.
2132+ //
2133+ // https://docs.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
2134+ const addrlen = uint32(16 + unsafe.Sizeof(rawHvsockAddr{}))
2135+ var addrbuf [addrlen * 2]byte
2136+
2137+ var bytes uint32
2138+ err = syscall.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /* rxdatalen */, addrlen, addrlen, &bytes, &c.o)
2139+ if _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil {
2140+ return nil, l.opErr("accept", os.NewSyscallError("acceptex", err))
2141+ }
2142+
2143+ conn := &HvsockConn{
2144+ sock: sock,
2145+ }
2146+ // The local address returned in the AcceptEx buffer is the same as the Listener socket's
2147+ // address. However, the service GUID reported by GetSockName is different from the Listeners
2148+ // socket, and is sometimes the same as the local address of the socket that dialed the
2149+ // address, with the service GUID.Data1 incremented, but othertimes is different.
2150+ // todo: does the local address matter? is the listener's address or the actual address appropriate?
2151+ conn.local.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[0])))
2152+ conn.remote.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[addrlen])))
2153+
2154+ // initialize the accepted socket and update its properties with those of the listening socket
2155+ if err = windows.Setsockopt(windows.Handle(sock.handle),
2156+ windows.SOL_SOCKET, windows.SO_UPDATE_ACCEPT_CONTEXT,
2157+ (*byte)(unsafe.Pointer(&l.sock.handle)), int32(unsafe.Sizeof(l.sock.handle))); err != nil {
2158+ return nil, conn.opErr("accept", os.NewSyscallError("setsockopt", err))
2159+ }
2160+
2161+ sock = nil
2162+ return conn, nil
2163+}
2164+
2165+// Close closes the listener, causing any pending Accept calls to fail.
2166+func (l *HvsockListener) Close() error {
2167+ return l.sock.Close()
2168+}
2169+
2170+// HvsockDialer configures and dials a Hyper-V Socket (ie, [HvsockConn]).
2171+type HvsockDialer struct {
2172+ // Deadline is the time the Dial operation must connect before erroring.
2173+ Deadline time.Time
2174+
2175+ // Retries is the number of additional connects to try if the connection times out, is refused,
2176+ // or the host is unreachable
2177+ Retries uint
2178+
2179+ // RetryWait is the time to wait after a connection error to retry
2180+ RetryWait time.Duration
2181+
2182+ rt *time.Timer // redial wait timer
2183+}
2184+
2185+// Dial the Hyper-V socket at addr.
2186+//
2187+// See [HvsockDialer.Dial] for more information.
2188+func Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {
2189+ return (&HvsockDialer{}).Dial(ctx, addr)
2190+}
2191+
2192+// Dial attempts to connect to the Hyper-V socket at addr, and returns a connection if successful.
2193+// Will attempt (HvsockDialer).Retries if dialing fails, waiting (HvsockDialer).RetryWait between
2194+// retries.
2195+//
2196+// Dialing can be cancelled either by providing (HvsockDialer).Deadline, or cancelling ctx.
2197+func (d *HvsockDialer) Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {
2198+ op := "dial"
2199+ // create the conn early to use opErr()
2200+ conn = &HvsockConn{
2201+ remote: *addr,
2202+ }
2203+
2204+ if !d.Deadline.IsZero() {
2205+ var cancel context.CancelFunc
2206+ ctx, cancel = context.WithDeadline(ctx, d.Deadline)
2207+ defer cancel()
2208+ }
2209+
2210+ // preemptive timeout/cancellation check
2211+ if err = ctx.Err(); err != nil {
2212+ return nil, conn.opErr(op, err)
2213+ }
2214+
2215+ sock, err := newHVSocket()
2216+ if err != nil {
2217+ return nil, conn.opErr(op, err)
2218+ }
2219+ defer func() {
2220+ if sock != nil {
2221+ sock.Close()
2222+ }
2223+ }()
2224+
2225+ sa := addr.raw()
2226+ err = socket.Bind(windows.Handle(sock.handle), &sa)
2227+ if err != nil {
2228+ return nil, conn.opErr(op, os.NewSyscallError("bind", err))
2229+ }
2230+
2231+ c, err := sock.prepareIO()
2232+ if err != nil {
2233+ return nil, conn.opErr(op, err)
2234+ }
2235+ defer sock.wg.Done()
2236+ var bytes uint32
2237+ for i := uint(0); i <= d.Retries; i++ {
2238+ err = socket.ConnectEx(
2239+ windows.Handle(sock.handle),
2240+ &sa,
2241+ nil, // sendBuf
2242+ 0, // sendDataLen
2243+ &bytes,
2244+ (*windows.Overlapped)(unsafe.Pointer(&c.o)))
2245+ _, err = sock.asyncIO(c, nil, bytes, err)
2246+ if i < d.Retries && canRedial(err) {
2247+ if err = d.redialWait(ctx); err == nil {
2248+ continue
2249+ }
2250+ }
2251+ break
2252+ }
2253+ if err != nil {
2254+ return nil, conn.opErr(op, os.NewSyscallError("connectex", err))
2255+ }
2256+
2257+ // update the connection properties, so shutdown can be used
2258+ if err = windows.Setsockopt(
2259+ windows.Handle(sock.handle),
2260+ windows.SOL_SOCKET,
2261+ windows.SO_UPDATE_CONNECT_CONTEXT,
2262+ nil, // optvalue
2263+ 0, // optlen
2264+ ); err != nil {
2265+ return nil, conn.opErr(op, os.NewSyscallError("setsockopt", err))
2266+ }
2267+
2268+ // get the local name
2269+ var sal rawHvsockAddr
2270+ err = socket.GetSockName(windows.Handle(sock.handle), &sal)
2271+ if err != nil {
2272+ return nil, conn.opErr(op, os.NewSyscallError("getsockname", err))
2273+ }
2274+ conn.local.fromRaw(&sal)
2275+
2276+ // one last check for timeout, since asyncIO doesn't check the context
2277+ if err = ctx.Err(); err != nil {
2278+ return nil, conn.opErr(op, err)
2279+ }
2280+
2281+ conn.sock = sock
2282+ sock = nil
2283+
2284+ return conn, nil
2285+}
2286+
2287+// redialWait waits before attempting to redial, resetting the timer as appropriate.
2288+func (d *HvsockDialer) redialWait(ctx context.Context) (err error) {
2289+ if d.RetryWait == 0 {
2290+ return nil
2291+ }
2292+
2293+ if d.rt == nil {
2294+ d.rt = time.NewTimer(d.RetryWait)
2295+ } else {
2296+ // should already be stopped and drained
2297+ d.rt.Reset(d.RetryWait)
2298+ }
2299+
2300+ select {
2301+ case <-ctx.Done():
2302+ case <-d.rt.C:
2303+ return nil
2304+ }
2305+
2306+ // stop and drain the timer
2307+ if !d.rt.Stop() {
2308+ <-d.rt.C
2309+ }
2310+ return ctx.Err()
2311+}
2312+
2313+// assumes error is a plain, unwrapped syscall.Errno provided by direct syscall.
2314+func canRedial(err error) bool {
2315+ //nolint:errorlint // guaranteed to be an Errno
2316+ switch err {
2317+ case windows.WSAECONNREFUSED, windows.WSAENETUNREACH, windows.WSAETIMEDOUT,
2318+ windows.ERROR_CONNECTION_REFUSED, windows.ERROR_CONNECTION_UNAVAIL:
2319+ return true
2320+ default:
2321+ return false
2322+ }
2323+}
2324+
2325+func (conn *HvsockConn) opErr(op string, err error) error {
2326+ // translate from "file closed" to "socket closed"
2327+ if errors.Is(err, ErrFileClosed) {
2328+ err = socket.ErrSocketClosed
2329+ }
2330+ return &net.OpError{Op: op, Net: "hvsock", Source: &conn.local, Addr: &conn.remote, Err: err}
2331+}
2332+
2333+func (conn *HvsockConn) Read(b []byte) (int, error) {
2334+ c, err := conn.sock.prepareIO()
2335+ if err != nil {
2336+ return 0, conn.opErr("read", err)
2337+ }
2338+ defer conn.sock.wg.Done()
2339+ buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))}
2340+ var flags, bytes uint32
2341+ err = syscall.WSARecv(conn.sock.handle, &buf, 1, &bytes, &flags, &c.o, nil)
2342+ n, err := conn.sock.asyncIO(c, &conn.sock.readDeadline, bytes, err)
2343+ if err != nil {
2344+ var eno windows.Errno
2345+ if errors.As(err, &eno) {
2346+ err = os.NewSyscallError("wsarecv", eno)
2347+ }
2348+ return 0, conn.opErr("read", err)
2349+ } else if n == 0 {
2350+ err = io.EOF
2351+ }
2352+ return n, err
2353+}
2354+
2355+func (conn *HvsockConn) Write(b []byte) (int, error) {
2356+ t := 0
2357+ for len(b) != 0 {
2358+ n, err := conn.write(b)
2359+ if err != nil {
2360+ return t + n, err
2361+ }
2362+ t += n
2363+ b = b[n:]
2364+ }
2365+ return t, nil
2366+}
2367+
2368+func (conn *HvsockConn) write(b []byte) (int, error) {
2369+ c, err := conn.sock.prepareIO()
2370+ if err != nil {
2371+ return 0, conn.opErr("write", err)
2372+ }
2373+ defer conn.sock.wg.Done()
2374+ buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))}
2375+ var bytes uint32
2376+ err = syscall.WSASend(conn.sock.handle, &buf, 1, &bytes, 0, &c.o, nil)
2377+ n, err := conn.sock.asyncIO(c, &conn.sock.writeDeadline, bytes, err)
2378+ if err != nil {
2379+ var eno windows.Errno
2380+ if errors.As(err, &eno) {
2381+ err = os.NewSyscallError("wsasend", eno)
2382+ }
2383+ return 0, conn.opErr("write", err)
2384+ }
2385+ return n, err
2386+}
2387+
2388+// Close closes the socket connection, failing any pending read or write calls.
2389+func (conn *HvsockConn) Close() error {
2390+ return conn.sock.Close()
2391+}
2392+
2393+func (conn *HvsockConn) IsClosed() bool {
2394+ return conn.sock.IsClosed()
2395+}
2396+
2397+// shutdown disables sending or receiving on a socket.
2398+func (conn *HvsockConn) shutdown(how int) error {
2399+ if conn.IsClosed() {
2400+ return socket.ErrSocketClosed
2401+ }
2402+
2403+ err := syscall.Shutdown(conn.sock.handle, how)
2404+ if err != nil {
2405+ // If the connection was closed, shutdowns fail with "not connected"
2406+ if errors.Is(err, windows.WSAENOTCONN) ||
2407+ errors.Is(err, windows.WSAESHUTDOWN) {
2408+ err = socket.ErrSocketClosed
2409+ }
2410+ return os.NewSyscallError("shutdown", err)
2411+ }
2412+ return nil
2413+}
2414+
2415+// CloseRead shuts down the read end of the socket, preventing future read operations.
2416+func (conn *HvsockConn) CloseRead() error {
2417+ err := conn.shutdown(syscall.SHUT_RD)
2418+ if err != nil {
2419+ return conn.opErr("closeread", err)
2420+ }
2421+ return nil
2422+}
2423+
2424+// CloseWrite shuts down the write end of the socket, preventing future write operations and
2425+// notifying the other endpoint that no more data will be written.
2426+func (conn *HvsockConn) CloseWrite() error {
2427+ err := conn.shutdown(syscall.SHUT_WR)
2428+ if err != nil {
2429+ return conn.opErr("closewrite", err)
2430+ }
2431+ return nil
2432+}
2433+
2434+// LocalAddr returns the local address of the connection.
2435+func (conn *HvsockConn) LocalAddr() net.Addr {
2436+ return &conn.local
2437+}
2438+
2439+// RemoteAddr returns the remote address of the connection.
2440+func (conn *HvsockConn) RemoteAddr() net.Addr {
2441+ return &conn.remote
2442+}
2443+
2444+// SetDeadline implements the net.Conn SetDeadline method.
2445+func (conn *HvsockConn) SetDeadline(t time.Time) error {
2446+ // todo: implement `SetDeadline` for `win32File`
2447+ if err := conn.SetReadDeadline(t); err != nil {
2448+ return fmt.Errorf("set read deadline: %w", err)
2449+ }
2450+ if err := conn.SetWriteDeadline(t); err != nil {
2451+ return fmt.Errorf("set write deadline: %w", err)
2452+ }
2453+ return nil
2454+}
2455+
2456+// SetReadDeadline implements the net.Conn SetReadDeadline method.
2457+func (conn *HvsockConn) SetReadDeadline(t time.Time) error {
2458+ return conn.sock.SetReadDeadline(t)
2459+}
2460+
2461+// SetWriteDeadline implements the net.Conn SetWriteDeadline method.
2462+func (conn *HvsockConn) SetWriteDeadline(t time.Time) error {
2463+ return conn.sock.SetWriteDeadline(t)
2464+}
2465diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go
2466new file mode 100644
2467index 0000000..1f65388
2468--- /dev/null
2469+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go
2470@@ -0,0 +1,2 @@
2471+// This package contains Win32 filesystem functionality.
2472+package fs
2473diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go
2474new file mode 100644
2475index 0000000..509b3ec
2476--- /dev/null
2477+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go
2478@@ -0,0 +1,202 @@
2479+//go:build windows
2480+
2481+package fs
2482+
2483+import (
2484+ "golang.org/x/sys/windows"
2485+
2486+ "github.com/Microsoft/go-winio/internal/stringbuffer"
2487+)
2488+
2489+//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go fs.go
2490+
2491+// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew
2492+//sys CreateFile(name string, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) [failretval==windows.InvalidHandle] = CreateFileW
2493+
2494+const NullHandle windows.Handle = 0
2495+
2496+// AccessMask defines standard, specific, and generic rights.
2497+//
2498+// Bitmask:
2499+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
2500+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
2501+// +---------------+---------------+-------------------------------+
2502+// |G|G|G|G|Resvd|A| StandardRights| SpecificRights |
2503+// |R|W|E|A| |S| | |
2504+// +-+-------------+---------------+-------------------------------+
2505+//
2506+// GR Generic Read
2507+// GW Generic Write
2508+// GE Generic Exectue
2509+// GA Generic All
2510+// Resvd Reserved
2511+// AS Access Security System
2512+//
2513+// https://learn.microsoft.com/en-us/windows/win32/secauthz/access-mask
2514+//
2515+// https://learn.microsoft.com/en-us/windows/win32/secauthz/generic-access-rights
2516+//
2517+// https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants
2518+type AccessMask = windows.ACCESS_MASK
2519+
2520+//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
2521+const (
2522+ // Not actually any.
2523+ //
2524+ // For CreateFile: "query certain metadata such as file, directory, or device attributes without accessing that file or device"
2525+ // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#parameters
2526+ FILE_ANY_ACCESS AccessMask = 0
2527+
2528+ // Specific Object Access
2529+ // from ntioapi.h
2530+
2531+ FILE_READ_DATA AccessMask = (0x0001) // file & pipe
2532+ FILE_LIST_DIRECTORY AccessMask = (0x0001) // directory
2533+
2534+ FILE_WRITE_DATA AccessMask = (0x0002) // file & pipe
2535+ FILE_ADD_FILE AccessMask = (0x0002) // directory
2536+
2537+ FILE_APPEND_DATA AccessMask = (0x0004) // file
2538+ FILE_ADD_SUBDIRECTORY AccessMask = (0x0004) // directory
2539+ FILE_CREATE_PIPE_INSTANCE AccessMask = (0x0004) // named pipe
2540+
2541+ FILE_READ_EA AccessMask = (0x0008) // file & directory
2542+ FILE_READ_PROPERTIES AccessMask = FILE_READ_EA
2543+
2544+ FILE_WRITE_EA AccessMask = (0x0010) // file & directory
2545+ FILE_WRITE_PROPERTIES AccessMask = FILE_WRITE_EA
2546+
2547+ FILE_EXECUTE AccessMask = (0x0020) // file
2548+ FILE_TRAVERSE AccessMask = (0x0020) // directory
2549+
2550+ FILE_DELETE_CHILD AccessMask = (0x0040) // directory
2551+
2552+ FILE_READ_ATTRIBUTES AccessMask = (0x0080) // all
2553+
2554+ FILE_WRITE_ATTRIBUTES AccessMask = (0x0100) // all
2555+
2556+ FILE_ALL_ACCESS AccessMask = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
2557+ FILE_GENERIC_READ AccessMask = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE)
2558+ FILE_GENERIC_WRITE AccessMask = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE)
2559+ FILE_GENERIC_EXECUTE AccessMask = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE)
2560+
2561+ SPECIFIC_RIGHTS_ALL AccessMask = 0x0000FFFF
2562+
2563+ // Standard Access
2564+ // from ntseapi.h
2565+
2566+ DELETE AccessMask = 0x0001_0000
2567+ READ_CONTROL AccessMask = 0x0002_0000
2568+ WRITE_DAC AccessMask = 0x0004_0000
2569+ WRITE_OWNER AccessMask = 0x0008_0000
2570+ SYNCHRONIZE AccessMask = 0x0010_0000
2571+
2572+ STANDARD_RIGHTS_REQUIRED AccessMask = 0x000F_0000
2573+
2574+ STANDARD_RIGHTS_READ AccessMask = READ_CONTROL
2575+ STANDARD_RIGHTS_WRITE AccessMask = READ_CONTROL
2576+ STANDARD_RIGHTS_EXECUTE AccessMask = READ_CONTROL
2577+
2578+ STANDARD_RIGHTS_ALL AccessMask = 0x001F_0000
2579+)
2580+
2581+type FileShareMode uint32
2582+
2583+//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
2584+const (
2585+ FILE_SHARE_NONE FileShareMode = 0x00
2586+ FILE_SHARE_READ FileShareMode = 0x01
2587+ FILE_SHARE_WRITE FileShareMode = 0x02
2588+ FILE_SHARE_DELETE FileShareMode = 0x04
2589+ FILE_SHARE_VALID_FLAGS FileShareMode = 0x07
2590+)
2591+
2592+type FileCreationDisposition uint32
2593+
2594+//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
2595+const (
2596+ // from winbase.h
2597+
2598+ CREATE_NEW FileCreationDisposition = 0x01
2599+ CREATE_ALWAYS FileCreationDisposition = 0x02
2600+ OPEN_EXISTING FileCreationDisposition = 0x03
2601+ OPEN_ALWAYS FileCreationDisposition = 0x04
2602+ TRUNCATE_EXISTING FileCreationDisposition = 0x05
2603+)
2604+
2605+// CreateFile and co. take flags or attributes together as one parameter.
2606+// Define alias until we can use generics to allow both
2607+
2608+// https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
2609+type FileFlagOrAttribute uint32
2610+
2611+//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
2612+const ( // from winnt.h
2613+ FILE_FLAG_WRITE_THROUGH FileFlagOrAttribute = 0x8000_0000
2614+ FILE_FLAG_OVERLAPPED FileFlagOrAttribute = 0x4000_0000
2615+ FILE_FLAG_NO_BUFFERING FileFlagOrAttribute = 0x2000_0000
2616+ FILE_FLAG_RANDOM_ACCESS FileFlagOrAttribute = 0x1000_0000
2617+ FILE_FLAG_SEQUENTIAL_SCAN FileFlagOrAttribute = 0x0800_0000
2618+ FILE_FLAG_DELETE_ON_CLOSE FileFlagOrAttribute = 0x0400_0000
2619+ FILE_FLAG_BACKUP_SEMANTICS FileFlagOrAttribute = 0x0200_0000
2620+ FILE_FLAG_POSIX_SEMANTICS FileFlagOrAttribute = 0x0100_0000
2621+ FILE_FLAG_OPEN_REPARSE_POINT FileFlagOrAttribute = 0x0020_0000
2622+ FILE_FLAG_OPEN_NO_RECALL FileFlagOrAttribute = 0x0010_0000
2623+ FILE_FLAG_FIRST_PIPE_INSTANCE FileFlagOrAttribute = 0x0008_0000
2624+)
2625+
2626+type FileSQSFlag = FileFlagOrAttribute
2627+
2628+//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
2629+const ( // from winbase.h
2630+ SECURITY_ANONYMOUS FileSQSFlag = FileSQSFlag(SecurityAnonymous << 16)
2631+ SECURITY_IDENTIFICATION FileSQSFlag = FileSQSFlag(SecurityIdentification << 16)
2632+ SECURITY_IMPERSONATION FileSQSFlag = FileSQSFlag(SecurityImpersonation << 16)
2633+ SECURITY_DELEGATION FileSQSFlag = FileSQSFlag(SecurityDelegation << 16)
2634+
2635+ SECURITY_SQOS_PRESENT FileSQSFlag = 0x00100000
2636+ SECURITY_VALID_SQOS_FLAGS FileSQSFlag = 0x001F0000
2637+)
2638+
2639+// GetFinalPathNameByHandle flags
2640+//
2641+// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew#parameters
2642+type GetFinalPathFlag uint32
2643+
2644+//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
2645+const (
2646+ GetFinalPathDefaultFlag GetFinalPathFlag = 0x0
2647+
2648+ FILE_NAME_NORMALIZED GetFinalPathFlag = 0x0
2649+ FILE_NAME_OPENED GetFinalPathFlag = 0x8
2650+
2651+ VOLUME_NAME_DOS GetFinalPathFlag = 0x0
2652+ VOLUME_NAME_GUID GetFinalPathFlag = 0x1
2653+ VOLUME_NAME_NT GetFinalPathFlag = 0x2
2654+ VOLUME_NAME_NONE GetFinalPathFlag = 0x4
2655+)
2656+
2657+// getFinalPathNameByHandle facilitates calling the Windows API GetFinalPathNameByHandle
2658+// with the given handle and flags. It transparently takes care of creating a buffer of the
2659+// correct size for the call.
2660+//
2661+// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew
2662+func GetFinalPathNameByHandle(h windows.Handle, flags GetFinalPathFlag) (string, error) {
2663+ b := stringbuffer.NewWString()
2664+ //TODO: can loop infinitely if Win32 keeps returning the same (or a larger) n?
2665+ for {
2666+ n, err := windows.GetFinalPathNameByHandle(h, b.Pointer(), b.Cap(), uint32(flags))
2667+ if err != nil {
2668+ return "", err
2669+ }
2670+ // If the buffer wasn't large enough, n will be the total size needed (including null terminator).
2671+ // Resize and try again.
2672+ if n > b.Cap() {
2673+ b.ResizeTo(n)
2674+ continue
2675+ }
2676+ // If the buffer is large enough, n will be the size not including the null terminator.
2677+ // Convert to a Go string and return.
2678+ return b.String(), nil
2679+ }
2680+}
2681diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/security.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/security.go
2682new file mode 100644
2683index 0000000..81760ac
2684--- /dev/null
2685+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/security.go
2686@@ -0,0 +1,12 @@
2687+package fs
2688+
2689+// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level
2690+type SecurityImpersonationLevel int32 // C default enums underlying type is `int`, which is Go `int32`
2691+
2692+// Impersonation levels
2693+const (
2694+ SecurityAnonymous SecurityImpersonationLevel = 0
2695+ SecurityIdentification SecurityImpersonationLevel = 1
2696+ SecurityImpersonation SecurityImpersonationLevel = 2
2697+ SecurityDelegation SecurityImpersonationLevel = 3
2698+)
2699diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go
2700new file mode 100644
2701index 0000000..e2f7bb2
2702--- /dev/null
2703+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go
2704@@ -0,0 +1,64 @@
2705+//go:build windows
2706+
2707+// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
2708+
2709+package fs
2710+
2711+import (
2712+ "syscall"
2713+ "unsafe"
2714+
2715+ "golang.org/x/sys/windows"
2716+)
2717+
2718+var _ unsafe.Pointer
2719+
2720+// Do the interface allocations only once for common
2721+// Errno values.
2722+const (
2723+ errnoERROR_IO_PENDING = 997
2724+)
2725+
2726+var (
2727+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
2728+ errERROR_EINVAL error = syscall.EINVAL
2729+)
2730+
2731+// errnoErr returns common boxed Errno values, to prevent
2732+// allocations at runtime.
2733+func errnoErr(e syscall.Errno) error {
2734+ switch e {
2735+ case 0:
2736+ return errERROR_EINVAL
2737+ case errnoERROR_IO_PENDING:
2738+ return errERROR_IO_PENDING
2739+ }
2740+ // TODO: add more here, after collecting data on the common
2741+ // error values see on Windows. (perhaps when running
2742+ // all.bat?)
2743+ return e
2744+}
2745+
2746+var (
2747+ modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
2748+
2749+ procCreateFileW = modkernel32.NewProc("CreateFileW")
2750+)
2751+
2752+func CreateFile(name string, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {
2753+ var _p0 *uint16
2754+ _p0, err = syscall.UTF16PtrFromString(name)
2755+ if err != nil {
2756+ return
2757+ }
2758+ return _CreateFile(_p0, access, mode, sa, createmode, attrs, templatefile)
2759+}
2760+
2761+func _CreateFile(name *uint16, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {
2762+ r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
2763+ handle = windows.Handle(r0)
2764+ if handle == windows.InvalidHandle {
2765+ err = errnoErr(e1)
2766+ }
2767+ return
2768+}
2769diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go
2770new file mode 100644
2771index 0000000..7e82f9a
2772--- /dev/null
2773+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go
2774@@ -0,0 +1,20 @@
2775+package socket
2776+
2777+import (
2778+ "unsafe"
2779+)
2780+
2781+// RawSockaddr allows structs to be used with [Bind] and [ConnectEx]. The
2782+// struct must meet the Win32 sockaddr requirements specified here:
2783+// https://docs.microsoft.com/en-us/windows/win32/winsock/sockaddr-2
2784+//
2785+// Specifically, the struct size must be least larger than an int16 (unsigned short)
2786+// for the address family.
2787+type RawSockaddr interface {
2788+ // Sockaddr returns a pointer to the RawSockaddr and its struct size, allowing
2789+ // for the RawSockaddr's data to be overwritten by syscalls (if necessary).
2790+ //
2791+ // It is the callers responsibility to validate that the values are valid; invalid
2792+ // pointers or size can cause a panic.
2793+ Sockaddr() (unsafe.Pointer, int32, error)
2794+}
2795diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go
2796new file mode 100644
2797index 0000000..aeb7b72
2798--- /dev/null
2799+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go
2800@@ -0,0 +1,179 @@
2801+//go:build windows
2802+
2803+package socket
2804+
2805+import (
2806+ "errors"
2807+ "fmt"
2808+ "net"
2809+ "sync"
2810+ "syscall"
2811+ "unsafe"
2812+
2813+ "github.com/Microsoft/go-winio/pkg/guid"
2814+ "golang.org/x/sys/windows"
2815+)
2816+
2817+//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go socket.go
2818+
2819+//sys getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getsockname
2820+//sys getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getpeername
2821+//sys bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socketError] = ws2_32.bind
2822+
2823+const socketError = uintptr(^uint32(0))
2824+
2825+var (
2826+ // todo(helsaawy): create custom error types to store the desired vs actual size and addr family?
2827+
2828+ ErrBufferSize = errors.New("buffer size")
2829+ ErrAddrFamily = errors.New("address family")
2830+ ErrInvalidPointer = errors.New("invalid pointer")
2831+ ErrSocketClosed = fmt.Errorf("socket closed: %w", net.ErrClosed)
2832+)
2833+
2834+// todo(helsaawy): replace these with generics, ie: GetSockName[S RawSockaddr](s windows.Handle) (S, error)
2835+
2836+// GetSockName writes the local address of socket s to the [RawSockaddr] rsa.
2837+// If rsa is not large enough, the [windows.WSAEFAULT] is returned.
2838+func GetSockName(s windows.Handle, rsa RawSockaddr) error {
2839+ ptr, l, err := rsa.Sockaddr()
2840+ if err != nil {
2841+ return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
2842+ }
2843+
2844+ // although getsockname returns WSAEFAULT if the buffer is too small, it does not set
2845+ // &l to the correct size, so--apart from doubling the buffer repeatedly--there is no remedy
2846+ return getsockname(s, ptr, &l)
2847+}
2848+
2849+// GetPeerName returns the remote address the socket is connected to.
2850+//
2851+// See [GetSockName] for more information.
2852+func GetPeerName(s windows.Handle, rsa RawSockaddr) error {
2853+ ptr, l, err := rsa.Sockaddr()
2854+ if err != nil {
2855+ return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
2856+ }
2857+
2858+ return getpeername(s, ptr, &l)
2859+}
2860+
2861+func Bind(s windows.Handle, rsa RawSockaddr) (err error) {
2862+ ptr, l, err := rsa.Sockaddr()
2863+ if err != nil {
2864+ return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
2865+ }
2866+
2867+ return bind(s, ptr, l)
2868+}
2869+
2870+// "golang.org/x/sys/windows".ConnectEx and .Bind only accept internal implementations of the
2871+// their sockaddr interface, so they cannot be used with HvsockAddr
2872+// Replicate functionality here from
2873+// https://cs.opensource.google/go/x/sys/+/master:windows/syscall_windows.go
2874+
2875+// The function pointers to `AcceptEx`, `ConnectEx` and `GetAcceptExSockaddrs` must be loaded at
2876+// runtime via a WSAIoctl call:
2877+// https://docs.microsoft.com/en-us/windows/win32/api/Mswsock/nc-mswsock-lpfn_connectex#remarks
2878+
2879+type runtimeFunc struct {
2880+ id guid.GUID
2881+ once sync.Once
2882+ addr uintptr
2883+ err error
2884+}
2885+
2886+func (f *runtimeFunc) Load() error {
2887+ f.once.Do(func() {
2888+ var s windows.Handle
2889+ s, f.err = windows.Socket(windows.AF_INET, windows.SOCK_STREAM, windows.IPPROTO_TCP)
2890+ if f.err != nil {
2891+ return
2892+ }
2893+ defer windows.CloseHandle(s) //nolint:errcheck
2894+
2895+ var n uint32
2896+ f.err = windows.WSAIoctl(s,
2897+ windows.SIO_GET_EXTENSION_FUNCTION_POINTER,
2898+ (*byte)(unsafe.Pointer(&f.id)),
2899+ uint32(unsafe.Sizeof(f.id)),
2900+ (*byte)(unsafe.Pointer(&f.addr)),
2901+ uint32(unsafe.Sizeof(f.addr)),
2902+ &n,
2903+ nil, // overlapped
2904+ 0, // completionRoutine
2905+ )
2906+ })
2907+ return f.err
2908+}
2909+
2910+var (
2911+ // todo: add `AcceptEx` and `GetAcceptExSockaddrs`
2912+ WSAID_CONNECTEX = guid.GUID{ //revive:disable-line:var-naming ALL_CAPS
2913+ Data1: 0x25a207b9,
2914+ Data2: 0xddf3,
2915+ Data3: 0x4660,
2916+ Data4: [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e},
2917+ }
2918+
2919+ connectExFunc = runtimeFunc{id: WSAID_CONNECTEX}
2920+)
2921+
2922+func ConnectEx(
2923+ fd windows.Handle,
2924+ rsa RawSockaddr,
2925+ sendBuf *byte,
2926+ sendDataLen uint32,
2927+ bytesSent *uint32,
2928+ overlapped *windows.Overlapped,
2929+) error {
2930+ if err := connectExFunc.Load(); err != nil {
2931+ return fmt.Errorf("failed to load ConnectEx function pointer: %w", err)
2932+ }
2933+ ptr, n, err := rsa.Sockaddr()
2934+ if err != nil {
2935+ return err
2936+ }
2937+ return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped)
2938+}
2939+
2940+// BOOL LpfnConnectex(
2941+// [in] SOCKET s,
2942+// [in] const sockaddr *name,
2943+// [in] int namelen,
2944+// [in, optional] PVOID lpSendBuffer,
2945+// [in] DWORD dwSendDataLength,
2946+// [out] LPDWORD lpdwBytesSent,
2947+// [in] LPOVERLAPPED lpOverlapped
2948+// )
2949+
2950+func connectEx(
2951+ s windows.Handle,
2952+ name unsafe.Pointer,
2953+ namelen int32,
2954+ sendBuf *byte,
2955+ sendDataLen uint32,
2956+ bytesSent *uint32,
2957+ overlapped *windows.Overlapped,
2958+) (err error) {
2959+ // todo: after upgrading to 1.18, switch from syscall.Syscall9 to syscall.SyscallN
2960+ r1, _, e1 := syscall.Syscall9(connectExFunc.addr,
2961+ 7,
2962+ uintptr(s),
2963+ uintptr(name),
2964+ uintptr(namelen),
2965+ uintptr(unsafe.Pointer(sendBuf)),
2966+ uintptr(sendDataLen),
2967+ uintptr(unsafe.Pointer(bytesSent)),
2968+ uintptr(unsafe.Pointer(overlapped)),
2969+ 0,
2970+ 0)
2971+ if r1 == 0 {
2972+ if e1 != 0 {
2973+ err = error(e1)
2974+ } else {
2975+ err = syscall.EINVAL
2976+ }
2977+ }
2978+ return err
2979+}
2980diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go
2981new file mode 100644
2982index 0000000..6d2e1a9
2983--- /dev/null
2984+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go
2985@@ -0,0 +1,72 @@
2986+//go:build windows
2987+
2988+// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
2989+
2990+package socket
2991+
2992+import (
2993+ "syscall"
2994+ "unsafe"
2995+
2996+ "golang.org/x/sys/windows"
2997+)
2998+
2999+var _ unsafe.Pointer
3000+
3001+// Do the interface allocations only once for common
3002+// Errno values.
3003+const (
3004+ errnoERROR_IO_PENDING = 997
3005+)
3006+
3007+var (
3008+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
3009+ errERROR_EINVAL error = syscall.EINVAL
3010+)
3011+
3012+// errnoErr returns common boxed Errno values, to prevent
3013+// allocations at runtime.
3014+func errnoErr(e syscall.Errno) error {
3015+ switch e {
3016+ case 0:
3017+ return errERROR_EINVAL
3018+ case errnoERROR_IO_PENDING:
3019+ return errERROR_IO_PENDING
3020+ }
3021+ // TODO: add more here, after collecting data on the common
3022+ // error values see on Windows. (perhaps when running
3023+ // all.bat?)
3024+ return e
3025+}
3026+
3027+var (
3028+ modws2_32 = windows.NewLazySystemDLL("ws2_32.dll")
3029+
3030+ procbind = modws2_32.NewProc("bind")
3031+ procgetpeername = modws2_32.NewProc("getpeername")
3032+ procgetsockname = modws2_32.NewProc("getsockname")
3033+)
3034+
3035+func bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) {
3036+ r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
3037+ if r1 == socketError {
3038+ err = errnoErr(e1)
3039+ }
3040+ return
3041+}
3042+
3043+func getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {
3044+ r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))
3045+ if r1 == socketError {
3046+ err = errnoErr(e1)
3047+ }
3048+ return
3049+}
3050+
3051+func getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {
3052+ r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))
3053+ if r1 == socketError {
3054+ err = errnoErr(e1)
3055+ }
3056+ return
3057+}
3058diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go
3059new file mode 100644
3060index 0000000..7ad5057
3061--- /dev/null
3062+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go
3063@@ -0,0 +1,132 @@
3064+package stringbuffer
3065+
3066+import (
3067+ "sync"
3068+ "unicode/utf16"
3069+)
3070+
3071+// TODO: worth exporting and using in mkwinsyscall?
3072+
3073+// Uint16BufferSize is the buffer size in the pool, chosen somewhat arbitrarily to accommodate
3074+// large path strings:
3075+// MAX_PATH (260) + size of volume GUID prefix (49) + null terminator = 310.
3076+const MinWStringCap = 310
3077+
3078+// use *[]uint16 since []uint16 creates an extra allocation where the slice header
3079+// is copied to heap and then referenced via pointer in the interface header that sync.Pool
3080+// stores.
3081+var pathPool = sync.Pool{ // if go1.18+ adds Pool[T], use that to store []uint16 directly
3082+ New: func() interface{} {
3083+ b := make([]uint16, MinWStringCap)
3084+ return &b
3085+ },
3086+}
3087+
3088+func newBuffer() []uint16 { return *(pathPool.Get().(*[]uint16)) }
3089+
3090+// freeBuffer copies the slice header data, and puts a pointer to that in the pool.
3091+// This avoids taking a pointer to the slice header in WString, which can be set to nil.
3092+func freeBuffer(b []uint16) { pathPool.Put(&b) }
3093+
3094+// WString is a wide string buffer ([]uint16) meant for storing UTF-16 encoded strings
3095+// for interacting with Win32 APIs.
3096+// Sizes are specified as uint32 and not int.
3097+//
3098+// It is not thread safe.
3099+type WString struct {
3100+ // type-def allows casting to []uint16 directly, use struct to prevent that and allow adding fields in the future.
3101+
3102+ // raw buffer
3103+ b []uint16
3104+}
3105+
3106+// NewWString returns a [WString] allocated from a shared pool with an
3107+// initial capacity of at least [MinWStringCap].
3108+// Since the buffer may have been previously used, its contents are not guaranteed to be empty.
3109+//
3110+// The buffer should be freed via [WString.Free]
3111+func NewWString() *WString {
3112+ return &WString{
3113+ b: newBuffer(),
3114+ }
3115+}
3116+
3117+func (b *WString) Free() {
3118+ if b.empty() {
3119+ return
3120+ }
3121+ freeBuffer(b.b)
3122+ b.b = nil
3123+}
3124+
3125+// ResizeTo grows the buffer to at least c and returns the new capacity, freeing the
3126+// previous buffer back into pool.
3127+func (b *WString) ResizeTo(c uint32) uint32 {
3128+ // allready sufficient (or n is 0)
3129+ if c <= b.Cap() {
3130+ return b.Cap()
3131+ }
3132+
3133+ if c <= MinWStringCap {
3134+ c = MinWStringCap
3135+ }
3136+ // allocate at-least double buffer size, as is done in [bytes.Buffer] and other places
3137+ if c <= 2*b.Cap() {
3138+ c = 2 * b.Cap()
3139+ }
3140+
3141+ b2 := make([]uint16, c)
3142+ if !b.empty() {
3143+ copy(b2, b.b)
3144+ freeBuffer(b.b)
3145+ }
3146+ b.b = b2
3147+ return c
3148+}
3149+
3150+// Buffer returns the underlying []uint16 buffer.
3151+func (b *WString) Buffer() []uint16 {
3152+ if b.empty() {
3153+ return nil
3154+ }
3155+ return b.b
3156+}
3157+
3158+// Pointer returns a pointer to the first uint16 in the buffer.
3159+// If the [WString.Free] has already been called, the pointer will be nil.
3160+func (b *WString) Pointer() *uint16 {
3161+ if b.empty() {
3162+ return nil
3163+ }
3164+ return &b.b[0]
3165+}
3166+
3167+// String returns the returns the UTF-8 encoding of the UTF-16 string in the buffer.
3168+//
3169+// It assumes that the data is null-terminated.
3170+func (b *WString) String() string {
3171+ // Using [windows.UTF16ToString] would require importing "golang.org/x/sys/windows"
3172+ // and would make this code Windows-only, which makes no sense.
3173+ // So copy UTF16ToString code into here.
3174+ // If other windows-specific code is added, switch to [windows.UTF16ToString]
3175+
3176+ s := b.b
3177+ for i, v := range s {
3178+ if v == 0 {
3179+ s = s[:i]
3180+ break
3181+ }
3182+ }
3183+ return string(utf16.Decode(s))
3184+}
3185+
3186+// Cap returns the underlying buffer capacity.
3187+func (b *WString) Cap() uint32 {
3188+ if b.empty() {
3189+ return 0
3190+ }
3191+ return b.cap()
3192+}
3193+
3194+func (b *WString) cap() uint32 { return uint32(cap(b.b)) }
3195+func (b *WString) empty() bool { return b == nil || b.cap() == 0 }
3196diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/pipe.go b/debian/extra/vendor/github.com/Microsoft/go-winio/pipe.go
3197new file mode 100644
3198index 0000000..25cc811
3199--- /dev/null
3200+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pipe.go
3201@@ -0,0 +1,525 @@
3202+//go:build windows
3203+// +build windows
3204+
3205+package winio
3206+
3207+import (
3208+ "context"
3209+ "errors"
3210+ "fmt"
3211+ "io"
3212+ "net"
3213+ "os"
3214+ "runtime"
3215+ "syscall"
3216+ "time"
3217+ "unsafe"
3218+
3219+ "golang.org/x/sys/windows"
3220+
3221+ "github.com/Microsoft/go-winio/internal/fs"
3222+)
3223+
3224+//sys connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) = ConnectNamedPipe
3225+//sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateNamedPipeW
3226+//sys getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo
3227+//sys getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
3228+//sys localAlloc(uFlags uint32, length uint32) (ptr uintptr) = LocalAlloc
3229+//sys ntCreateNamedPipeFile(pipe *syscall.Handle, access uint32, oa *objectAttributes, iosb *ioStatusBlock, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) = ntdll.NtCreateNamedPipeFile
3230+//sys rtlNtStatusToDosError(status ntStatus) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb
3231+//sys rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) = ntdll.RtlDosPathNameToNtPathName_U
3232+//sys rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) = ntdll.RtlDefaultNpAcl
3233+
3234+type ioStatusBlock struct {
3235+ Status, Information uintptr
3236+}
3237+
3238+type objectAttributes struct {
3239+ Length uintptr
3240+ RootDirectory uintptr
3241+ ObjectName *unicodeString
3242+ Attributes uintptr
3243+ SecurityDescriptor *securityDescriptor
3244+ SecurityQoS uintptr
3245+}
3246+
3247+type unicodeString struct {
3248+ Length uint16
3249+ MaximumLength uint16
3250+ Buffer uintptr
3251+}
3252+
3253+type securityDescriptor struct {
3254+ Revision byte
3255+ Sbz1 byte
3256+ Control uint16
3257+ Owner uintptr
3258+ Group uintptr
3259+ Sacl uintptr //revive:disable-line:var-naming SACL, not Sacl
3260+ Dacl uintptr //revive:disable-line:var-naming DACL, not Dacl
3261+}
3262+
3263+type ntStatus int32
3264+
3265+func (status ntStatus) Err() error {
3266+ if status >= 0 {
3267+ return nil
3268+ }
3269+ return rtlNtStatusToDosError(status)
3270+}
3271+
3272+var (
3273+ // ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed.
3274+ ErrPipeListenerClosed = net.ErrClosed
3275+
3276+ errPipeWriteClosed = errors.New("pipe has been closed for write")
3277+)
3278+
3279+type win32Pipe struct {
3280+ *win32File
3281+ path string
3282+}
3283+
3284+type win32MessageBytePipe struct {
3285+ win32Pipe
3286+ writeClosed bool
3287+ readEOF bool
3288+}
3289+
3290+type pipeAddress string
3291+
3292+func (f *win32Pipe) LocalAddr() net.Addr {
3293+ return pipeAddress(f.path)
3294+}
3295+
3296+func (f *win32Pipe) RemoteAddr() net.Addr {
3297+ return pipeAddress(f.path)
3298+}
3299+
3300+func (f *win32Pipe) SetDeadline(t time.Time) error {
3301+ if err := f.SetReadDeadline(t); err != nil {
3302+ return err
3303+ }
3304+ return f.SetWriteDeadline(t)
3305+}
3306+
3307+// CloseWrite closes the write side of a message pipe in byte mode.
3308+func (f *win32MessageBytePipe) CloseWrite() error {
3309+ if f.writeClosed {
3310+ return errPipeWriteClosed
3311+ }
3312+ err := f.win32File.Flush()
3313+ if err != nil {
3314+ return err
3315+ }
3316+ _, err = f.win32File.Write(nil)
3317+ if err != nil {
3318+ return err
3319+ }
3320+ f.writeClosed = true
3321+ return nil
3322+}
3323+
3324+// Write writes bytes to a message pipe in byte mode. Zero-byte writes are ignored, since
3325+// they are used to implement CloseWrite().
3326+func (f *win32MessageBytePipe) Write(b []byte) (int, error) {
3327+ if f.writeClosed {
3328+ return 0, errPipeWriteClosed
3329+ }
3330+ if len(b) == 0 {
3331+ return 0, nil
3332+ }
3333+ return f.win32File.Write(b)
3334+}
3335+
3336+// Read reads bytes from a message pipe in byte mode. A read of a zero-byte message on a message
3337+// mode pipe will return io.EOF, as will all subsequent reads.
3338+func (f *win32MessageBytePipe) Read(b []byte) (int, error) {
3339+ if f.readEOF {
3340+ return 0, io.EOF
3341+ }
3342+ n, err := f.win32File.Read(b)
3343+ if err == io.EOF { //nolint:errorlint
3344+ // If this was the result of a zero-byte read, then
3345+ // it is possible that the read was due to a zero-size
3346+ // message. Since we are simulating CloseWrite with a
3347+ // zero-byte message, ensure that all future Read() calls
3348+ // also return EOF.
3349+ f.readEOF = true
3350+ } else if err == syscall.ERROR_MORE_DATA { //nolint:errorlint // err is Errno
3351+ // ERROR_MORE_DATA indicates that the pipe's read mode is message mode
3352+ // and the message still has more bytes. Treat this as a success, since
3353+ // this package presents all named pipes as byte streams.
3354+ err = nil
3355+ }
3356+ return n, err
3357+}
3358+
3359+func (pipeAddress) Network() string {
3360+ return "pipe"
3361+}
3362+
3363+func (s pipeAddress) String() string {
3364+ return string(s)
3365+}
3366+
3367+// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout.
3368+func tryDialPipe(ctx context.Context, path *string, access fs.AccessMask) (syscall.Handle, error) {
3369+ for {
3370+ select {
3371+ case <-ctx.Done():
3372+ return syscall.Handle(0), ctx.Err()
3373+ default:
3374+ wh, err := fs.CreateFile(*path,
3375+ access,
3376+ 0, // mode
3377+ nil, // security attributes
3378+ fs.OPEN_EXISTING,
3379+ fs.FILE_FLAG_OVERLAPPED|fs.SECURITY_SQOS_PRESENT|fs.SECURITY_ANONYMOUS,
3380+ 0, // template file handle
3381+ )
3382+ h := syscall.Handle(wh)
3383+ if err == nil {
3384+ return h, nil
3385+ }
3386+ if err != windows.ERROR_PIPE_BUSY { //nolint:errorlint // err is Errno
3387+ return h, &os.PathError{Err: err, Op: "open", Path: *path}
3388+ }
3389+ // Wait 10 msec and try again. This is a rather simplistic
3390+ // view, as we always try each 10 milliseconds.
3391+ time.Sleep(10 * time.Millisecond)
3392+ }
3393+ }
3394+}
3395+
3396+// DialPipe connects to a named pipe by path, timing out if the connection
3397+// takes longer than the specified duration. If timeout is nil, then we use
3398+// a default timeout of 2 seconds. (We do not use WaitNamedPipe.)
3399+func DialPipe(path string, timeout *time.Duration) (net.Conn, error) {
3400+ var absTimeout time.Time
3401+ if timeout != nil {
3402+ absTimeout = time.Now().Add(*timeout)
3403+ } else {
3404+ absTimeout = time.Now().Add(2 * time.Second)
3405+ }
3406+ ctx, cancel := context.WithDeadline(context.Background(), absTimeout)
3407+ defer cancel()
3408+ conn, err := DialPipeContext(ctx, path)
3409+ if errors.Is(err, context.DeadlineExceeded) {
3410+ return nil, ErrTimeout
3411+ }
3412+ return conn, err
3413+}
3414+
3415+// DialPipeContext attempts to connect to a named pipe by `path` until `ctx`
3416+// cancellation or timeout.
3417+func DialPipeContext(ctx context.Context, path string) (net.Conn, error) {
3418+ return DialPipeAccess(ctx, path, syscall.GENERIC_READ|syscall.GENERIC_WRITE)
3419+}
3420+
3421+// DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx`
3422+// cancellation or timeout.
3423+func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) {
3424+ var err error
3425+ var h syscall.Handle
3426+ h, err = tryDialPipe(ctx, &path, fs.AccessMask(access))
3427+ if err != nil {
3428+ return nil, err
3429+ }
3430+
3431+ var flags uint32
3432+ err = getNamedPipeInfo(h, &flags, nil, nil, nil)
3433+ if err != nil {
3434+ return nil, err
3435+ }
3436+
3437+ f, err := makeWin32File(h)
3438+ if err != nil {
3439+ syscall.Close(h)
3440+ return nil, err
3441+ }
3442+
3443+ // If the pipe is in message mode, return a message byte pipe, which
3444+ // supports CloseWrite().
3445+ if flags&windows.PIPE_TYPE_MESSAGE != 0 {
3446+ return &win32MessageBytePipe{
3447+ win32Pipe: win32Pipe{win32File: f, path: path},
3448+ }, nil
3449+ }
3450+ return &win32Pipe{win32File: f, path: path}, nil
3451+}
3452+
3453+type acceptResponse struct {
3454+ f *win32File
3455+ err error
3456+}
3457+
3458+type win32PipeListener struct {
3459+ firstHandle syscall.Handle
3460+ path string
3461+ config PipeConfig
3462+ acceptCh chan (chan acceptResponse)
3463+ closeCh chan int
3464+ doneCh chan int
3465+}
3466+
3467+func makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (syscall.Handle, error) {
3468+ path16, err := syscall.UTF16FromString(path)
3469+ if err != nil {
3470+ return 0, &os.PathError{Op: "open", Path: path, Err: err}
3471+ }
3472+
3473+ var oa objectAttributes
3474+ oa.Length = unsafe.Sizeof(oa)
3475+
3476+ var ntPath unicodeString
3477+ if err := rtlDosPathNameToNtPathName(&path16[0],
3478+ &ntPath,
3479+ 0,
3480+ 0,
3481+ ).Err(); err != nil {
3482+ return 0, &os.PathError{Op: "open", Path: path, Err: err}
3483+ }
3484+ defer localFree(ntPath.Buffer)
3485+ oa.ObjectName = &ntPath
3486+ oa.Attributes = windows.OBJ_CASE_INSENSITIVE
3487+
3488+ // The security descriptor is only needed for the first pipe.
3489+ if first {
3490+ if sd != nil {
3491+ l := uint32(len(sd))
3492+ sdb := localAlloc(0, l)
3493+ defer localFree(sdb)
3494+ copy((*[0xffff]byte)(unsafe.Pointer(sdb))[:], sd)
3495+ oa.SecurityDescriptor = (*securityDescriptor)(unsafe.Pointer(sdb))
3496+ } else {
3497+ // Construct the default named pipe security descriptor.
3498+ var dacl uintptr
3499+ if err := rtlDefaultNpAcl(&dacl).Err(); err != nil {
3500+ return 0, fmt.Errorf("getting default named pipe ACL: %w", err)
3501+ }
3502+ defer localFree(dacl)
3503+
3504+ sdb := &securityDescriptor{
3505+ Revision: 1,
3506+ Control: windows.SE_DACL_PRESENT,
3507+ Dacl: dacl,
3508+ }
3509+ oa.SecurityDescriptor = sdb
3510+ }
3511+ }
3512+
3513+ typ := uint32(windows.FILE_PIPE_REJECT_REMOTE_CLIENTS)
3514+ if c.MessageMode {
3515+ typ |= windows.FILE_PIPE_MESSAGE_TYPE
3516+ }
3517+
3518+ disposition := uint32(windows.FILE_OPEN)
3519+ access := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE | syscall.SYNCHRONIZE)
3520+ if first {
3521+ disposition = windows.FILE_CREATE
3522+ // By not asking for read or write access, the named pipe file system
3523+ // will put this pipe into an initially disconnected state, blocking
3524+ // client connections until the next call with first == false.
3525+ access = syscall.SYNCHRONIZE
3526+ }
3527+
3528+ timeout := int64(-50 * 10000) // 50ms
3529+
3530+ var (
3531+ h syscall.Handle
3532+ iosb ioStatusBlock
3533+ )
3534+ err = ntCreateNamedPipeFile(&h,
3535+ access,
3536+ &oa,
3537+ &iosb,
3538+ syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE,
3539+ disposition,
3540+ 0,
3541+ typ,
3542+ 0,
3543+ 0,
3544+ 0xffffffff,
3545+ uint32(c.InputBufferSize),
3546+ uint32(c.OutputBufferSize),
3547+ &timeout).Err()
3548+ if err != nil {
3549+ return 0, &os.PathError{Op: "open", Path: path, Err: err}
3550+ }
3551+
3552+ runtime.KeepAlive(ntPath)
3553+ return h, nil
3554+}
3555+
3556+func (l *win32PipeListener) makeServerPipe() (*win32File, error) {
3557+ h, err := makeServerPipeHandle(l.path, nil, &l.config, false)
3558+ if err != nil {
3559+ return nil, err
3560+ }
3561+ f, err := makeWin32File(h)
3562+ if err != nil {
3563+ syscall.Close(h)
3564+ return nil, err
3565+ }
3566+ return f, nil
3567+}
3568+
3569+func (l *win32PipeListener) makeConnectedServerPipe() (*win32File, error) {
3570+ p, err := l.makeServerPipe()
3571+ if err != nil {
3572+ return nil, err
3573+ }
3574+
3575+ // Wait for the client to connect.
3576+ ch := make(chan error)
3577+ go func(p *win32File) {
3578+ ch <- connectPipe(p)
3579+ }(p)
3580+
3581+ select {
3582+ case err = <-ch:
3583+ if err != nil {
3584+ p.Close()
3585+ p = nil
3586+ }
3587+ case <-l.closeCh:
3588+ // Abort the connect request by closing the handle.
3589+ p.Close()
3590+ p = nil
3591+ err = <-ch
3592+ if err == nil || err == ErrFileClosed { //nolint:errorlint // err is Errno
3593+ err = ErrPipeListenerClosed
3594+ }
3595+ }
3596+ return p, err
3597+}
3598+
3599+func (l *win32PipeListener) listenerRoutine() {
3600+ closed := false
3601+ for !closed {
3602+ select {
3603+ case <-l.closeCh:
3604+ closed = true
3605+ case responseCh := <-l.acceptCh:
3606+ var (
3607+ p *win32File
3608+ err error
3609+ )
3610+ for {
3611+ p, err = l.makeConnectedServerPipe()
3612+ // If the connection was immediately closed by the client, try
3613+ // again.
3614+ if err != windows.ERROR_NO_DATA { //nolint:errorlint // err is Errno
3615+ break
3616+ }
3617+ }
3618+ responseCh <- acceptResponse{p, err}
3619+ closed = err == ErrPipeListenerClosed //nolint:errorlint // err is Errno
3620+ }
3621+ }
3622+ syscall.Close(l.firstHandle)
3623+ l.firstHandle = 0
3624+ // Notify Close() and Accept() callers that the handle has been closed.
3625+ close(l.doneCh)
3626+}
3627+
3628+// PipeConfig contain configuration for the pipe listener.
3629+type PipeConfig struct {
3630+ // SecurityDescriptor contains a Windows security descriptor in SDDL format.
3631+ SecurityDescriptor string
3632+
3633+ // MessageMode determines whether the pipe is in byte or message mode. In either
3634+ // case the pipe is read in byte mode by default. The only practical difference in
3635+ // this implementation is that CloseWrite() is only supported for message mode pipes;
3636+ // CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only
3637+ // transferred to the reader (and returned as io.EOF in this implementation)
3638+ // when the pipe is in message mode.
3639+ MessageMode bool
3640+
3641+ // InputBufferSize specifies the size of the input buffer, in bytes.
3642+ InputBufferSize int32
3643+
3644+ // OutputBufferSize specifies the size of the output buffer, in bytes.
3645+ OutputBufferSize int32
3646+}
3647+
3648+// ListenPipe creates a listener on a Windows named pipe path, e.g. \\.\pipe\mypipe.
3649+// The pipe must not already exist.
3650+func ListenPipe(path string, c *PipeConfig) (net.Listener, error) {
3651+ var (
3652+ sd []byte
3653+ err error
3654+ )
3655+ if c == nil {
3656+ c = &PipeConfig{}
3657+ }
3658+ if c.SecurityDescriptor != "" {
3659+ sd, err = SddlToSecurityDescriptor(c.SecurityDescriptor)
3660+ if err != nil {
3661+ return nil, err
3662+ }
3663+ }
3664+ h, err := makeServerPipeHandle(path, sd, c, true)
3665+ if err != nil {
3666+ return nil, err
3667+ }
3668+ l := &win32PipeListener{
3669+ firstHandle: h,
3670+ path: path,
3671+ config: *c,
3672+ acceptCh: make(chan (chan acceptResponse)),
3673+ closeCh: make(chan int),
3674+ doneCh: make(chan int),
3675+ }
3676+ go l.listenerRoutine()
3677+ return l, nil
3678+}
3679+
3680+func connectPipe(p *win32File) error {
3681+ c, err := p.prepareIO()
3682+ if err != nil {
3683+ return err
3684+ }
3685+ defer p.wg.Done()
3686+
3687+ err = connectNamedPipe(p.handle, &c.o)
3688+ _, err = p.asyncIO(c, nil, 0, err)
3689+ if err != nil && err != windows.ERROR_PIPE_CONNECTED { //nolint:errorlint // err is Errno
3690+ return err
3691+ }
3692+ return nil
3693+}
3694+
3695+func (l *win32PipeListener) Accept() (net.Conn, error) {
3696+ ch := make(chan acceptResponse)
3697+ select {
3698+ case l.acceptCh <- ch:
3699+ response := <-ch
3700+ err := response.err
3701+ if err != nil {
3702+ return nil, err
3703+ }
3704+ if l.config.MessageMode {
3705+ return &win32MessageBytePipe{
3706+ win32Pipe: win32Pipe{win32File: response.f, path: l.path},
3707+ }, nil
3708+ }
3709+ return &win32Pipe{win32File: response.f, path: l.path}, nil
3710+ case <-l.doneCh:
3711+ return nil, ErrPipeListenerClosed
3712+ }
3713+}
3714+
3715+func (l *win32PipeListener) Close() error {
3716+ select {
3717+ case l.closeCh <- 1:
3718+ <-l.doneCh
3719+ case <-l.doneCh:
3720+ }
3721+ return nil
3722+}
3723+
3724+func (l *win32PipeListener) Addr() net.Addr {
3725+ return pipeAddress(l.path)
3726+}
3727diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go
3728new file mode 100644
3729index 0000000..48ce4e9
3730--- /dev/null
3731+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go
3732@@ -0,0 +1,232 @@
3733+// Package guid provides a GUID type. The backing structure for a GUID is
3734+// identical to that used by the golang.org/x/sys/windows GUID type.
3735+// There are two main binary encodings used for a GUID, the big-endian encoding,
3736+// and the Windows (mixed-endian) encoding. See here for details:
3737+// https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding
3738+package guid
3739+
3740+import (
3741+ "crypto/rand"
3742+ "crypto/sha1" //nolint:gosec // not used for secure application
3743+ "encoding"
3744+ "encoding/binary"
3745+ "fmt"
3746+ "strconv"
3747+)
3748+
3749+//go:generate go run golang.org/x/tools/cmd/stringer -type=Variant -trimprefix=Variant -linecomment
3750+
3751+// Variant specifies which GUID variant (or "type") of the GUID. It determines
3752+// how the entirety of the rest of the GUID is interpreted.
3753+type Variant uint8
3754+
3755+// The variants specified by RFC 4122 section 4.1.1.
3756+const (
3757+ // VariantUnknown specifies a GUID variant which does not conform to one of
3758+ // the variant encodings specified in RFC 4122.
3759+ VariantUnknown Variant = iota
3760+ VariantNCS
3761+ VariantRFC4122 // RFC 4122
3762+ VariantMicrosoft
3763+ VariantFuture
3764+)
3765+
3766+// Version specifies how the bits in the GUID were generated. For instance, a
3767+// version 4 GUID is randomly generated, and a version 5 is generated from the
3768+// hash of an input string.
3769+type Version uint8
3770+
3771+func (v Version) String() string {
3772+ return strconv.FormatUint(uint64(v), 10)
3773+}
3774+
3775+var _ = (encoding.TextMarshaler)(GUID{})
3776+var _ = (encoding.TextUnmarshaler)(&GUID{})
3777+
3778+// NewV4 returns a new version 4 (pseudorandom) GUID, as defined by RFC 4122.
3779+func NewV4() (GUID, error) {
3780+ var b [16]byte
3781+ if _, err := rand.Read(b[:]); err != nil {
3782+ return GUID{}, err
3783+ }
3784+
3785+ g := FromArray(b)
3786+ g.setVersion(4) // Version 4 means randomly generated.
3787+ g.setVariant(VariantRFC4122)
3788+
3789+ return g, nil
3790+}
3791+
3792+// NewV5 returns a new version 5 (generated from a string via SHA-1 hashing)
3793+// GUID, as defined by RFC 4122. The RFC is unclear on the encoding of the name,
3794+// and the sample code treats it as a series of bytes, so we do the same here.
3795+//
3796+// Some implementations, such as those found on Windows, treat the name as a
3797+// big-endian UTF16 stream of bytes. If that is desired, the string can be
3798+// encoded as such before being passed to this function.
3799+func NewV5(namespace GUID, name []byte) (GUID, error) {
3800+ b := sha1.New() //nolint:gosec // not used for secure application
3801+ namespaceBytes := namespace.ToArray()
3802+ b.Write(namespaceBytes[:])
3803+ b.Write(name)
3804+
3805+ a := [16]byte{}
3806+ copy(a[:], b.Sum(nil))
3807+
3808+ g := FromArray(a)
3809+ g.setVersion(5) // Version 5 means generated from a string.
3810+ g.setVariant(VariantRFC4122)
3811+
3812+ return g, nil
3813+}
3814+
3815+func fromArray(b [16]byte, order binary.ByteOrder) GUID {
3816+ var g GUID
3817+ g.Data1 = order.Uint32(b[0:4])
3818+ g.Data2 = order.Uint16(b[4:6])
3819+ g.Data3 = order.Uint16(b[6:8])
3820+ copy(g.Data4[:], b[8:16])
3821+ return g
3822+}
3823+
3824+func (g GUID) toArray(order binary.ByteOrder) [16]byte {
3825+ b := [16]byte{}
3826+ order.PutUint32(b[0:4], g.Data1)
3827+ order.PutUint16(b[4:6], g.Data2)
3828+ order.PutUint16(b[6:8], g.Data3)
3829+ copy(b[8:16], g.Data4[:])
3830+ return b
3831+}
3832+
3833+// FromArray constructs a GUID from a big-endian encoding array of 16 bytes.
3834+func FromArray(b [16]byte) GUID {
3835+ return fromArray(b, binary.BigEndian)
3836+}
3837+
3838+// ToArray returns an array of 16 bytes representing the GUID in big-endian
3839+// encoding.
3840+func (g GUID) ToArray() [16]byte {
3841+ return g.toArray(binary.BigEndian)
3842+}
3843+
3844+// FromWindowsArray constructs a GUID from a Windows encoding array of bytes.
3845+func FromWindowsArray(b [16]byte) GUID {
3846+ return fromArray(b, binary.LittleEndian)
3847+}
3848+
3849+// ToWindowsArray returns an array of 16 bytes representing the GUID in Windows
3850+// encoding.
3851+func (g GUID) ToWindowsArray() [16]byte {
3852+ return g.toArray(binary.LittleEndian)
3853+}
3854+
3855+func (g GUID) String() string {
3856+ return fmt.Sprintf(
3857+ "%08x-%04x-%04x-%04x-%012x",
3858+ g.Data1,
3859+ g.Data2,
3860+ g.Data3,
3861+ g.Data4[:2],
3862+ g.Data4[2:])
3863+}
3864+
3865+// FromString parses a string containing a GUID and returns the GUID. The only
3866+// format currently supported is the `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
3867+// format.
3868+func FromString(s string) (GUID, error) {
3869+ if len(s) != 36 {
3870+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
3871+ }
3872+ if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
3873+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
3874+ }
3875+
3876+ var g GUID
3877+
3878+ data1, err := strconv.ParseUint(s[0:8], 16, 32)
3879+ if err != nil {
3880+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
3881+ }
3882+ g.Data1 = uint32(data1)
3883+
3884+ data2, err := strconv.ParseUint(s[9:13], 16, 16)
3885+ if err != nil {
3886+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
3887+ }
3888+ g.Data2 = uint16(data2)
3889+
3890+ data3, err := strconv.ParseUint(s[14:18], 16, 16)
3891+ if err != nil {
3892+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
3893+ }
3894+ g.Data3 = uint16(data3)
3895+
3896+ for i, x := range []int{19, 21, 24, 26, 28, 30, 32, 34} {
3897+ v, err := strconv.ParseUint(s[x:x+2], 16, 8)
3898+ if err != nil {
3899+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
3900+ }
3901+ g.Data4[i] = uint8(v)
3902+ }
3903+
3904+ return g, nil
3905+}
3906+
3907+func (g *GUID) setVariant(v Variant) {
3908+ d := g.Data4[0]
3909+ switch v {
3910+ case VariantNCS:
3911+ d = (d & 0x7f)
3912+ case VariantRFC4122:
3913+ d = (d & 0x3f) | 0x80
3914+ case VariantMicrosoft:
3915+ d = (d & 0x1f) | 0xc0
3916+ case VariantFuture:
3917+ d = (d & 0x0f) | 0xe0
3918+ case VariantUnknown:
3919+ fallthrough
3920+ default:
3921+ panic(fmt.Sprintf("invalid variant: %d", v))
3922+ }
3923+ g.Data4[0] = d
3924+}
3925+
3926+// Variant returns the GUID variant, as defined in RFC 4122.
3927+func (g GUID) Variant() Variant {
3928+ b := g.Data4[0]
3929+ if b&0x80 == 0 {
3930+ return VariantNCS
3931+ } else if b&0xc0 == 0x80 {
3932+ return VariantRFC4122
3933+ } else if b&0xe0 == 0xc0 {
3934+ return VariantMicrosoft
3935+ } else if b&0xe0 == 0xe0 {
3936+ return VariantFuture
3937+ }
3938+ return VariantUnknown
3939+}
3940+
3941+func (g *GUID) setVersion(v Version) {
3942+ g.Data3 = (g.Data3 & 0x0fff) | (uint16(v) << 12)
3943+}
3944+
3945+// Version returns the GUID version, as defined in RFC 4122.
3946+func (g GUID) Version() Version {
3947+ return Version((g.Data3 & 0xF000) >> 12)
3948+}
3949+
3950+// MarshalText returns the textual representation of the GUID.
3951+func (g GUID) MarshalText() ([]byte, error) {
3952+ return []byte(g.String()), nil
3953+}
3954+
3955+// UnmarshalText takes the textual representation of a GUID, and unmarhals it
3956+// into this GUID.
3957+func (g *GUID) UnmarshalText(text []byte) error {
3958+ g2, err := FromString(string(text))
3959+ if err != nil {
3960+ return err
3961+ }
3962+ *g = g2
3963+ return nil
3964+}
3965diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go
3966new file mode 100644
3967index 0000000..805bd35
3968--- /dev/null
3969+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go
3970@@ -0,0 +1,16 @@
3971+//go:build !windows
3972+// +build !windows
3973+
3974+package guid
3975+
3976+// GUID represents a GUID/UUID. It has the same structure as
3977+// golang.org/x/sys/windows.GUID so that it can be used with functions expecting
3978+// that type. It is defined as its own type as that is only available to builds
3979+// targeted at `windows`. The representation matches that used by native Windows
3980+// code.
3981+type GUID struct {
3982+ Data1 uint32
3983+ Data2 uint16
3984+ Data3 uint16
3985+ Data4 [8]byte
3986+}
3987diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go
3988new file mode 100644
3989index 0000000..27e45ee
3990--- /dev/null
3991+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go
3992@@ -0,0 +1,13 @@
3993+//go:build windows
3994+// +build windows
3995+
3996+package guid
3997+
3998+import "golang.org/x/sys/windows"
3999+
4000+// GUID represents a GUID/UUID. It has the same structure as
4001+// golang.org/x/sys/windows.GUID so that it can be used with functions expecting
4002+// that type. It is defined as its own type so that stringification and
4003+// marshaling can be supported. The representation matches that used by native
4004+// Windows code.
4005+type GUID windows.GUID
4006diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go
4007new file mode 100644
4008index 0000000..4076d31
4009--- /dev/null
4010+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go
4011@@ -0,0 +1,27 @@
4012+// Code generated by "stringer -type=Variant -trimprefix=Variant -linecomment"; DO NOT EDIT.
4013+
4014+package guid
4015+
4016+import "strconv"
4017+
4018+func _() {
4019+ // An "invalid array index" compiler error signifies that the constant values have changed.
4020+ // Re-run the stringer command to generate them again.
4021+ var x [1]struct{}
4022+ _ = x[VariantUnknown-0]
4023+ _ = x[VariantNCS-1]
4024+ _ = x[VariantRFC4122-2]
4025+ _ = x[VariantMicrosoft-3]
4026+ _ = x[VariantFuture-4]
4027+}
4028+
4029+const _Variant_name = "UnknownNCSRFC 4122MicrosoftFuture"
4030+
4031+var _Variant_index = [...]uint8{0, 7, 10, 18, 27, 33}
4032+
4033+func (i Variant) String() string {
4034+ if i >= Variant(len(_Variant_index)-1) {
4035+ return "Variant(" + strconv.FormatInt(int64(i), 10) + ")"
4036+ }
4037+ return _Variant_name[_Variant_index[i]:_Variant_index[i+1]]
4038+}
4039diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/privilege.go b/debian/extra/vendor/github.com/Microsoft/go-winio/privilege.go
4040new file mode 100644
4041index 0000000..0ff9dac
4042--- /dev/null
4043+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/privilege.go
4044@@ -0,0 +1,197 @@
4045+//go:build windows
4046+// +build windows
4047+
4048+package winio
4049+
4050+import (
4051+ "bytes"
4052+ "encoding/binary"
4053+ "fmt"
4054+ "runtime"
4055+ "sync"
4056+ "syscall"
4057+ "unicode/utf16"
4058+
4059+ "golang.org/x/sys/windows"
4060+)
4061+
4062+//sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges
4063+//sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf
4064+//sys revertToSelf() (err error) = advapi32.RevertToSelf
4065+//sys openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken
4066+//sys getCurrentThread() (h syscall.Handle) = GetCurrentThread
4067+//sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW
4068+//sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW
4069+//sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW
4070+
4071+const (
4072+ //revive:disable-next-line:var-naming ALL_CAPS
4073+ SE_PRIVILEGE_ENABLED = windows.SE_PRIVILEGE_ENABLED
4074+
4075+ //revive:disable-next-line:var-naming ALL_CAPS
4076+ ERROR_NOT_ALL_ASSIGNED syscall.Errno = windows.ERROR_NOT_ALL_ASSIGNED
4077+
4078+ SeBackupPrivilege = "SeBackupPrivilege"
4079+ SeRestorePrivilege = "SeRestorePrivilege"
4080+ SeSecurityPrivilege = "SeSecurityPrivilege"
4081+)
4082+
4083+var (
4084+ privNames = make(map[string]uint64)
4085+ privNameMutex sync.Mutex
4086+)
4087+
4088+// PrivilegeError represents an error enabling privileges.
4089+type PrivilegeError struct {
4090+ privileges []uint64
4091+}
4092+
4093+func (e *PrivilegeError) Error() string {
4094+ s := "Could not enable privilege "
4095+ if len(e.privileges) > 1 {
4096+ s = "Could not enable privileges "
4097+ }
4098+ for i, p := range e.privileges {
4099+ if i != 0 {
4100+ s += ", "
4101+ }
4102+ s += `"`
4103+ s += getPrivilegeName(p)
4104+ s += `"`
4105+ }
4106+ return s
4107+}
4108+
4109+// RunWithPrivilege enables a single privilege for a function call.
4110+func RunWithPrivilege(name string, fn func() error) error {
4111+ return RunWithPrivileges([]string{name}, fn)
4112+}
4113+
4114+// RunWithPrivileges enables privileges for a function call.
4115+func RunWithPrivileges(names []string, fn func() error) error {
4116+ privileges, err := mapPrivileges(names)
4117+ if err != nil {
4118+ return err
4119+ }
4120+ runtime.LockOSThread()
4121+ defer runtime.UnlockOSThread()
4122+ token, err := newThreadToken()
4123+ if err != nil {
4124+ return err
4125+ }
4126+ defer releaseThreadToken(token)
4127+ err = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED)
4128+ if err != nil {
4129+ return err
4130+ }
4131+ return fn()
4132+}
4133+
4134+func mapPrivileges(names []string) ([]uint64, error) {
4135+ privileges := make([]uint64, 0, len(names))
4136+ privNameMutex.Lock()
4137+ defer privNameMutex.Unlock()
4138+ for _, name := range names {
4139+ p, ok := privNames[name]
4140+ if !ok {
4141+ err := lookupPrivilegeValue("", name, &p)
4142+ if err != nil {
4143+ return nil, err
4144+ }
4145+ privNames[name] = p
4146+ }
4147+ privileges = append(privileges, p)
4148+ }
4149+ return privileges, nil
4150+}
4151+
4152+// EnableProcessPrivileges enables privileges globally for the process.
4153+func EnableProcessPrivileges(names []string) error {
4154+ return enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED)
4155+}
4156+
4157+// DisableProcessPrivileges disables privileges globally for the process.
4158+func DisableProcessPrivileges(names []string) error {
4159+ return enableDisableProcessPrivilege(names, 0)
4160+}
4161+
4162+func enableDisableProcessPrivilege(names []string, action uint32) error {
4163+ privileges, err := mapPrivileges(names)
4164+ if err != nil {
4165+ return err
4166+ }
4167+
4168+ p := windows.CurrentProcess()
4169+ var token windows.Token
4170+ err = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token)
4171+ if err != nil {
4172+ return err
4173+ }
4174+
4175+ defer token.Close()
4176+ return adjustPrivileges(token, privileges, action)
4177+}
4178+
4179+func adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error {
4180+ var b bytes.Buffer
4181+ _ = binary.Write(&b, binary.LittleEndian, uint32(len(privileges)))
4182+ for _, p := range privileges {
4183+ _ = binary.Write(&b, binary.LittleEndian, p)
4184+ _ = binary.Write(&b, binary.LittleEndian, action)
4185+ }
4186+ prevState := make([]byte, b.Len())
4187+ reqSize := uint32(0)
4188+ success, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize)
4189+ if !success {
4190+ return err
4191+ }
4192+ if err == ERROR_NOT_ALL_ASSIGNED { //nolint:errorlint // err is Errno
4193+ return &PrivilegeError{privileges}
4194+ }
4195+ return nil
4196+}
4197+
4198+func getPrivilegeName(luid uint64) string {
4199+ var nameBuffer [256]uint16
4200+ bufSize := uint32(len(nameBuffer))
4201+ err := lookupPrivilegeName("", &luid, &nameBuffer[0], &bufSize)
4202+ if err != nil {
4203+ return fmt.Sprintf("<unknown privilege %d>", luid)
4204+ }
4205+
4206+ var displayNameBuffer [256]uint16
4207+ displayBufSize := uint32(len(displayNameBuffer))
4208+ var langID uint32
4209+ err = lookupPrivilegeDisplayName("", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID)
4210+ if err != nil {
4211+ return fmt.Sprintf("<unknown privilege %s>", string(utf16.Decode(nameBuffer[:bufSize])))
4212+ }
4213+
4214+ return string(utf16.Decode(displayNameBuffer[:displayBufSize]))
4215+}
4216+
4217+func newThreadToken() (windows.Token, error) {
4218+ err := impersonateSelf(windows.SecurityImpersonation)
4219+ if err != nil {
4220+ return 0, err
4221+ }
4222+
4223+ var token windows.Token
4224+ err = openThreadToken(getCurrentThread(), syscall.TOKEN_ADJUST_PRIVILEGES|syscall.TOKEN_QUERY, false, &token)
4225+ if err != nil {
4226+ rerr := revertToSelf()
4227+ if rerr != nil {
4228+ panic(rerr)
4229+ }
4230+ return 0, err
4231+ }
4232+ return token, nil
4233+}
4234+
4235+func releaseThreadToken(h windows.Token) {
4236+ err := revertToSelf()
4237+ if err != nil {
4238+ panic(err)
4239+ }
4240+ h.Close()
4241+}
4242diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/reparse.go b/debian/extra/vendor/github.com/Microsoft/go-winio/reparse.go
4243new file mode 100644
4244index 0000000..67d1a10
4245--- /dev/null
4246+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/reparse.go
4247@@ -0,0 +1,131 @@
4248+//go:build windows
4249+// +build windows
4250+
4251+package winio
4252+
4253+import (
4254+ "bytes"
4255+ "encoding/binary"
4256+ "fmt"
4257+ "strings"
4258+ "unicode/utf16"
4259+ "unsafe"
4260+)
4261+
4262+const (
4263+ reparseTagMountPoint = 0xA0000003
4264+ reparseTagSymlink = 0xA000000C
4265+)
4266+
4267+type reparseDataBuffer struct {
4268+ ReparseTag uint32
4269+ ReparseDataLength uint16
4270+ Reserved uint16
4271+ SubstituteNameOffset uint16
4272+ SubstituteNameLength uint16
4273+ PrintNameOffset uint16
4274+ PrintNameLength uint16
4275+}
4276+
4277+// ReparsePoint describes a Win32 symlink or mount point.
4278+type ReparsePoint struct {
4279+ Target string
4280+ IsMountPoint bool
4281+}
4282+
4283+// UnsupportedReparsePointError is returned when trying to decode a non-symlink or
4284+// mount point reparse point.
4285+type UnsupportedReparsePointError struct {
4286+ Tag uint32
4287+}
4288+
4289+func (e *UnsupportedReparsePointError) Error() string {
4290+ return fmt.Sprintf("unsupported reparse point %x", e.Tag)
4291+}
4292+
4293+// DecodeReparsePoint decodes a Win32 REPARSE_DATA_BUFFER structure containing either a symlink
4294+// or a mount point.
4295+func DecodeReparsePoint(b []byte) (*ReparsePoint, error) {
4296+ tag := binary.LittleEndian.Uint32(b[0:4])
4297+ return DecodeReparsePointData(tag, b[8:])
4298+}
4299+
4300+func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) {
4301+ isMountPoint := false
4302+ switch tag {
4303+ case reparseTagMountPoint:
4304+ isMountPoint = true
4305+ case reparseTagSymlink:
4306+ default:
4307+ return nil, &UnsupportedReparsePointError{tag}
4308+ }
4309+ nameOffset := 8 + binary.LittleEndian.Uint16(b[4:6])
4310+ if !isMountPoint {
4311+ nameOffset += 4
4312+ }
4313+ nameLength := binary.LittleEndian.Uint16(b[6:8])
4314+ name := make([]uint16, nameLength/2)
4315+ err := binary.Read(bytes.NewReader(b[nameOffset:nameOffset+nameLength]), binary.LittleEndian, &name)
4316+ if err != nil {
4317+ return nil, err
4318+ }
4319+ return &ReparsePoint{string(utf16.Decode(name)), isMountPoint}, nil
4320+}
4321+
4322+func isDriveLetter(c byte) bool {
4323+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
4324+}
4325+
4326+// EncodeReparsePoint encodes a Win32 REPARSE_DATA_BUFFER structure describing a symlink or
4327+// mount point.
4328+func EncodeReparsePoint(rp *ReparsePoint) []byte {
4329+ // Generate an NT path and determine if this is a relative path.
4330+ var ntTarget string
4331+ relative := false
4332+ if strings.HasPrefix(rp.Target, `\\?\`) {
4333+ ntTarget = `\??\` + rp.Target[4:]
4334+ } else if strings.HasPrefix(rp.Target, `\\`) {
4335+ ntTarget = `\??\UNC\` + rp.Target[2:]
4336+ } else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' {
4337+ ntTarget = `\??\` + rp.Target
4338+ } else {
4339+ ntTarget = rp.Target
4340+ relative = true
4341+ }
4342+
4343+ // The paths must be NUL-terminated even though they are counted strings.
4344+ target16 := utf16.Encode([]rune(rp.Target + "\x00"))
4345+ ntTarget16 := utf16.Encode([]rune(ntTarget + "\x00"))
4346+
4347+ size := int(unsafe.Sizeof(reparseDataBuffer{})) - 8
4348+ size += len(ntTarget16)*2 + len(target16)*2
4349+
4350+ tag := uint32(reparseTagMountPoint)
4351+ if !rp.IsMountPoint {
4352+ tag = reparseTagSymlink
4353+ size += 4 // Add room for symlink flags
4354+ }
4355+
4356+ data := reparseDataBuffer{
4357+ ReparseTag: tag,
4358+ ReparseDataLength: uint16(size),
4359+ SubstituteNameOffset: 0,
4360+ SubstituteNameLength: uint16((len(ntTarget16) - 1) * 2),
4361+ PrintNameOffset: uint16(len(ntTarget16) * 2),
4362+ PrintNameLength: uint16((len(target16) - 1) * 2),
4363+ }
4364+
4365+ var b bytes.Buffer
4366+ _ = binary.Write(&b, binary.LittleEndian, &data)
4367+ if !rp.IsMountPoint {
4368+ flags := uint32(0)
4369+ if relative {
4370+ flags |= 1
4371+ }
4372+ _ = binary.Write(&b, binary.LittleEndian, flags)
4373+ }
4374+
4375+ _ = binary.Write(&b, binary.LittleEndian, ntTarget16)
4376+ _ = binary.Write(&b, binary.LittleEndian, target16)
4377+ return b.Bytes()
4378+}
4379diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/sd.go b/debian/extra/vendor/github.com/Microsoft/go-winio/sd.go
4380new file mode 100644
4381index 0000000..5550ef6
4382--- /dev/null
4383+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/sd.go
4384@@ -0,0 +1,144 @@
4385+//go:build windows
4386+// +build windows
4387+
4388+package winio
4389+
4390+import (
4391+ "errors"
4392+ "syscall"
4393+ "unsafe"
4394+
4395+ "golang.org/x/sys/windows"
4396+)
4397+
4398+//sys lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountNameW
4399+//sys lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountSidW
4400+//sys convertSidToStringSid(sid *byte, str **uint16) (err error) = advapi32.ConvertSidToStringSidW
4401+//sys convertStringSidToSid(str *uint16, sid **byte) (err error) = advapi32.ConvertStringSidToSidW
4402+//sys convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW
4403+//sys convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) = advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW
4404+//sys localFree(mem uintptr) = LocalFree
4405+//sys getSecurityDescriptorLength(sd uintptr) (len uint32) = advapi32.GetSecurityDescriptorLength
4406+
4407+type AccountLookupError struct {
4408+ Name string
4409+ Err error
4410+}
4411+
4412+func (e *AccountLookupError) Error() string {
4413+ if e.Name == "" {
4414+ return "lookup account: empty account name specified"
4415+ }
4416+ var s string
4417+ switch {
4418+ case errors.Is(e.Err, windows.ERROR_INVALID_SID):
4419+ s = "the security ID structure is invalid"
4420+ case errors.Is(e.Err, windows.ERROR_NONE_MAPPED):
4421+ s = "not found"
4422+ default:
4423+ s = e.Err.Error()
4424+ }
4425+ return "lookup account " + e.Name + ": " + s
4426+}
4427+
4428+func (e *AccountLookupError) Unwrap() error { return e.Err }
4429+
4430+type SddlConversionError struct {
4431+ Sddl string
4432+ Err error
4433+}
4434+
4435+func (e *SddlConversionError) Error() string {
4436+ return "convert " + e.Sddl + ": " + e.Err.Error()
4437+}
4438+
4439+func (e *SddlConversionError) Unwrap() error { return e.Err }
4440+
4441+// LookupSidByName looks up the SID of an account by name
4442+//
4443+//revive:disable-next-line:var-naming SID, not Sid
4444+func LookupSidByName(name string) (sid string, err error) {
4445+ if name == "" {
4446+ return "", &AccountLookupError{name, windows.ERROR_NONE_MAPPED}
4447+ }
4448+
4449+ var sidSize, sidNameUse, refDomainSize uint32
4450+ err = lookupAccountName(nil, name, nil, &sidSize, nil, &refDomainSize, &sidNameUse)
4451+ if err != nil && err != syscall.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno
4452+ return "", &AccountLookupError{name, err}
4453+ }
4454+ sidBuffer := make([]byte, sidSize)
4455+ refDomainBuffer := make([]uint16, refDomainSize)
4456+ err = lookupAccountName(nil, name, &sidBuffer[0], &sidSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)
4457+ if err != nil {
4458+ return "", &AccountLookupError{name, err}
4459+ }
4460+ var strBuffer *uint16
4461+ err = convertSidToStringSid(&sidBuffer[0], &strBuffer)
4462+ if err != nil {
4463+ return "", &AccountLookupError{name, err}
4464+ }
4465+ sid = syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(strBuffer))[:])
4466+ localFree(uintptr(unsafe.Pointer(strBuffer)))
4467+ return sid, nil
4468+}
4469+
4470+// LookupNameBySid looks up the name of an account by SID
4471+//
4472+//revive:disable-next-line:var-naming SID, not Sid
4473+func LookupNameBySid(sid string) (name string, err error) {
4474+ if sid == "" {
4475+ return "", &AccountLookupError{sid, windows.ERROR_NONE_MAPPED}
4476+ }
4477+
4478+ sidBuffer, err := windows.UTF16PtrFromString(sid)
4479+ if err != nil {
4480+ return "", &AccountLookupError{sid, err}
4481+ }
4482+
4483+ var sidPtr *byte
4484+ if err = convertStringSidToSid(sidBuffer, &sidPtr); err != nil {
4485+ return "", &AccountLookupError{sid, err}
4486+ }
4487+ defer localFree(uintptr(unsafe.Pointer(sidPtr)))
4488+
4489+ var nameSize, refDomainSize, sidNameUse uint32
4490+ err = lookupAccountSid(nil, sidPtr, nil, &nameSize, nil, &refDomainSize, &sidNameUse)
4491+ if err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno
4492+ return "", &AccountLookupError{sid, err}
4493+ }
4494+
4495+ nameBuffer := make([]uint16, nameSize)
4496+ refDomainBuffer := make([]uint16, refDomainSize)
4497+ err = lookupAccountSid(nil, sidPtr, &nameBuffer[0], &nameSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)
4498+ if err != nil {
4499+ return "", &AccountLookupError{sid, err}
4500+ }
4501+
4502+ name = windows.UTF16ToString(nameBuffer)
4503+ return name, nil
4504+}
4505+
4506+func SddlToSecurityDescriptor(sddl string) ([]byte, error) {
4507+ var sdBuffer uintptr
4508+ err := convertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, &sdBuffer, nil)
4509+ if err != nil {
4510+ return nil, &SddlConversionError{sddl, err}
4511+ }
4512+ defer localFree(sdBuffer)
4513+ sd := make([]byte, getSecurityDescriptorLength(sdBuffer))
4514+ copy(sd, (*[0xffff]byte)(unsafe.Pointer(sdBuffer))[:len(sd)])
4515+ return sd, nil
4516+}
4517+
4518+func SecurityDescriptorToSddl(sd []byte) (string, error) {
4519+ var sddl *uint16
4520+ // The returned string length seems to include an arbitrary number of terminating NULs.
4521+ // Don't use it.
4522+ err := convertSecurityDescriptorToStringSecurityDescriptor(&sd[0], 1, 0xff, &sddl, nil)
4523+ if err != nil {
4524+ return "", err
4525+ }
4526+ defer localFree(uintptr(unsafe.Pointer(sddl)))
4527+ return syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(sddl))[:]), nil
4528+}
4529diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/syscall.go b/debian/extra/vendor/github.com/Microsoft/go-winio/syscall.go
4530new file mode 100644
4531index 0000000..a6ca111
4532--- /dev/null
4533+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/syscall.go
4534@@ -0,0 +1,5 @@
4535+//go:build windows
4536+
4537+package winio
4538+
4539+//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go ./*.go
4540diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/tools.go b/debian/extra/vendor/github.com/Microsoft/go-winio/tools.go
4541new file mode 100644
4542index 0000000..2aa0458
4543--- /dev/null
4544+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/tools.go
4545@@ -0,0 +1,5 @@
4546+//go:build tools
4547+
4548+package winio
4549+
4550+import _ "golang.org/x/tools/cmd/stringer"
4551diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go b/debian/extra/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
4552new file mode 100644
4553index 0000000..469b16f
4554--- /dev/null
4555+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
4556@@ -0,0 +1,419 @@
4557+//go:build windows
4558+
4559+// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
4560+
4561+package winio
4562+
4563+import (
4564+ "syscall"
4565+ "unsafe"
4566+
4567+ "golang.org/x/sys/windows"
4568+)
4569+
4570+var _ unsafe.Pointer
4571+
4572+// Do the interface allocations only once for common
4573+// Errno values.
4574+const (
4575+ errnoERROR_IO_PENDING = 997
4576+)
4577+
4578+var (
4579+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
4580+ errERROR_EINVAL error = syscall.EINVAL
4581+)
4582+
4583+// errnoErr returns common boxed Errno values, to prevent
4584+// allocations at runtime.
4585+func errnoErr(e syscall.Errno) error {
4586+ switch e {
4587+ case 0:
4588+ return errERROR_EINVAL
4589+ case errnoERROR_IO_PENDING:
4590+ return errERROR_IO_PENDING
4591+ }
4592+ // TODO: add more here, after collecting data on the common
4593+ // error values see on Windows. (perhaps when running
4594+ // all.bat?)
4595+ return e
4596+}
4597+
4598+var (
4599+ modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
4600+ modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
4601+ modntdll = windows.NewLazySystemDLL("ntdll.dll")
4602+ modws2_32 = windows.NewLazySystemDLL("ws2_32.dll")
4603+
4604+ procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
4605+ procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
4606+ procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
4607+ procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
4608+ procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
4609+ procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
4610+ procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
4611+ procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
4612+ procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
4613+ procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW")
4614+ procLookupPrivilegeNameW = modadvapi32.NewProc("LookupPrivilegeNameW")
4615+ procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
4616+ procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
4617+ procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
4618+ procBackupRead = modkernel32.NewProc("BackupRead")
4619+ procBackupWrite = modkernel32.NewProc("BackupWrite")
4620+ procCancelIoEx = modkernel32.NewProc("CancelIoEx")
4621+ procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
4622+ procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
4623+ procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
4624+ procGetCurrentThread = modkernel32.NewProc("GetCurrentThread")
4625+ procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
4626+ procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
4627+ procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
4628+ procLocalAlloc = modkernel32.NewProc("LocalAlloc")
4629+ procLocalFree = modkernel32.NewProc("LocalFree")
4630+ procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
4631+ procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
4632+ procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl")
4633+ procRtlDosPathNameToNtPathName_U = modntdll.NewProc("RtlDosPathNameToNtPathName_U")
4634+ procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb")
4635+ procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult")
4636+)
4637+
4638+func adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) {
4639+ var _p0 uint32
4640+ if releaseAll {
4641+ _p0 = 1
4642+ }
4643+ r0, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(input)), uintptr(outputSize), uintptr(unsafe.Pointer(output)), uintptr(unsafe.Pointer(requiredSize)))
4644+ success = r0 != 0
4645+ if true {
4646+ err = errnoErr(e1)
4647+ }
4648+ return
4649+}
4650+
4651+func convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) {
4652+ r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(secInfo), uintptr(unsafe.Pointer(sddl)), uintptr(unsafe.Pointer(sddlSize)), 0)
4653+ if r1 == 0 {
4654+ err = errnoErr(e1)
4655+ }
4656+ return
4657+}
4658+
4659+func convertSidToStringSid(sid *byte, str **uint16) (err error) {
4660+ r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(str)), 0)
4661+ if r1 == 0 {
4662+ err = errnoErr(e1)
4663+ }
4664+ return
4665+}
4666+
4667+func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) {
4668+ var _p0 *uint16
4669+ _p0, err = syscall.UTF16PtrFromString(str)
4670+ if err != nil {
4671+ return
4672+ }
4673+ return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
4674+}
4675+
4676+func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd *uintptr, size *uint32) (err error) {
4677+ r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
4678+ if r1 == 0 {
4679+ err = errnoErr(e1)
4680+ }
4681+ return
4682+}
4683+
4684+func convertStringSidToSid(str *uint16, sid **byte) (err error) {
4685+ r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(sid)), 0)
4686+ if r1 == 0 {
4687+ err = errnoErr(e1)
4688+ }
4689+ return
4690+}
4691+
4692+func getSecurityDescriptorLength(sd uintptr) (len uint32) {
4693+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(sd), 0, 0)
4694+ len = uint32(r0)
4695+ return
4696+}
4697+
4698+func impersonateSelf(level uint32) (err error) {
4699+ r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(level), 0, 0)
4700+ if r1 == 0 {
4701+ err = errnoErr(e1)
4702+ }
4703+ return
4704+}
4705+
4706+func lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
4707+ var _p0 *uint16
4708+ _p0, err = syscall.UTF16PtrFromString(accountName)
4709+ if err != nil {
4710+ return
4711+ }
4712+ return _lookupAccountName(systemName, _p0, sid, sidSize, refDomain, refDomainSize, sidNameUse)
4713+}
4714+
4715+func _lookupAccountName(systemName *uint16, accountName *uint16, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
4716+ r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse)), 0, 0)
4717+ if r1 == 0 {
4718+ err = errnoErr(e1)
4719+ }
4720+ return
4721+}
4722+
4723+func lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
4724+ r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse)), 0, 0)
4725+ if r1 == 0 {
4726+ err = errnoErr(e1)
4727+ }
4728+ return
4729+}
4730+
4731+func lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
4732+ var _p0 *uint16
4733+ _p0, err = syscall.UTF16PtrFromString(systemName)
4734+ if err != nil {
4735+ return
4736+ }
4737+ return _lookupPrivilegeDisplayName(_p0, name, buffer, size, languageId)
4738+}
4739+
4740+func _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
4741+ r1, _, e1 := syscall.Syscall6(procLookupPrivilegeDisplayNameW.Addr(), 5, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(languageId)), 0)
4742+ if r1 == 0 {
4743+ err = errnoErr(e1)
4744+ }
4745+ return
4746+}
4747+
4748+func lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) {
4749+ var _p0 *uint16
4750+ _p0, err = syscall.UTF16PtrFromString(systemName)
4751+ if err != nil {
4752+ return
4753+ }
4754+ return _lookupPrivilegeName(_p0, luid, buffer, size)
4755+}
4756+
4757+func _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint16, size *uint32) (err error) {
4758+ r1, _, e1 := syscall.Syscall6(procLookupPrivilegeNameW.Addr(), 4, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(luid)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), 0, 0)
4759+ if r1 == 0 {
4760+ err = errnoErr(e1)
4761+ }
4762+ return
4763+}
4764+
4765+func lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) {
4766+ var _p0 *uint16
4767+ _p0, err = syscall.UTF16PtrFromString(systemName)
4768+ if err != nil {
4769+ return
4770+ }
4771+ var _p1 *uint16
4772+ _p1, err = syscall.UTF16PtrFromString(name)
4773+ if err != nil {
4774+ return
4775+ }
4776+ return _lookupPrivilegeValue(_p0, _p1, luid)
4777+}
4778+
4779+func _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint64) (err error) {
4780+ r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
4781+ if r1 == 0 {
4782+ err = errnoErr(e1)
4783+ }
4784+ return
4785+}
4786+
4787+func openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) {
4788+ var _p0 uint32
4789+ if openAsSelf {
4790+ _p0 = 1
4791+ }
4792+ r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(accessMask), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
4793+ if r1 == 0 {
4794+ err = errnoErr(e1)
4795+ }
4796+ return
4797+}
4798+
4799+func revertToSelf() (err error) {
4800+ r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
4801+ if r1 == 0 {
4802+ err = errnoErr(e1)
4803+ }
4804+ return
4805+}
4806+
4807+func backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
4808+ var _p0 *byte
4809+ if len(b) > 0 {
4810+ _p0 = &b[0]
4811+ }
4812+ var _p1 uint32
4813+ if abort {
4814+ _p1 = 1
4815+ }
4816+ var _p2 uint32
4817+ if processSecurity {
4818+ _p2 = 1
4819+ }
4820+ r1, _, e1 := syscall.Syscall9(procBackupRead.Addr(), 7, uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesRead)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)), 0, 0)
4821+ if r1 == 0 {
4822+ err = errnoErr(e1)
4823+ }
4824+ return
4825+}
4826+
4827+func backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
4828+ var _p0 *byte
4829+ if len(b) > 0 {
4830+ _p0 = &b[0]
4831+ }
4832+ var _p1 uint32
4833+ if abort {
4834+ _p1 = 1
4835+ }
4836+ var _p2 uint32
4837+ if processSecurity {
4838+ _p2 = 1
4839+ }
4840+ r1, _, e1 := syscall.Syscall9(procBackupWrite.Addr(), 7, uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesWritten)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)), 0, 0)
4841+ if r1 == 0 {
4842+ err = errnoErr(e1)
4843+ }
4844+ return
4845+}
4846+
4847+func cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) {
4848+ r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(file), uintptr(unsafe.Pointer(o)), 0)
4849+ if r1 == 0 {
4850+ err = errnoErr(e1)
4851+ }
4852+ return
4853+}
4854+
4855+func connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) {
4856+ r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(o)), 0)
4857+ if r1 == 0 {
4858+ err = errnoErr(e1)
4859+ }
4860+ return
4861+}
4862+
4863+func createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) {
4864+ r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount), 0, 0)
4865+ newport = syscall.Handle(r0)
4866+ if newport == 0 {
4867+ err = errnoErr(e1)
4868+ }
4869+ return
4870+}
4871+
4872+func createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) {
4873+ var _p0 *uint16
4874+ _p0, err = syscall.UTF16PtrFromString(name)
4875+ if err != nil {
4876+ return
4877+ }
4878+ return _createNamedPipe(_p0, flags, pipeMode, maxInstances, outSize, inSize, defaultTimeout, sa)
4879+}
4880+
4881+func _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) {
4882+ r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0)
4883+ handle = syscall.Handle(r0)
4884+ if handle == syscall.InvalidHandle {
4885+ err = errnoErr(e1)
4886+ }
4887+ return
4888+}
4889+
4890+func getCurrentThread() (h syscall.Handle) {
4891+ r0, _, _ := syscall.Syscall(procGetCurrentThread.Addr(), 0, 0, 0, 0)
4892+ h = syscall.Handle(r0)
4893+ return
4894+}
4895+
4896+func getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
4897+ r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0)
4898+ if r1 == 0 {
4899+ err = errnoErr(e1)
4900+ }
4901+ return
4902+}
4903+
4904+func getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
4905+ r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0)
4906+ if r1 == 0 {
4907+ err = errnoErr(e1)
4908+ }
4909+ return
4910+}
4911+
4912+func getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) {
4913+ r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(port), uintptr(unsafe.Pointer(bytes)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(o)), uintptr(timeout), 0)
4914+ if r1 == 0 {
4915+ err = errnoErr(e1)
4916+ }
4917+ return
4918+}
4919+
4920+func localAlloc(uFlags uint32, length uint32) (ptr uintptr) {
4921+ r0, _, _ := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(uFlags), uintptr(length), 0)
4922+ ptr = uintptr(r0)
4923+ return
4924+}
4925+
4926+func localFree(mem uintptr) {
4927+ syscall.Syscall(procLocalFree.Addr(), 1, uintptr(mem), 0, 0)
4928+ return
4929+}
4930+
4931+func setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) {
4932+ r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(h), uintptr(flags), 0)
4933+ if r1 == 0 {
4934+ err = errnoErr(e1)
4935+ }
4936+ return
4937+}
4938+
4939+func ntCreateNamedPipeFile(pipe *syscall.Handle, access uint32, oa *objectAttributes, iosb *ioStatusBlock, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) {
4940+ r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0)
4941+ status = ntStatus(r0)
4942+ return
4943+}
4944+
4945+func rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) {
4946+ r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(dacl)), 0, 0)
4947+ status = ntStatus(r0)
4948+ return
4949+}
4950+
4951+func rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) {
4952+ r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ntName)), uintptr(filePart), uintptr(reserved), 0, 0)
4953+ status = ntStatus(r0)
4954+ return
4955+}
4956+
4957+func rtlNtStatusToDosError(status ntStatus) (winerr error) {
4958+ r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(status), 0, 0)
4959+ if r0 != 0 {
4960+ winerr = syscall.Errno(r0)
4961+ }
4962+ return
4963+}
4964+
4965+func wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) {
4966+ var _p0 uint32
4967+ if wait {
4968+ _p0 = 1
4969+ }
4970+ r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0)
4971+ if r1 == 0 {
4972+ err = errnoErr(e1)
4973+ }
4974+ return
4975+}
4976diff --git a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go
4977index 6c16c25..c6f66f1 100644
4978--- a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go
4979+++ b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go
4980@@ -56,6 +56,7 @@ type Unmarshaler struct {
4981 // implement JSONPBMarshaler so that the custom format can be produced.
4982 //
4983 // The JSON unmarshaling must follow the JSON to proto specification:
4984+//
4985 // https://developers.google.com/protocol-buffers/docs/proto3#json
4986 //
4987 // Deprecated: Custom types should implement protobuf reflection instead.
4988diff --git a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go
4989index 685c80a..e9438a9 100644
4990--- a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go
4991+++ b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go
4992@@ -55,6 +55,7 @@ type Marshaler struct {
4993 // implement JSONPBUnmarshaler so that the custom format can be parsed.
4994 //
4995 // The JSON marshaling must follow the proto to JSON specification:
4996+//
4997 // https://developers.google.com/protocol-buffers/docs/proto3#json
4998 //
4999 // Deprecated: Custom types should implement protobuf reflection instead.
5000diff --git a/debian/extra/vendor/github.com/golang/protobuf/ptypes/any.go b/debian/extra/vendor/github.com/golang/protobuf/ptypes/any.go
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches