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
diff --git a/.gitignore b/.gitignore
index 2ceee21..85eb02e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,15 @@
1# ignore all built binaries1# Ignore all built binaries.
2**/gce_workload_cert_refresh2**/gce_workload_cert_refresh
3**/gce_workload_cert_refresh.exe
3**/google_authorized_keys4**/google_authorized_keys
5**/google_authorized_keys.exe
4**/google_guest_agent6**/google_guest_agent
7**/google_guest_agent.exe
5**/google_metadata_script_runner8**/google_metadata_script_runner
9**/google_metadata_script_runner.exe
10
11# Don't ignore new content to directories.
12!**/gce_workload_cert_refresh/
13!**/google_authorized_keys/
14!**/google_guest_agent/
15!**/google_metadata_script_runner/
6\ No newline at end of file16\ No newline at end of file
diff --git a/OWNERS b/OWNERS
index edde10e..9f473d5 100644
--- a/OWNERS
+++ b/OWNERS
@@ -3,14 +3,15 @@
33
4approvers:4approvers:
5 - a-crate5 - a-crate
6 - ajorg
6 - bkatyl7 - bkatyl
7 - chaitanyakulkarni288 - chaitanyakulkarni28
8 - dorileo9 - dorileo
9 - drewhli10 - drewhli
10 - elicriffield11 - elicriffield
12 - gaughen
11 - jjerger13 - jjerger
12 - karnvadaliya14 - karnvadaliya
13 - koln6715 - koln67
14 - quintonamore16 - quintonamore
15 - vorakl
16 - zmarano17 - zmarano
diff --git a/THIRD_PARTY_LICENSES/github.com/Microsoft/go-winio/LICENSE b/THIRD_PARTY_LICENSES/github.com/Microsoft/go-winio/LICENSE
17new file mode 10064418new file mode 100644
index 0000000..b8b569d
--- /dev/null
+++ b/THIRD_PARTY_LICENSES/github.com/Microsoft/go-winio/LICENSE
@@ -0,0 +1,22 @@
1The MIT License (MIT)
2
3Copyright (c) 2015 Microsoft
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
22
diff --git a/THIRD_PARTY_LICENSES/github.com/hashicorp/hcl/LICENSE b/THIRD_PARTY_LICENSES/github.com/hashicorp/hcl/LICENSE
0new file mode 10064423new file mode 100644
index 0000000..e25da5f
--- /dev/null
+++ b/THIRD_PARTY_LICENSES/github.com/hashicorp/hcl/LICENSE
@@ -0,0 +1,355 @@
1Copyright (c) 2014 HashiCorp, Inc.
2
3Mozilla Public License, version 2.0
4
51. Definitions
6
71.1. “Contributor”
8
9 means each individual or legal entity that creates, contributes to the
10 creation of, or owns Covered Software.
11
121.2. “Contributor Version”
13
14 means the combination of the Contributions of others (if any) used by a
15 Contributor and that particular Contributor’s Contribution.
16
171.3. “Contribution”
18
19 means Covered Software of a particular Contributor.
20
211.4. “Covered Software”
22
23 means Source Code Form to which the initial Contributor has attached the
24 notice in Exhibit A, the Executable Form of such Source Code Form, and
25 Modifications of such Source Code Form, in each case including portions
26 thereof.
27
281.5. “Incompatible With Secondary Licenses”
29 means
30
31 a. that the initial Contributor has attached the notice described in
32 Exhibit B to the Covered Software; or
33
34 b. that the Covered Software was made available under the terms of version
35 1.1 or earlier of the License, but not also under the terms of a
36 Secondary License.
37
381.6. “Executable Form”
39
40 means any form of the work other than Source Code Form.
41
421.7. “Larger Work”
43
44 means a work that combines Covered Software with other material, in a separate
45 file or files, that is not Covered Software.
46
471.8. “License”
48
49 means this document.
50
511.9. “Licensable”
52
53 means having the right to grant, to the maximum extent possible, whether at the
54 time of the initial grant or subsequently, any and all of the rights conveyed by
55 this License.
56
571.10. “Modifications”
58
59 means any of the following:
60
61 a. any file in Source Code Form that results from an addition to, deletion
62 from, or modification of the contents of Covered Software; or
63
64 b. any new file in Source Code Form that contains any Covered Software.
65
661.11. “Patent Claims” of a Contributor
67
68 means any patent claim(s), including without limitation, method, process,
69 and apparatus claims, in any patent Licensable by such Contributor that
70 would be infringed, but for the grant of the License, by the making,
71 using, selling, offering for sale, having made, import, or transfer of
72 either its Contributions or its Contributor Version.
73
741.12. “Secondary License”
75
76 means either the GNU General Public License, Version 2.0, the GNU Lesser
77 General Public License, Version 2.1, the GNU Affero General Public
78 License, Version 3.0, or any later versions of those licenses.
79
801.13. “Source Code Form”
81
82 means the form of the work preferred for making modifications.
83
841.14. “You” (or “Your”)
85
86 means an individual or a legal entity exercising rights under this
87 License. For legal entities, “You” includes any entity that controls, is
88 controlled by, or is under common control with You. For purposes of this
89 definition, “control” means (a) the power, direct or indirect, to cause
90 the direction or management of such entity, whether by contract or
91 otherwise, or (b) ownership of more than fifty percent (50%) of the
92 outstanding shares or beneficial ownership of such entity.
93
94
952. License Grants and Conditions
96
972.1. Grants
98
99 Each Contributor hereby grants You a world-wide, royalty-free,
100 non-exclusive license:
101
102 a. under intellectual property rights (other than patent or trademark)
103 Licensable by such Contributor to use, reproduce, make available,
104 modify, display, perform, distribute, and otherwise exploit its
105 Contributions, either on an unmodified basis, with Modifications, or as
106 part of a Larger Work; and
107
108 b. under Patent Claims of such Contributor to make, use, sell, offer for
109 sale, have made, import, and otherwise transfer either its Contributions
110 or its Contributor Version.
111
1122.2. Effective Date
113
114 The licenses granted in Section 2.1 with respect to any Contribution become
115 effective for each Contribution on the date the Contributor first distributes
116 such Contribution.
117
1182.3. Limitations on Grant Scope
119
120 The licenses granted in this Section 2 are the only rights granted under this
121 License. No additional rights or licenses will be implied from the distribution
122 or licensing of Covered Software under this License. Notwithstanding Section
123 2.1(b) above, no patent license is granted by a Contributor:
124
125 a. for any code that a Contributor has removed from Covered Software; or
126
127 b. for infringements caused by: (i) Your and any other third party’s
128 modifications of Covered Software, or (ii) the combination of its
129 Contributions with other software (except as part of its Contributor
130 Version); or
131
132 c. under Patent Claims infringed by Covered Software in the absence of its
133 Contributions.
134
135 This License does not grant any rights in the trademarks, service marks, or
136 logos of any Contributor (except as may be necessary to comply with the
137 notice requirements in Section 3.4).
138
1392.4. Subsequent Licenses
140
141 No Contributor makes additional grants as a result of Your choice to
142 distribute the Covered Software under a subsequent version of this License
143 (see Section 10.2) or under the terms of a Secondary License (if permitted
144 under the terms of Section 3.3).
145
1462.5. Representation
147
148 Each Contributor represents that the Contributor believes its Contributions
149 are its original creation(s) or it has sufficient rights to grant the
150 rights to its Contributions conveyed by this License.
151
1522.6. Fair Use
153
154 This License is not intended to limit any rights You have under applicable
155 copyright doctrines of fair use, fair dealing, or other equivalents.
156
1572.7. Conditions
158
159 Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
160 Section 2.1.
161
162
1633. Responsibilities
164
1653.1. Distribution of Source Form
166
167 All distribution of Covered Software in Source Code Form, including any
168 Modifications that You create or to which You contribute, must be under the
169 terms of this License. You must inform recipients that the Source Code Form
170 of the Covered Software is governed by the terms of this License, and how
171 they can obtain a copy of this License. You may not attempt to alter or
172 restrict the recipients’ rights in the Source Code Form.
173
1743.2. Distribution of Executable Form
175
176 If You distribute Covered Software in Executable Form then:
177
178 a. such Covered Software must also be made available in Source Code Form,
179 as described in Section 3.1, and You must inform recipients of the
180 Executable Form how they can obtain a copy of such Source Code Form by
181 reasonable means in a timely manner, at a charge no more than the cost
182 of distribution to the recipient; and
183
184 b. You may distribute such Executable Form under the terms of this License,
185 or sublicense it under different terms, provided that the license for
186 the Executable Form does not attempt to limit or alter the recipients’
187 rights in the Source Code Form under this License.
188
1893.3. Distribution of a Larger Work
190
191 You may create and distribute a Larger Work under terms of Your choice,
192 provided that You also comply with the requirements of this License for the
193 Covered Software. If the Larger Work is a combination of Covered Software
194 with a work governed by one or more Secondary Licenses, and the Covered
195 Software is not Incompatible With Secondary Licenses, this License permits
196 You to additionally distribute such Covered Software under the terms of
197 such Secondary License(s), so that the recipient of the Larger Work may, at
198 their option, further distribute the Covered Software under the terms of
199 either this License or such Secondary License(s).
200
2013.4. Notices
202
203 You may not remove or alter the substance of any license notices (including
204 copyright notices, patent notices, disclaimers of warranty, or limitations
205 of liability) contained within the Source Code Form of the Covered
206 Software, except that You may alter any license notices to the extent
207 required to remedy known factual inaccuracies.
208
2093.5. Application of Additional Terms
210
211 You may choose to offer, and to charge a fee for, warranty, support,
212 indemnity or liability obligations to one or more recipients of Covered
213 Software. However, You may do so only on Your own behalf, and not on behalf
214 of any Contributor. You must make it absolutely clear that any such
215 warranty, support, indemnity, or liability obligation is offered by You
216 alone, and You hereby agree to indemnify every Contributor for any
217 liability incurred by such Contributor as a result of warranty, support,
218 indemnity or liability terms You offer. You may include additional
219 disclaimers of warranty and limitations of liability specific to any
220 jurisdiction.
221
2224. Inability to Comply Due to Statute or Regulation
223
224 If it is impossible for You to comply with any of the terms of this License
225 with respect to some or all of the Covered Software due to statute, judicial
226 order, or regulation then You must: (a) comply with the terms of this License
227 to the maximum extent possible; and (b) describe the limitations and the code
228 they affect. Such description must be placed in a text file included with all
229 distributions of the Covered Software under this License. Except to the
230 extent prohibited by statute or regulation, such description must be
231 sufficiently detailed for a recipient of ordinary skill to be able to
232 understand it.
233
2345. Termination
235
2365.1. The rights granted under this License will terminate automatically if You
237 fail to comply with any of its terms. However, if You become compliant,
238 then the rights granted under this License from a particular Contributor
239 are reinstated (a) provisionally, unless and until such Contributor
240 explicitly and finally terminates Your grants, and (b) on an ongoing basis,
241 if such Contributor fails to notify You of the non-compliance by some
242 reasonable means prior to 60 days after You have come back into compliance.
243 Moreover, Your grants from a particular Contributor are reinstated on an
244 ongoing basis if such Contributor notifies You of the non-compliance by
245 some reasonable means, this is the first time You have received notice of
246 non-compliance with this License from such Contributor, and You become
247 compliant prior to 30 days after Your receipt of the notice.
248
2495.2. If You initiate litigation against any entity by asserting a patent
250 infringement claim (excluding declaratory judgment actions, counter-claims,
251 and cross-claims) alleging that a Contributor Version directly or
252 indirectly infringes any patent, then the rights granted to You by any and
253 all Contributors for the Covered Software under Section 2.1 of this License
254 shall terminate.
255
2565.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
257 license agreements (excluding distributors and resellers) which have been
258 validly granted by You or Your distributors under this License prior to
259 termination shall survive termination.
260
2616. Disclaimer of Warranty
262
263 Covered Software is provided under this License on an “as is” basis, without
264 warranty of any kind, either expressed, implied, or statutory, including,
265 without limitation, warranties that the Covered Software is free of defects,
266 merchantable, fit for a particular purpose or non-infringing. The entire
267 risk as to the quality and performance of the Covered Software is with You.
268 Should any Covered Software prove defective in any respect, You (not any
269 Contributor) assume the cost of any necessary servicing, repair, or
270 correction. This disclaimer of warranty constitutes an essential part of this
271 License. No use of any Covered Software is authorized under this License
272 except under this disclaimer.
273
2747. Limitation of Liability
275
276 Under no circumstances and under no legal theory, whether tort (including
277 negligence), contract, or otherwise, shall any Contributor, or anyone who
278 distributes Covered Software as permitted above, be liable to You for any
279 direct, indirect, special, incidental, or consequential damages of any
280 character including, without limitation, damages for lost profits, loss of
281 goodwill, work stoppage, computer failure or malfunction, or any and all
282 other commercial damages or losses, even if such party shall have been
283 informed of the possibility of such damages. This limitation of liability
284 shall not apply to liability for death or personal injury resulting from such
285 party’s negligence to the extent applicable law prohibits such limitation.
286 Some jurisdictions do not allow the exclusion or limitation of incidental or
287 consequential damages, so this exclusion and limitation may not apply to You.
288
2898. Litigation
290
291 Any litigation relating to this License may be brought only in the courts of
292 a jurisdiction where the defendant maintains its principal place of business
293 and such litigation shall be governed by laws of that jurisdiction, without
294 reference to its conflict-of-law provisions. Nothing in this Section shall
295 prevent a party’s ability to bring cross-claims or counter-claims.
296
2979. Miscellaneous
298
299 This License represents the complete agreement concerning the subject matter
300 hereof. If any provision of this License is held to be unenforceable, such
301 provision shall be reformed only to the extent necessary to make it
302 enforceable. Any law or regulation which provides that the language of a
303 contract shall be construed against the drafter shall not be used to construe
304 this License against a Contributor.
305
306
30710. Versions of the License
308
30910.1. New Versions
310
311 Mozilla Foundation is the license steward. Except as provided in Section
312 10.3, no one other than the license steward has the right to modify or
313 publish new versions of this License. Each version will be given a
314 distinguishing version number.
315
31610.2. Effect of New Versions
317
318 You may distribute the Covered Software under the terms of the version of
319 the License under which You originally received the Covered Software, or
320 under the terms of any subsequent version published by the license
321 steward.
322
32310.3. Modified Versions
324
325 If you create software not governed by this License, and you want to
326 create a new license for such software, you may create and use a modified
327 version of this License if you rename the license and remove any
328 references to the name of the license steward (except to note that such
329 modified license differs from this License).
330
33110.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
332 If You choose to distribute Source Code Form that is Incompatible With
333 Secondary Licenses under the terms of this version of the License, the
334 notice described in Exhibit B of this License must be attached.
335
336Exhibit A - Source Code Form License Notice
337
338 This Source Code Form is subject to the
339 terms of the Mozilla Public License, v.
340 2.0. If a copy of the MPL was not
341 distributed with this file, You can
342 obtain one at
343 http://mozilla.org/MPL/2.0/.
344
345If it is not possible or desirable to put the notice in a particular file, then
346You may include the notice in a location (such as a LICENSE file in a relevant
347directory) where a recipient would be likely to look for such a notice.
348
349You may add additional accurate notices of copyright ownership.
350
351Exhibit B - “Incompatible With Secondary Licenses” Notice
352
353 This Source Code Form is “Incompatible
354 With Secondary Licenses”, as defined by
355 the Mozilla Public License, v. 2.0.
diff --git a/THIRD_PARTY_LICENSES/github.com/mitchellh/go-homedir/LICENSE b/THIRD_PARTY_LICENSES/github.com/mitchellh/go-homedir/LICENSE
0new file mode 100644356new file mode 100644
index 0000000..f9c841a
--- /dev/null
+++ b/THIRD_PARTY_LICENSES/github.com/mitchellh/go-homedir/LICENSE
@@ -0,0 +1,21 @@
1The MIT License (MIT)
2
3Copyright (c) 2013 Mitchell Hashimoto
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21THE SOFTWARE.
diff --git a/THIRD_PARTY_LICENSES/golang.org/x/mod/LICENSE b/THIRD_PARTY_LICENSES/golang.org/x/mod/LICENSE
0new file mode 10064422new file mode 100644
index 0000000..6a66aea
--- /dev/null
+++ b/THIRD_PARTY_LICENSES/golang.org/x/mod/LICENSE
@@ -0,0 +1,27 @@
1Copyright (c) 2009 The Go Authors. All rights reserved.
2
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are
5met:
6
7 * Redistributions of source code must retain the above copyright
8notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above
10copyright notice, this list of conditions and the following disclaimer
11in the documentation and/or other materials provided with the
12distribution.
13 * Neither the name of Google Inc. nor the names of its
14contributors may be used to endorse or promote products derived from
15this software without specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/THIRD_PARTY_LICENSES/golang.org/x/tools/LICENSE b/THIRD_PARTY_LICENSES/golang.org/x/tools/LICENSE
0new file mode 10064428new file mode 100644
index 0000000..6a66aea
--- /dev/null
+++ b/THIRD_PARTY_LICENSES/golang.org/x/tools/LICENSE
@@ -0,0 +1,27 @@
1Copyright (c) 2009 The Go Authors. All rights reserved.
2
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are
5met:
6
7 * Redistributions of source code must retain the above copyright
8notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above
10copyright notice, this list of conditions and the following disclaimer
11in the documentation and/or other materials provided with the
12distribution.
13 * Neither the name of Google Inc. nor the names of its
14contributors may be used to endorse or promote products derived from
15this software without specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/changelog b/debian/changelog
index 1003e9b..3633e5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,81 @@
1google-guest-agent (20240716.00-0ubuntu1~18.04.0ubuntu1) bionic; urgency=medium
2
3 * Rebuild for Bionic Beaver (LP: #2073163)
4
5 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Thu, 22 Aug 2024 20:36:29 +0100
6
7google-guest-agent (20240716.00-0ubuntu1~20.04.0) focal; urgency=medium
8
9 * No-change rebuild for Focal.
10
11 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Thu, 25 Jul 2024 20:01:29 +0100
12
13google-guest-agent (20240716.00-0ubuntu1) oracular; urgency=medium
14
15 [ Utkarsh Gupta ]
16 * New upstream version 20240716.00. (LP: #2073163)
17 * Update vendored dependencies.
18 * Set DH_GOLANG_INSTALL_EXTRA to editions_defaults.binpb.
19
20 [ Chloé Smith ]
21 * d/p/0006-add-after-cloud-config-service.patch: add patch
22 to force ordering between cloud-init and the guest agent.
23 (LP: #2057965)
24
25 -- Utkarsh Gupta <utkarsh@ubuntu.com> Thu, 18 Jul 2024 23:47:17 +0530
26
27google-guest-agent (20240213.00-0ubuntu4) oracular; urgency=medium
28
29 * SECURITY UPDATE: Denial of service
30 - debian/extra/vendor/googgle.golang.org/protobuf was
31 patched with a backport of f01a588e5810b90996452eec4a28f22a0afae023
32 in files encoding/protojson/well_known_types.go,
33 internal/encoding/json/decode.go.
34 - debian/extra/vendor adding patches-applied and README.txt for
35 track/documentation propose about patches applied in vendored sources.
36 - CVE-2024-24786
37
38 -- Leonidas Da Silva Barbosa <leo.barbosa@canonical.com> Wed, 12 Jun 2024 10:15:12 -0300
39
40google-guest-agent (20240213.00-0ubuntu3) noble; urgency=medium
41
42 * No-change rebuild against Go 1.22.
43
44 -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 08 Apr 2024 14:53:33 +1200
45
46google-guest-agent (20240213.00-0ubuntu2) noble; urgency=medium
47
48 * No-change rebuild for CVE-2024-3094
49
50 -- William Grant <wgrant@ubuntu.com> Mon, 01 Apr 2024 16:50:39 +1100
51
52google-guest-agent (20240213.00-0ubuntu1) noble; urgency=medium
53
54 [ Utkarsh Gupta ]
55 * Add a reason to include include-binaries file.
56
57 [ Chloé 'kajiya' Smith ]
58 * New upstream version, v20240213.00. (LP: #2054484)
59 * d/extra/vendor: Update the vendored dependencies.
60 * d/source/include-binaries: add new file.
61
62 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Wed, 21 Feb 2024 00:25:47 +0000
63
64google-guest-agent (20231004.02-0ubuntu3) noble; urgency=medium
65
66 * d/control: Fix dependency version of `google-compute-engine-oslogin`
67 to match archive (LP: #2050956)
68
69 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Fri, 26 Jan 2024 15:12:02 +0000
70
71google-guest-agent (20231004.02-0ubuntu2) noble; urgency=medium
72
73 * d/control: There should b a dependency on `google-compute-engine-oslogin`
74 to match the Google managed control file (LP: #2050956)
75 * Also updated the `Vcs-` fields and removed the `Uploaders` field.
76
77 -- Chloé 'kajiya' Smith <chloe.smith@canonical.com> Tue, 23 Jan 2024 13:43:24 +0000
78
1google-guest-agent (20231004.02-0ubuntu1~18.04.2) bionic; urgency=medium79google-guest-agent (20231004.02-0ubuntu1~18.04.2) bionic; urgency=medium
280
3 * Use dh-golang >= 1.34.3 for building g-g-a.81 * Use dh-golang >= 1.34.3 for building g-g-a.
diff --git a/debian/control b/debian/control
index 0d54633..cec7c17 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,8 @@ XS-Go-Import-Path: github.com/GoogleCloudPlatform/guest-agent
17Package: google-guest-agent17Package: google-guest-agent
18Architecture: any18Architecture: any
19Depends: ${misc:Depends},19Depends: ${misc:Depends},
20 ${shlibs:Depends}20 ${shlibs:Depends},
21 google-compute-engine-oslogin (>= 20231004.00-0ubuntu1)
21Built-Using: ${misc:Built-Using}22Built-Using: ${misc:Built-Using}
22Breaks: gce-compute-image-packages (<< 20191115),23Breaks: gce-compute-image-packages (<< 20191115),
23 python3-google-compute-engine24 python3-google-compute-engine
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/.gitattributes b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitattributes
24new file mode 10064425new file mode 100644
index 0000000..94f480d
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitattributes
@@ -0,0 +1 @@
1* text=auto eol=lf
0\ No newline at end of file2\ No newline at end of file
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/.gitignore b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitignore
1new file mode 1006443new file mode 100644
index 0000000..815e206
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/.gitignore
@@ -0,0 +1,10 @@
1.vscode/
2
3*.exe
4
5# testing
6testdata
7
8# go workspaces
9go.work
10go.work.sum
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/.golangci.yml b/debian/extra/vendor/github.com/Microsoft/go-winio/.golangci.yml
0new file mode 10064411new file mode 100644
index 0000000..7b503d2
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/.golangci.yml
@@ -0,0 +1,149 @@
1run:
2 skip-dirs:
3 - pkg/etw/sample
4
5linters:
6 enable:
7 # style
8 - containedctx # struct contains a context
9 - dupl # duplicate code
10 - errname # erorrs are named correctly
11 - nolintlint # "//nolint" directives are properly explained
12 - revive # golint replacement
13 - unconvert # unnecessary conversions
14 - wastedassign
15
16 # bugs, performance, unused, etc ...
17 - contextcheck # function uses a non-inherited context
18 - errorlint # errors not wrapped for 1.13
19 - exhaustive # check exhaustiveness of enum switch statements
20 - gofmt # files are gofmt'ed
21 - gosec # security
22 - nilerr # returns nil even with non-nil error
23 - unparam # unused function params
24
25issues:
26 exclude-rules:
27 # err is very often shadowed in nested scopes
28 - linters:
29 - govet
30 text: '^shadow: declaration of "err" shadows declaration'
31
32 # ignore long lines for skip autogen directives
33 - linters:
34 - revive
35 text: "^line-length-limit: "
36 source: "^//(go:generate|sys) "
37
38 #TODO: remove after upgrading to go1.18
39 # ignore comment spacing for nolint and sys directives
40 - linters:
41 - revive
42 text: "^comment-spacings: no space between comment delimiter and comment text"
43 source: "//(cspell:|nolint:|sys |todo)"
44
45 # not on go 1.18 yet, so no any
46 - linters:
47 - revive
48 text: "^use-any: since GO 1.18 'interface{}' can be replaced by 'any'"
49
50 # allow unjustified ignores of error checks in defer statements
51 - linters:
52 - nolintlint
53 text: "^directive `//nolint:errcheck` should provide explanation"
54 source: '^\s*defer '
55
56 # allow unjustified ignores of error lints for io.EOF
57 - linters:
58 - nolintlint
59 text: "^directive `//nolint:errorlint` should provide explanation"
60 source: '[=|!]= io.EOF'
61
62
63linters-settings:
64 exhaustive:
65 default-signifies-exhaustive: true
66 govet:
67 enable-all: true
68 disable:
69 # struct order is often for Win32 compat
70 # also, ignore pointer bytes/GC issues for now until performance becomes an issue
71 - fieldalignment
72 check-shadowing: true
73 nolintlint:
74 allow-leading-space: false
75 require-explanation: true
76 require-specific: true
77 revive:
78 # revive is more configurable than static check, so likely the preferred alternative to static-check
79 # (once the perf issue is solved: https://github.com/golangci/golangci-lint/issues/2997)
80 enable-all-rules:
81 true
82 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
83 rules:
84 # rules with required arguments
85 - name: argument-limit
86 disabled: true
87 - name: banned-characters
88 disabled: true
89 - name: cognitive-complexity
90 disabled: true
91 - name: cyclomatic
92 disabled: true
93 - name: file-header
94 disabled: true
95 - name: function-length
96 disabled: true
97 - name: function-result-limit
98 disabled: true
99 - name: max-public-structs
100 disabled: true
101 # geneally annoying rules
102 - name: add-constant # complains about any and all strings and integers
103 disabled: true
104 - name: confusing-naming # we frequently use "Foo()" and "foo()" together
105 disabled: true
106 - name: flag-parameter # excessive, and a common idiom we use
107 disabled: true
108 - name: unhandled-error # warns over common fmt.Print* and io.Close; rely on errcheck instead
109 disabled: true
110 # general config
111 - name: line-length-limit
112 arguments:
113 - 140
114 - name: var-naming
115 arguments:
116 - []
117 - - CID
118 - CRI
119 - CTRD
120 - DACL
121 - DLL
122 - DOS
123 - ETW
124 - FSCTL
125 - GCS
126 - GMSA
127 - HCS
128 - HV
129 - IO
130 - LCOW
131 - LDAP
132 - LPAC
133 - LTSC
134 - MMIO
135 - NT
136 - OCI
137 - PMEM
138 - PWSH
139 - RX
140 - SACl
141 - SID
142 - SMB
143 - TX
144 - VHD
145 - VHDX
146 - VMID
147 - VPCI
148 - WCOW
149 - WIM
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/CODEOWNERS b/debian/extra/vendor/github.com/Microsoft/go-winio/CODEOWNERS
0new file mode 100644150new file mode 100644
index 0000000..ae1b494
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/CODEOWNERS
@@ -0,0 +1 @@
1 * @microsoft/containerplat
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/LICENSE b/debian/extra/vendor/github.com/Microsoft/go-winio/LICENSE
0new file mode 1006442new file mode 100644
index 0000000..b8b569d
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/LICENSE
@@ -0,0 +1,22 @@
1The MIT License (MIT)
2
3Copyright (c) 2015 Microsoft
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
22
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/README.md b/debian/extra/vendor/github.com/Microsoft/go-winio/README.md
0new file mode 10064423new file mode 100644
index 0000000..7474b4f
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/README.md
@@ -0,0 +1,89 @@
1# 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)
2
3This repository contains utilities for efficiently performing Win32 IO operations in
4Go. Currently, this is focused on accessing named pipes and other file handles, and
5for using named pipes as a net transport.
6
7This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go
8to reuse the thread to schedule another goroutine. This limits support to Windows Vista and
9newer operating systems. This is similar to the implementation of network sockets in Go's net
10package.
11
12Please see the LICENSE file for licensing information.
13
14## Contributing
15
16This project welcomes contributions and suggestions.
17Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that
18you have the right to, and actually do, grant us the rights to use your contribution.
19For details, visit [Microsoft CLA](https://cla.microsoft.com).
20
21When you submit a pull request, a CLA-bot will automatically determine whether you need to
22provide a CLA and decorate the PR appropriately (e.g., label, comment).
23Simply follow the instructions provided by the bot.
24You will only need to do this once across all repos using our CLA.
25
26Additionally, the pull request pipeline requires the following steps to be performed before
27mergining.
28
29### Code Sign-Off
30
31We require that contributors sign their commits using [`git commit --signoff`][git-commit-s]
32to certify they either authored the work themselves or otherwise have permission to use it in this project.
33
34A range of commits can be signed off using [`git rebase --signoff`][git-rebase-s].
35
36Please see [the developer certificate](https://developercertificate.org) for more info,
37as well as to make sure that you can attest to the rules listed.
38Our CI uses the DCO Github app to ensure that all commits in a given PR are signed-off.
39
40### Linting
41
42Code must pass a linting stage, which uses [`golangci-lint`][lint].
43The linting settings are stored in [`.golangci.yaml`](./.golangci.yaml), and can be run
44automatically with VSCode by adding the following to your workspace or folder settings:
45
46```json
47 "go.lintTool": "golangci-lint",
48 "go.lintOnSave": "package",
49```
50
51Additional editor [integrations options are also available][lint-ide].
52
53Alternatively, `golangci-lint` can be [installed locally][lint-install] and run from the repo root:
54
55```shell
56# use . or specify a path to only lint a package
57# to show all lint errors, use flags "--max-issues-per-linter=0 --max-same-issues=0"
58> golangci-lint run ./...
59```
60
61### Go Generate
62
63The pipeline checks that auto-generated code, via `go generate`, are up to date.
64
65This can be done for the entire repo:
66
67```shell
68> go generate ./...
69```
70
71## Code of Conduct
72
73This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
74For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
75contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
76
77## Special Thanks
78
79Thanks to [natefinch][natefinch] for the inspiration for this library.
80See [npipe](https://github.com/natefinch/npipe) for another named pipe implementation.
81
82[lint]: https://golangci-lint.run/
83[lint-ide]: https://golangci-lint.run/usage/integrations/#editor-integration
84[lint-install]: https://golangci-lint.run/usage/install/#local-installation
85
86[git-commit-s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s
87[git-rebase-s]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---signoff
88
89[natefinch]: https://github.com/natefinch
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/SECURITY.md b/debian/extra/vendor/github.com/Microsoft/go-winio/SECURITY.md
0new file mode 10064490new file mode 100644
index 0000000..869fdfe
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/SECURITY.md
@@ -0,0 +1,41 @@
1<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
2
3## Security
4
5Microsoft 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/).
6
7If 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.
8
9## Reporting Security Issues
10
11**Please do not report security vulnerabilities through public GitHub issues.**
12
13Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14
15If 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).
16
17You 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).
18
19Please 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:
20
21 * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 * Full paths of source file(s) related to the manifestation of the issue
23 * The location of the affected source code (tag/branch/commit or direct URL)
24 * Any special configuration required to reproduce the issue
25 * Step-by-step instructions to reproduce the issue
26 * Proof-of-concept or exploit code (if possible)
27 * Impact of the issue, including how an attacker might exploit the issue
28
29This information will help us triage your report more quickly.
30
31If 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.
32
33## Preferred Languages
34
35We prefer all communications to be in English.
36
37## Policy
38
39Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40
41<!-- END MICROSOFT SECURITY.MD BLOCK -->
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/backup.go b/debian/extra/vendor/github.com/Microsoft/go-winio/backup.go
0new file mode 10064442new file mode 100644
index 0000000..09621c8
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/backup.go
@@ -0,0 +1,290 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "encoding/binary"
8 "errors"
9 "fmt"
10 "io"
11 "os"
12 "runtime"
13 "syscall"
14 "unicode/utf16"
15
16 "golang.org/x/sys/windows"
17)
18
19//sys backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead
20//sys backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite
21
22const (
23 BackupData = uint32(iota + 1)
24 BackupEaData
25 BackupSecurity
26 BackupAlternateData
27 BackupLink
28 BackupPropertyData
29 BackupObjectId //revive:disable-line:var-naming ID, not Id
30 BackupReparseData
31 BackupSparseBlock
32 BackupTxfsData
33)
34
35const (
36 StreamSparseAttributes = uint32(8)
37)
38
39//nolint:revive // var-naming: ALL_CAPS
40const (
41 WRITE_DAC = windows.WRITE_DAC
42 WRITE_OWNER = windows.WRITE_OWNER
43 ACCESS_SYSTEM_SECURITY = windows.ACCESS_SYSTEM_SECURITY
44)
45
46// BackupHeader represents a backup stream of a file.
47type BackupHeader struct {
48 //revive:disable-next-line:var-naming ID, not Id
49 Id uint32 // The backup stream ID
50 Attributes uint32 // Stream attributes
51 Size int64 // The size of the stream in bytes
52 Name string // The name of the stream (for BackupAlternateData only).
53 Offset int64 // The offset of the stream in the file (for BackupSparseBlock only).
54}
55
56type win32StreamID struct {
57 StreamID uint32
58 Attributes uint32
59 Size uint64
60 NameSize uint32
61}
62
63// BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series
64// of BackupHeader values.
65type BackupStreamReader struct {
66 r io.Reader
67 bytesLeft int64
68}
69
70// NewBackupStreamReader produces a BackupStreamReader from any io.Reader.
71func NewBackupStreamReader(r io.Reader) *BackupStreamReader {
72 return &BackupStreamReader{r, 0}
73}
74
75// Next returns the next backup stream and prepares for calls to Read(). It skips the remainder of the current stream if
76// it was not completely read.
77func (r *BackupStreamReader) Next() (*BackupHeader, error) {
78 if r.bytesLeft > 0 { //nolint:nestif // todo: flatten this
79 if s, ok := r.r.(io.Seeker); ok {
80 // Make sure Seek on io.SeekCurrent sometimes succeeds
81 // before trying the actual seek.
82 if _, err := s.Seek(0, io.SeekCurrent); err == nil {
83 if _, err = s.Seek(r.bytesLeft, io.SeekCurrent); err != nil {
84 return nil, err
85 }
86 r.bytesLeft = 0
87 }
88 }
89 if _, err := io.Copy(io.Discard, r); err != nil {
90 return nil, err
91 }
92 }
93 var wsi win32StreamID
94 if err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil {
95 return nil, err
96 }
97 hdr := &BackupHeader{
98 Id: wsi.StreamID,
99 Attributes: wsi.Attributes,
100 Size: int64(wsi.Size),
101 }
102 if wsi.NameSize != 0 {
103 name := make([]uint16, int(wsi.NameSize/2))
104 if err := binary.Read(r.r, binary.LittleEndian, name); err != nil {
105 return nil, err
106 }
107 hdr.Name = syscall.UTF16ToString(name)
108 }
109 if wsi.StreamID == BackupSparseBlock {
110 if err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil {
111 return nil, err
112 }
113 hdr.Size -= 8
114 }
115 r.bytesLeft = hdr.Size
116 return hdr, nil
117}
118
119// Read reads from the current backup stream.
120func (r *BackupStreamReader) Read(b []byte) (int, error) {
121 if r.bytesLeft == 0 {
122 return 0, io.EOF
123 }
124 if int64(len(b)) > r.bytesLeft {
125 b = b[:r.bytesLeft]
126 }
127 n, err := r.r.Read(b)
128 r.bytesLeft -= int64(n)
129 if err == io.EOF {
130 err = io.ErrUnexpectedEOF
131 } else if r.bytesLeft == 0 && err == nil {
132 err = io.EOF
133 }
134 return n, err
135}
136
137// BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API.
138type BackupStreamWriter struct {
139 w io.Writer
140 bytesLeft int64
141}
142
143// NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer.
144func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter {
145 return &BackupStreamWriter{w, 0}
146}
147
148// WriteHeader writes the next backup stream header and prepares for calls to Write().
149func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error {
150 if w.bytesLeft != 0 {
151 return fmt.Errorf("missing %d bytes", w.bytesLeft)
152 }
153 name := utf16.Encode([]rune(hdr.Name))
154 wsi := win32StreamID{
155 StreamID: hdr.Id,
156 Attributes: hdr.Attributes,
157 Size: uint64(hdr.Size),
158 NameSize: uint32(len(name) * 2),
159 }
160 if hdr.Id == BackupSparseBlock {
161 // Include space for the int64 block offset
162 wsi.Size += 8
163 }
164 if err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil {
165 return err
166 }
167 if len(name) != 0 {
168 if err := binary.Write(w.w, binary.LittleEndian, name); err != nil {
169 return err
170 }
171 }
172 if hdr.Id == BackupSparseBlock {
173 if err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil {
174 return err
175 }
176 }
177 w.bytesLeft = hdr.Size
178 return nil
179}
180
181// Write writes to the current backup stream.
182func (w *BackupStreamWriter) Write(b []byte) (int, error) {
183 if w.bytesLeft < int64(len(b)) {
184 return 0, fmt.Errorf("too many bytes by %d", int64(len(b))-w.bytesLeft)
185 }
186 n, err := w.w.Write(b)
187 w.bytesLeft -= int64(n)
188 return n, err
189}
190
191// BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API.
192type BackupFileReader struct {
193 f *os.File
194 includeSecurity bool
195 ctx uintptr
196}
197
198// NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true,
199// Read will attempt to read the security descriptor of the file.
200func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader {
201 r := &BackupFileReader{f, includeSecurity, 0}
202 return r
203}
204
205// Read reads a backup stream from the file by calling the Win32 API BackupRead().
206func (r *BackupFileReader) Read(b []byte) (int, error) {
207 var bytesRead uint32
208 err := backupRead(syscall.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx)
209 if err != nil {
210 return 0, &os.PathError{Op: "BackupRead", Path: r.f.Name(), Err: err}
211 }
212 runtime.KeepAlive(r.f)
213 if bytesRead == 0 {
214 return 0, io.EOF
215 }
216 return int(bytesRead), nil
217}
218
219// Close frees Win32 resources associated with the BackupFileReader. It does not close
220// the underlying file.
221func (r *BackupFileReader) Close() error {
222 if r.ctx != 0 {
223 _ = backupRead(syscall.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx)
224 runtime.KeepAlive(r.f)
225 r.ctx = 0
226 }
227 return nil
228}
229
230// BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API.
231type BackupFileWriter struct {
232 f *os.File
233 includeSecurity bool
234 ctx uintptr
235}
236
237// NewBackupFileWriter returns a new BackupFileWriter from a file handle. If includeSecurity is true,
238// Write() will attempt to restore the security descriptor from the stream.
239func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter {
240 w := &BackupFileWriter{f, includeSecurity, 0}
241 return w
242}
243
244// Write restores a portion of the file using the provided backup stream.
245func (w *BackupFileWriter) Write(b []byte) (int, error) {
246 var bytesWritten uint32
247 err := backupWrite(syscall.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx)
248 if err != nil {
249 return 0, &os.PathError{Op: "BackupWrite", Path: w.f.Name(), Err: err}
250 }
251 runtime.KeepAlive(w.f)
252 if int(bytesWritten) != len(b) {
253 return int(bytesWritten), errors.New("not all bytes could be written")
254 }
255 return len(b), nil
256}
257
258// Close frees Win32 resources associated with the BackupFileWriter. It does not
259// close the underlying file.
260func (w *BackupFileWriter) Close() error {
261 if w.ctx != 0 {
262 _ = backupWrite(syscall.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx)
263 runtime.KeepAlive(w.f)
264 w.ctx = 0
265 }
266 return nil
267}
268
269// OpenForBackup opens a file or directory, potentially skipping access checks if the backup
270// or restore privileges have been acquired.
271//
272// If the file opened was a directory, it cannot be used with Readdir().
273func OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) {
274 winPath, err := syscall.UTF16FromString(path)
275 if err != nil {
276 return nil, err
277 }
278 h, err := syscall.CreateFile(&winPath[0],
279 access,
280 share,
281 nil,
282 createmode,
283 syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OPEN_REPARSE_POINT,
284 0)
285 if err != nil {
286 err = &os.PathError{Op: "open", Path: path, Err: err}
287 return nil, err
288 }
289 return os.NewFile(uintptr(h), path), nil
290}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/doc.go b/debian/extra/vendor/github.com/Microsoft/go-winio/doc.go
0new file mode 100644291new file mode 100644
index 0000000..1f5bfe2
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/doc.go
@@ -0,0 +1,22 @@
1// This package provides utilities for efficiently performing Win32 IO operations in Go.
2// Currently, this package is provides support for genreal IO and management of
3// - named pipes
4// - files
5// - [Hyper-V sockets]
6//
7// This code is similar to Go's [net] package, and uses IO completion ports to avoid
8// blocking IO on system threads, allowing Go to reuse the thread to schedule other goroutines.
9//
10// This limits support to Windows Vista and newer operating systems.
11//
12// Additionally, this package provides support for:
13// - creating and managing GUIDs
14// - writing to [ETW]
15// - opening and manageing VHDs
16// - parsing [Windows Image files]
17// - auto-generating Win32 API code
18//
19// [Hyper-V sockets]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service
20// [ETW]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw-
21// [Windows Image files]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/work-with-windows-images
22package winio
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/ea.go b/debian/extra/vendor/github.com/Microsoft/go-winio/ea.go
0new file mode 10064423new file mode 100644
index 0000000..e104dbd
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/ea.go
@@ -0,0 +1,137 @@
1package winio
2
3import (
4 "bytes"
5 "encoding/binary"
6 "errors"
7)
8
9type fileFullEaInformation struct {
10 NextEntryOffset uint32
11 Flags uint8
12 NameLength uint8
13 ValueLength uint16
14}
15
16var (
17 fileFullEaInformationSize = binary.Size(&fileFullEaInformation{})
18
19 errInvalidEaBuffer = errors.New("invalid extended attribute buffer")
20 errEaNameTooLarge = errors.New("extended attribute name too large")
21 errEaValueTooLarge = errors.New("extended attribute value too large")
22)
23
24// ExtendedAttribute represents a single Windows EA.
25type ExtendedAttribute struct {
26 Name string
27 Value []byte
28 Flags uint8
29}
30
31func parseEa(b []byte) (ea ExtendedAttribute, nb []byte, err error) {
32 var info fileFullEaInformation
33 err = binary.Read(bytes.NewReader(b), binary.LittleEndian, &info)
34 if err != nil {
35 err = errInvalidEaBuffer
36 return ea, nb, err
37 }
38
39 nameOffset := fileFullEaInformationSize
40 nameLen := int(info.NameLength)
41 valueOffset := nameOffset + int(info.NameLength) + 1
42 valueLen := int(info.ValueLength)
43 nextOffset := int(info.NextEntryOffset)
44 if valueLen+valueOffset > len(b) || nextOffset < 0 || nextOffset > len(b) {
45 err = errInvalidEaBuffer
46 return ea, nb, err
47 }
48
49 ea.Name = string(b[nameOffset : nameOffset+nameLen])
50 ea.Value = b[valueOffset : valueOffset+valueLen]
51 ea.Flags = info.Flags
52 if info.NextEntryOffset != 0 {
53 nb = b[info.NextEntryOffset:]
54 }
55 return ea, nb, err
56}
57
58// DecodeExtendedAttributes decodes a list of EAs from a FILE_FULL_EA_INFORMATION
59// buffer retrieved from BackupRead, ZwQueryEaFile, etc.
60func DecodeExtendedAttributes(b []byte) (eas []ExtendedAttribute, err error) {
61 for len(b) != 0 {
62 ea, nb, err := parseEa(b)
63 if err != nil {
64 return nil, err
65 }
66
67 eas = append(eas, ea)
68 b = nb
69 }
70 return eas, err
71}
72
73func writeEa(buf *bytes.Buffer, ea *ExtendedAttribute, last bool) error {
74 if int(uint8(len(ea.Name))) != len(ea.Name) {
75 return errEaNameTooLarge
76 }
77 if int(uint16(len(ea.Value))) != len(ea.Value) {
78 return errEaValueTooLarge
79 }
80 entrySize := uint32(fileFullEaInformationSize + len(ea.Name) + 1 + len(ea.Value))
81 withPadding := (entrySize + 3) &^ 3
82 nextOffset := uint32(0)
83 if !last {
84 nextOffset = withPadding
85 }
86 info := fileFullEaInformation{
87 NextEntryOffset: nextOffset,
88 Flags: ea.Flags,
89 NameLength: uint8(len(ea.Name)),
90 ValueLength: uint16(len(ea.Value)),
91 }
92
93 err := binary.Write(buf, binary.LittleEndian, &info)
94 if err != nil {
95 return err
96 }
97
98 _, err = buf.Write([]byte(ea.Name))
99 if err != nil {
100 return err
101 }
102
103 err = buf.WriteByte(0)
104 if err != nil {
105 return err
106 }
107
108 _, err = buf.Write(ea.Value)
109 if err != nil {
110 return err
111 }
112
113 _, err = buf.Write([]byte{0, 0, 0}[0 : withPadding-entrySize])
114 if err != nil {
115 return err
116 }
117
118 return nil
119}
120
121// EncodeExtendedAttributes encodes a list of EAs into a FILE_FULL_EA_INFORMATION
122// buffer for use with BackupWrite, ZwSetEaFile, etc.
123func EncodeExtendedAttributes(eas []ExtendedAttribute) ([]byte, error) {
124 var buf bytes.Buffer
125 for i := range eas {
126 last := false
127 if i == len(eas)-1 {
128 last = true
129 }
130
131 err := writeEa(&buf, &eas[i], last)
132 if err != nil {
133 return nil, err
134 }
135 }
136 return buf.Bytes(), nil
137}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/file.go b/debian/extra/vendor/github.com/Microsoft/go-winio/file.go
0new file mode 100644138new file mode 100644
index 0000000..175a99d
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/file.go
@@ -0,0 +1,331 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "errors"
8 "io"
9 "runtime"
10 "sync"
11 "sync/atomic"
12 "syscall"
13 "time"
14
15 "golang.org/x/sys/windows"
16)
17
18//sys cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) = CancelIoEx
19//sys createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) = CreateIoCompletionPort
20//sys getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus
21//sys setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes
22//sys wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
23
24type atomicBool int32
25
26func (b *atomicBool) isSet() bool { return atomic.LoadInt32((*int32)(b)) != 0 }
27func (b *atomicBool) setFalse() { atomic.StoreInt32((*int32)(b), 0) }
28func (b *atomicBool) setTrue() { atomic.StoreInt32((*int32)(b), 1) }
29
30//revive:disable-next-line:predeclared Keep "new" to maintain consistency with "atomic" pkg
31func (b *atomicBool) swap(new bool) bool {
32 var newInt int32
33 if new {
34 newInt = 1
35 }
36 return atomic.SwapInt32((*int32)(b), newInt) == 1
37}
38
39var (
40 ErrFileClosed = errors.New("file has already been closed")
41 ErrTimeout = &timeoutError{}
42)
43
44type timeoutError struct{}
45
46func (*timeoutError) Error() string { return "i/o timeout" }
47func (*timeoutError) Timeout() bool { return true }
48func (*timeoutError) Temporary() bool { return true }
49
50type timeoutChan chan struct{}
51
52var ioInitOnce sync.Once
53var ioCompletionPort syscall.Handle
54
55// ioResult contains the result of an asynchronous IO operation.
56type ioResult struct {
57 bytes uint32
58 err error
59}
60
61// ioOperation represents an outstanding asynchronous Win32 IO.
62type ioOperation struct {
63 o syscall.Overlapped
64 ch chan ioResult
65}
66
67func initIO() {
68 h, err := createIoCompletionPort(syscall.InvalidHandle, 0, 0, 0xffffffff)
69 if err != nil {
70 panic(err)
71 }
72 ioCompletionPort = h
73 go ioCompletionProcessor(h)
74}
75
76// win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall.
77// It takes ownership of this handle and will close it if it is garbage collected.
78type win32File struct {
79 handle syscall.Handle
80 wg sync.WaitGroup
81 wgLock sync.RWMutex
82 closing atomicBool
83 socket bool
84 readDeadline deadlineHandler
85 writeDeadline deadlineHandler
86}
87
88type deadlineHandler struct {
89 setLock sync.Mutex
90 channel timeoutChan
91 channelLock sync.RWMutex
92 timer *time.Timer
93 timedout atomicBool
94}
95
96// makeWin32File makes a new win32File from an existing file handle.
97func makeWin32File(h syscall.Handle) (*win32File, error) {
98 f := &win32File{handle: h}
99 ioInitOnce.Do(initIO)
100 _, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff)
101 if err != nil {
102 return nil, err
103 }
104 err = setFileCompletionNotificationModes(h, windows.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS|windows.FILE_SKIP_SET_EVENT_ON_HANDLE)
105 if err != nil {
106 return nil, err
107 }
108 f.readDeadline.channel = make(timeoutChan)
109 f.writeDeadline.channel = make(timeoutChan)
110 return f, nil
111}
112
113func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) {
114 // If we return the result of makeWin32File directly, it can result in an
115 // interface-wrapped nil, rather than a nil interface value.
116 f, err := makeWin32File(h)
117 if err != nil {
118 return nil, err
119 }
120 return f, nil
121}
122
123// closeHandle closes the resources associated with a Win32 handle.
124func (f *win32File) closeHandle() {
125 f.wgLock.Lock()
126 // Atomically set that we are closing, releasing the resources only once.
127 if !f.closing.swap(true) {
128 f.wgLock.Unlock()
129 // cancel all IO and wait for it to complete
130 _ = cancelIoEx(f.handle, nil)
131 f.wg.Wait()
132 // at this point, no new IO can start
133 syscall.Close(f.handle)
134 f.handle = 0
135 } else {
136 f.wgLock.Unlock()
137 }
138}
139
140// Close closes a win32File.
141func (f *win32File) Close() error {
142 f.closeHandle()
143 return nil
144}
145
146// IsClosed checks if the file has been closed.
147func (f *win32File) IsClosed() bool {
148 return f.closing.isSet()
149}
150
151// prepareIO prepares for a new IO operation.
152// The caller must call f.wg.Done() when the IO is finished, prior to Close() returning.
153func (f *win32File) prepareIO() (*ioOperation, error) {
154 f.wgLock.RLock()
155 if f.closing.isSet() {
156 f.wgLock.RUnlock()
157 return nil, ErrFileClosed
158 }
159 f.wg.Add(1)
160 f.wgLock.RUnlock()
161 c := &ioOperation{}
162 c.ch = make(chan ioResult)
163 return c, nil
164}
165
166// ioCompletionProcessor processes completed async IOs forever.
167func ioCompletionProcessor(h syscall.Handle) {
168 for {
169 var bytes uint32
170 var key uintptr
171 var op *ioOperation
172 err := getQueuedCompletionStatus(h, &bytes, &key, &op, syscall.INFINITE)
173 if op == nil {
174 panic(err)
175 }
176 op.ch <- ioResult{bytes, err}
177 }
178}
179
180// todo: helsaawy - create an asyncIO version that takes a context
181
182// asyncIO processes the return value from ReadFile or WriteFile, blocking until
183// the operation has actually completed.
184func (f *win32File) asyncIO(c *ioOperation, d *deadlineHandler, bytes uint32, err error) (int, error) {
185 if err != syscall.ERROR_IO_PENDING { //nolint:errorlint // err is Errno
186 return int(bytes), err
187 }
188
189 if f.closing.isSet() {
190 _ = cancelIoEx(f.handle, &c.o)
191 }
192
193 var timeout timeoutChan
194 if d != nil {
195 d.channelLock.Lock()
196 timeout = d.channel
197 d.channelLock.Unlock()
198 }
199
200 var r ioResult
201 select {
202 case r = <-c.ch:
203 err = r.err
204 if err == syscall.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno
205 if f.closing.isSet() {
206 err = ErrFileClosed
207 }
208 } else if err != nil && f.socket {
209 // err is from Win32. Query the overlapped structure to get the winsock error.
210 var bytes, flags uint32
211 err = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags)
212 }
213 case <-timeout:
214 _ = cancelIoEx(f.handle, &c.o)
215 r = <-c.ch
216 err = r.err
217 if err == syscall.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno
218 err = ErrTimeout
219 }
220 }
221
222 // runtime.KeepAlive is needed, as c is passed via native
223 // code to ioCompletionProcessor, c must remain alive
224 // until the channel read is complete.
225 // todo: (de)allocate *ioOperation via win32 heap functions, instead of needing to KeepAlive?
226 runtime.KeepAlive(c)
227 return int(r.bytes), err
228}
229
230// Read reads from a file handle.
231func (f *win32File) Read(b []byte) (int, error) {
232 c, err := f.prepareIO()
233 if err != nil {
234 return 0, err
235 }
236 defer f.wg.Done()
237
238 if f.readDeadline.timedout.isSet() {
239 return 0, ErrTimeout
240 }
241
242 var bytes uint32
243 err = syscall.ReadFile(f.handle, b, &bytes, &c.o)
244 n, err := f.asyncIO(c, &f.readDeadline, bytes, err)
245 runtime.KeepAlive(b)
246
247 // Handle EOF conditions.
248 if err == nil && n == 0 && len(b) != 0 {
249 return 0, io.EOF
250 } else if err == syscall.ERROR_BROKEN_PIPE { //nolint:errorlint // err is Errno
251 return 0, io.EOF
252 } else {
253 return n, err
254 }
255}
256
257// Write writes to a file handle.
258func (f *win32File) Write(b []byte) (int, error) {
259 c, err := f.prepareIO()
260 if err != nil {
261 return 0, err
262 }
263 defer f.wg.Done()
264
265 if f.writeDeadline.timedout.isSet() {
266 return 0, ErrTimeout
267 }
268
269 var bytes uint32
270 err = syscall.WriteFile(f.handle, b, &bytes, &c.o)
271 n, err := f.asyncIO(c, &f.writeDeadline, bytes, err)
272 runtime.KeepAlive(b)
273 return n, err
274}
275
276func (f *win32File) SetReadDeadline(deadline time.Time) error {
277 return f.readDeadline.set(deadline)
278}
279
280func (f *win32File) SetWriteDeadline(deadline time.Time) error {
281 return f.writeDeadline.set(deadline)
282}
283
284func (f *win32File) Flush() error {
285 return syscall.FlushFileBuffers(f.handle)
286}
287
288func (f *win32File) Fd() uintptr {
289 return uintptr(f.handle)
290}
291
292func (d *deadlineHandler) set(deadline time.Time) error {
293 d.setLock.Lock()
294 defer d.setLock.Unlock()
295
296 if d.timer != nil {
297 if !d.timer.Stop() {
298 <-d.channel
299 }
300 d.timer = nil
301 }
302 d.timedout.setFalse()
303
304 select {
305 case <-d.channel:
306 d.channelLock.Lock()
307 d.channel = make(chan struct{})
308 d.channelLock.Unlock()
309 default:
310 }
311
312 if deadline.IsZero() {
313 return nil
314 }
315
316 timeoutIO := func() {
317 d.timedout.setTrue()
318 close(d.channel)
319 }
320
321 now := time.Now()
322 duration := deadline.Sub(now)
323 if deadline.After(now) {
324 // Deadline is in the future, set a timer to wait
325 d.timer = time.AfterFunc(duration, timeoutIO)
326 } else {
327 // Deadline is in the past. Cancel all pending IO now.
328 timeoutIO()
329 }
330 return nil
331}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/fileinfo.go b/debian/extra/vendor/github.com/Microsoft/go-winio/fileinfo.go
0new file mode 100644332new file mode 100644
index 0000000..702950e
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/fileinfo.go
@@ -0,0 +1,92 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "os"
8 "runtime"
9 "unsafe"
10
11 "golang.org/x/sys/windows"
12)
13
14// FileBasicInfo contains file access time and file attributes information.
15type FileBasicInfo struct {
16 CreationTime, LastAccessTime, LastWriteTime, ChangeTime windows.Filetime
17 FileAttributes uint32
18 _ uint32 // padding
19}
20
21// GetFileBasicInfo retrieves times and attributes for a file.
22func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) {
23 bi := &FileBasicInfo{}
24 if err := windows.GetFileInformationByHandleEx(
25 windows.Handle(f.Fd()),
26 windows.FileBasicInfo,
27 (*byte)(unsafe.Pointer(bi)),
28 uint32(unsafe.Sizeof(*bi)),
29 ); err != nil {
30 return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
31 }
32 runtime.KeepAlive(f)
33 return bi, nil
34}
35
36// SetFileBasicInfo sets times and attributes for a file.
37func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error {
38 if err := windows.SetFileInformationByHandle(
39 windows.Handle(f.Fd()),
40 windows.FileBasicInfo,
41 (*byte)(unsafe.Pointer(bi)),
42 uint32(unsafe.Sizeof(*bi)),
43 ); err != nil {
44 return &os.PathError{Op: "SetFileInformationByHandle", Path: f.Name(), Err: err}
45 }
46 runtime.KeepAlive(f)
47 return nil
48}
49
50// FileStandardInfo contains extended information for the file.
51// FILE_STANDARD_INFO in WinBase.h
52// https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_standard_info
53type FileStandardInfo struct {
54 AllocationSize, EndOfFile int64
55 NumberOfLinks uint32
56 DeletePending, Directory bool
57}
58
59// GetFileStandardInfo retrieves ended information for the file.
60func GetFileStandardInfo(f *os.File) (*FileStandardInfo, error) {
61 si := &FileStandardInfo{}
62 if err := windows.GetFileInformationByHandleEx(windows.Handle(f.Fd()),
63 windows.FileStandardInfo,
64 (*byte)(unsafe.Pointer(si)),
65 uint32(unsafe.Sizeof(*si))); err != nil {
66 return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
67 }
68 runtime.KeepAlive(f)
69 return si, nil
70}
71
72// FileIDInfo contains the volume serial number and file ID for a file. This pair should be
73// unique on a system.
74type FileIDInfo struct {
75 VolumeSerialNumber uint64
76 FileID [16]byte
77}
78
79// GetFileID retrieves the unique (volume, file ID) pair for a file.
80func GetFileID(f *os.File) (*FileIDInfo, error) {
81 fileID := &FileIDInfo{}
82 if err := windows.GetFileInformationByHandleEx(
83 windows.Handle(f.Fd()),
84 windows.FileIdInfo,
85 (*byte)(unsafe.Pointer(fileID)),
86 uint32(unsafe.Sizeof(*fileID)),
87 ); err != nil {
88 return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
89 }
90 runtime.KeepAlive(f)
91 return fileID, nil
92}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/hvsock.go b/debian/extra/vendor/github.com/Microsoft/go-winio/hvsock.go
0new file mode 10064493new file mode 100644
index 0000000..c881916
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/hvsock.go
@@ -0,0 +1,575 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "context"
8 "errors"
9 "fmt"
10 "io"
11 "net"
12 "os"
13 "syscall"
14 "time"
15 "unsafe"
16
17 "golang.org/x/sys/windows"
18
19 "github.com/Microsoft/go-winio/internal/socket"
20 "github.com/Microsoft/go-winio/pkg/guid"
21)
22
23const afHVSock = 34 // AF_HYPERV
24
25// Well known Service and VM IDs
26// https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards
27
28// HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions.
29func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000
30 return guid.GUID{}
31}
32
33// HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions.
34func HvsockGUIDBroadcast() guid.GUID { // ffffffff-ffff-ffff-ffff-ffffffffffff
35 return guid.GUID{
36 Data1: 0xffffffff,
37 Data2: 0xffff,
38 Data3: 0xffff,
39 Data4: [8]uint8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
40 }
41}
42
43// HvsockGUIDLoopback is the Loopback VmId for accepting connections to the same partition as the connector.
44func HvsockGUIDLoopback() guid.GUID { // e0e16197-dd56-4a10-9195-5ee7a155a838
45 return guid.GUID{
46 Data1: 0xe0e16197,
47 Data2: 0xdd56,
48 Data3: 0x4a10,
49 Data4: [8]uint8{0x91, 0x95, 0x5e, 0xe7, 0xa1, 0x55, 0xa8, 0x38},
50 }
51}
52
53// HvsockGUIDSiloHost is the address of a silo's host partition:
54// - The silo host of a hosted silo is the utility VM.
55// - The silo host of a silo on a physical host is the physical host.
56func HvsockGUIDSiloHost() guid.GUID { // 36bd0c5c-7276-4223-88ba-7d03b654c568
57 return guid.GUID{
58 Data1: 0x36bd0c5c,
59 Data2: 0x7276,
60 Data3: 0x4223,
61 Data4: [8]byte{0x88, 0xba, 0x7d, 0x03, 0xb6, 0x54, 0xc5, 0x68},
62 }
63}
64
65// HvsockGUIDChildren is the wildcard VmId for accepting connections from the connector's child partitions.
66func HvsockGUIDChildren() guid.GUID { // 90db8b89-0d35-4f79-8ce9-49ea0ac8b7cd
67 return guid.GUID{
68 Data1: 0x90db8b89,
69 Data2: 0xd35,
70 Data3: 0x4f79,
71 Data4: [8]uint8{0x8c, 0xe9, 0x49, 0xea, 0xa, 0xc8, 0xb7, 0xcd},
72 }
73}
74
75// HvsockGUIDParent is the wildcard VmId for accepting connections from the connector's parent partition.
76// Listening on this VmId accepts connection from:
77// - Inside silos: silo host partition.
78// - Inside hosted silo: host of the VM.
79// - Inside VM: VM host.
80// - Physical host: Not supported.
81func HvsockGUIDParent() guid.GUID { // a42e7cda-d03f-480c-9cc2-a4de20abb878
82 return guid.GUID{
83 Data1: 0xa42e7cda,
84 Data2: 0xd03f,
85 Data3: 0x480c,
86 Data4: [8]uint8{0x9c, 0xc2, 0xa4, 0xde, 0x20, 0xab, 0xb8, 0x78},
87 }
88}
89
90// hvsockVsockServiceTemplate is the Service GUID used for the VSOCK protocol.
91func hvsockVsockServiceTemplate() guid.GUID { // 00000000-facb-11e6-bd58-64006a7986d3
92 return guid.GUID{
93 Data2: 0xfacb,
94 Data3: 0x11e6,
95 Data4: [8]uint8{0xbd, 0x58, 0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3},
96 }
97}
98
99// An HvsockAddr is an address for a AF_HYPERV socket.
100type HvsockAddr struct {
101 VMID guid.GUID
102 ServiceID guid.GUID
103}
104
105type rawHvsockAddr struct {
106 Family uint16
107 _ uint16
108 VMID guid.GUID
109 ServiceID guid.GUID
110}
111
112var _ socket.RawSockaddr = &rawHvsockAddr{}
113
114// Network returns the address's network name, "hvsock".
115func (*HvsockAddr) Network() string {
116 return "hvsock"
117}
118
119func (addr *HvsockAddr) String() string {
120 return fmt.Sprintf("%s:%s", &addr.VMID, &addr.ServiceID)
121}
122
123// VsockServiceID returns an hvsock service ID corresponding to the specified AF_VSOCK port.
124func VsockServiceID(port uint32) guid.GUID {
125 g := hvsockVsockServiceTemplate() // make a copy
126 g.Data1 = port
127 return g
128}
129
130func (addr *HvsockAddr) raw() rawHvsockAddr {
131 return rawHvsockAddr{
132 Family: afHVSock,
133 VMID: addr.VMID,
134 ServiceID: addr.ServiceID,
135 }
136}
137
138func (addr *HvsockAddr) fromRaw(raw *rawHvsockAddr) {
139 addr.VMID = raw.VMID
140 addr.ServiceID = raw.ServiceID
141}
142
143// Sockaddr returns a pointer to and the size of this struct.
144//
145// Implements the [socket.RawSockaddr] interface, and allows use in
146// [socket.Bind] and [socket.ConnectEx].
147func (r *rawHvsockAddr) Sockaddr() (unsafe.Pointer, int32, error) {
148 return unsafe.Pointer(r), int32(unsafe.Sizeof(rawHvsockAddr{})), nil
149}
150
151// Sockaddr interface allows use with `sockets.Bind()` and `.ConnectEx()`.
152func (r *rawHvsockAddr) FromBytes(b []byte) error {
153 n := int(unsafe.Sizeof(rawHvsockAddr{}))
154
155 if len(b) < n {
156 return fmt.Errorf("got %d, want %d: %w", len(b), n, socket.ErrBufferSize)
157 }
158
159 copy(unsafe.Slice((*byte)(unsafe.Pointer(r)), n), b[:n])
160 if r.Family != afHVSock {
161 return fmt.Errorf("got %d, want %d: %w", r.Family, afHVSock, socket.ErrAddrFamily)
162 }
163
164 return nil
165}
166
167// HvsockListener is a socket listener for the AF_HYPERV address family.
168type HvsockListener struct {
169 sock *win32File
170 addr HvsockAddr
171}
172
173var _ net.Listener = &HvsockListener{}
174
175// HvsockConn is a connected socket of the AF_HYPERV address family.
176type HvsockConn struct {
177 sock *win32File
178 local, remote HvsockAddr
179}
180
181var _ net.Conn = &HvsockConn{}
182
183func newHVSocket() (*win32File, error) {
184 fd, err := syscall.Socket(afHVSock, syscall.SOCK_STREAM, 1)
185 if err != nil {
186 return nil, os.NewSyscallError("socket", err)
187 }
188 f, err := makeWin32File(fd)
189 if err != nil {
190 syscall.Close(fd)
191 return nil, err
192 }
193 f.socket = true
194 return f, nil
195}
196
197// ListenHvsock listens for connections on the specified hvsock address.
198func ListenHvsock(addr *HvsockAddr) (_ *HvsockListener, err error) {
199 l := &HvsockListener{addr: *addr}
200 sock, err := newHVSocket()
201 if err != nil {
202 return nil, l.opErr("listen", err)
203 }
204 sa := addr.raw()
205 err = socket.Bind(windows.Handle(sock.handle), &sa)
206 if err != nil {
207 return nil, l.opErr("listen", os.NewSyscallError("socket", err))
208 }
209 err = syscall.Listen(sock.handle, 16)
210 if err != nil {
211 return nil, l.opErr("listen", os.NewSyscallError("listen", err))
212 }
213 return &HvsockListener{sock: sock, addr: *addr}, nil
214}
215
216func (l *HvsockListener) opErr(op string, err error) error {
217 return &net.OpError{Op: op, Net: "hvsock", Addr: &l.addr, Err: err}
218}
219
220// Addr returns the listener's network address.
221func (l *HvsockListener) Addr() net.Addr {
222 return &l.addr
223}
224
225// Accept waits for the next connection and returns it.
226func (l *HvsockListener) Accept() (_ net.Conn, err error) {
227 sock, err := newHVSocket()
228 if err != nil {
229 return nil, l.opErr("accept", err)
230 }
231 defer func() {
232 if sock != nil {
233 sock.Close()
234 }
235 }()
236 c, err := l.sock.prepareIO()
237 if err != nil {
238 return nil, l.opErr("accept", err)
239 }
240 defer l.sock.wg.Done()
241
242 // AcceptEx, per documentation, requires an extra 16 bytes per address.
243 //
244 // https://docs.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
245 const addrlen = uint32(16 + unsafe.Sizeof(rawHvsockAddr{}))
246 var addrbuf [addrlen * 2]byte
247
248 var bytes uint32
249 err = syscall.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /* rxdatalen */, addrlen, addrlen, &bytes, &c.o)
250 if _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil {
251 return nil, l.opErr("accept", os.NewSyscallError("acceptex", err))
252 }
253
254 conn := &HvsockConn{
255 sock: sock,
256 }
257 // The local address returned in the AcceptEx buffer is the same as the Listener socket's
258 // address. However, the service GUID reported by GetSockName is different from the Listeners
259 // socket, and is sometimes the same as the local address of the socket that dialed the
260 // address, with the service GUID.Data1 incremented, but othertimes is different.
261 // todo: does the local address matter? is the listener's address or the actual address appropriate?
262 conn.local.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[0])))
263 conn.remote.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[addrlen])))
264
265 // initialize the accepted socket and update its properties with those of the listening socket
266 if err = windows.Setsockopt(windows.Handle(sock.handle),
267 windows.SOL_SOCKET, windows.SO_UPDATE_ACCEPT_CONTEXT,
268 (*byte)(unsafe.Pointer(&l.sock.handle)), int32(unsafe.Sizeof(l.sock.handle))); err != nil {
269 return nil, conn.opErr("accept", os.NewSyscallError("setsockopt", err))
270 }
271
272 sock = nil
273 return conn, nil
274}
275
276// Close closes the listener, causing any pending Accept calls to fail.
277func (l *HvsockListener) Close() error {
278 return l.sock.Close()
279}
280
281// HvsockDialer configures and dials a Hyper-V Socket (ie, [HvsockConn]).
282type HvsockDialer struct {
283 // Deadline is the time the Dial operation must connect before erroring.
284 Deadline time.Time
285
286 // Retries is the number of additional connects to try if the connection times out, is refused,
287 // or the host is unreachable
288 Retries uint
289
290 // RetryWait is the time to wait after a connection error to retry
291 RetryWait time.Duration
292
293 rt *time.Timer // redial wait timer
294}
295
296// Dial the Hyper-V socket at addr.
297//
298// See [HvsockDialer.Dial] for more information.
299func Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {
300 return (&HvsockDialer{}).Dial(ctx, addr)
301}
302
303// Dial attempts to connect to the Hyper-V socket at addr, and returns a connection if successful.
304// Will attempt (HvsockDialer).Retries if dialing fails, waiting (HvsockDialer).RetryWait between
305// retries.
306//
307// Dialing can be cancelled either by providing (HvsockDialer).Deadline, or cancelling ctx.
308func (d *HvsockDialer) Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {
309 op := "dial"
310 // create the conn early to use opErr()
311 conn = &HvsockConn{
312 remote: *addr,
313 }
314
315 if !d.Deadline.IsZero() {
316 var cancel context.CancelFunc
317 ctx, cancel = context.WithDeadline(ctx, d.Deadline)
318 defer cancel()
319 }
320
321 // preemptive timeout/cancellation check
322 if err = ctx.Err(); err != nil {
323 return nil, conn.opErr(op, err)
324 }
325
326 sock, err := newHVSocket()
327 if err != nil {
328 return nil, conn.opErr(op, err)
329 }
330 defer func() {
331 if sock != nil {
332 sock.Close()
333 }
334 }()
335
336 sa := addr.raw()
337 err = socket.Bind(windows.Handle(sock.handle), &sa)
338 if err != nil {
339 return nil, conn.opErr(op, os.NewSyscallError("bind", err))
340 }
341
342 c, err := sock.prepareIO()
343 if err != nil {
344 return nil, conn.opErr(op, err)
345 }
346 defer sock.wg.Done()
347 var bytes uint32
348 for i := uint(0); i <= d.Retries; i++ {
349 err = socket.ConnectEx(
350 windows.Handle(sock.handle),
351 &sa,
352 nil, // sendBuf
353 0, // sendDataLen
354 &bytes,
355 (*windows.Overlapped)(unsafe.Pointer(&c.o)))
356 _, err = sock.asyncIO(c, nil, bytes, err)
357 if i < d.Retries && canRedial(err) {
358 if err = d.redialWait(ctx); err == nil {
359 continue
360 }
361 }
362 break
363 }
364 if err != nil {
365 return nil, conn.opErr(op, os.NewSyscallError("connectex", err))
366 }
367
368 // update the connection properties, so shutdown can be used
369 if err = windows.Setsockopt(
370 windows.Handle(sock.handle),
371 windows.SOL_SOCKET,
372 windows.SO_UPDATE_CONNECT_CONTEXT,
373 nil, // optvalue
374 0, // optlen
375 ); err != nil {
376 return nil, conn.opErr(op, os.NewSyscallError("setsockopt", err))
377 }
378
379 // get the local name
380 var sal rawHvsockAddr
381 err = socket.GetSockName(windows.Handle(sock.handle), &sal)
382 if err != nil {
383 return nil, conn.opErr(op, os.NewSyscallError("getsockname", err))
384 }
385 conn.local.fromRaw(&sal)
386
387 // one last check for timeout, since asyncIO doesn't check the context
388 if err = ctx.Err(); err != nil {
389 return nil, conn.opErr(op, err)
390 }
391
392 conn.sock = sock
393 sock = nil
394
395 return conn, nil
396}
397
398// redialWait waits before attempting to redial, resetting the timer as appropriate.
399func (d *HvsockDialer) redialWait(ctx context.Context) (err error) {
400 if d.RetryWait == 0 {
401 return nil
402 }
403
404 if d.rt == nil {
405 d.rt = time.NewTimer(d.RetryWait)
406 } else {
407 // should already be stopped and drained
408 d.rt.Reset(d.RetryWait)
409 }
410
411 select {
412 case <-ctx.Done():
413 case <-d.rt.C:
414 return nil
415 }
416
417 // stop and drain the timer
418 if !d.rt.Stop() {
419 <-d.rt.C
420 }
421 return ctx.Err()
422}
423
424// assumes error is a plain, unwrapped syscall.Errno provided by direct syscall.
425func canRedial(err error) bool {
426 //nolint:errorlint // guaranteed to be an Errno
427 switch err {
428 case windows.WSAECONNREFUSED, windows.WSAENETUNREACH, windows.WSAETIMEDOUT,
429 windows.ERROR_CONNECTION_REFUSED, windows.ERROR_CONNECTION_UNAVAIL:
430 return true
431 default:
432 return false
433 }
434}
435
436func (conn *HvsockConn) opErr(op string, err error) error {
437 // translate from "file closed" to "socket closed"
438 if errors.Is(err, ErrFileClosed) {
439 err = socket.ErrSocketClosed
440 }
441 return &net.OpError{Op: op, Net: "hvsock", Source: &conn.local, Addr: &conn.remote, Err: err}
442}
443
444func (conn *HvsockConn) Read(b []byte) (int, error) {
445 c, err := conn.sock.prepareIO()
446 if err != nil {
447 return 0, conn.opErr("read", err)
448 }
449 defer conn.sock.wg.Done()
450 buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))}
451 var flags, bytes uint32
452 err = syscall.WSARecv(conn.sock.handle, &buf, 1, &bytes, &flags, &c.o, nil)
453 n, err := conn.sock.asyncIO(c, &conn.sock.readDeadline, bytes, err)
454 if err != nil {
455 var eno windows.Errno
456 if errors.As(err, &eno) {
457 err = os.NewSyscallError("wsarecv", eno)
458 }
459 return 0, conn.opErr("read", err)
460 } else if n == 0 {
461 err = io.EOF
462 }
463 return n, err
464}
465
466func (conn *HvsockConn) Write(b []byte) (int, error) {
467 t := 0
468 for len(b) != 0 {
469 n, err := conn.write(b)
470 if err != nil {
471 return t + n, err
472 }
473 t += n
474 b = b[n:]
475 }
476 return t, nil
477}
478
479func (conn *HvsockConn) write(b []byte) (int, error) {
480 c, err := conn.sock.prepareIO()
481 if err != nil {
482 return 0, conn.opErr("write", err)
483 }
484 defer conn.sock.wg.Done()
485 buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))}
486 var bytes uint32
487 err = syscall.WSASend(conn.sock.handle, &buf, 1, &bytes, 0, &c.o, nil)
488 n, err := conn.sock.asyncIO(c, &conn.sock.writeDeadline, bytes, err)
489 if err != nil {
490 var eno windows.Errno
491 if errors.As(err, &eno) {
492 err = os.NewSyscallError("wsasend", eno)
493 }
494 return 0, conn.opErr("write", err)
495 }
496 return n, err
497}
498
499// Close closes the socket connection, failing any pending read or write calls.
500func (conn *HvsockConn) Close() error {
501 return conn.sock.Close()
502}
503
504func (conn *HvsockConn) IsClosed() bool {
505 return conn.sock.IsClosed()
506}
507
508// shutdown disables sending or receiving on a socket.
509func (conn *HvsockConn) shutdown(how int) error {
510 if conn.IsClosed() {
511 return socket.ErrSocketClosed
512 }
513
514 err := syscall.Shutdown(conn.sock.handle, how)
515 if err != nil {
516 // If the connection was closed, shutdowns fail with "not connected"
517 if errors.Is(err, windows.WSAENOTCONN) ||
518 errors.Is(err, windows.WSAESHUTDOWN) {
519 err = socket.ErrSocketClosed
520 }
521 return os.NewSyscallError("shutdown", err)
522 }
523 return nil
524}
525
526// CloseRead shuts down the read end of the socket, preventing future read operations.
527func (conn *HvsockConn) CloseRead() error {
528 err := conn.shutdown(syscall.SHUT_RD)
529 if err != nil {
530 return conn.opErr("closeread", err)
531 }
532 return nil
533}
534
535// CloseWrite shuts down the write end of the socket, preventing future write operations and
536// notifying the other endpoint that no more data will be written.
537func (conn *HvsockConn) CloseWrite() error {
538 err := conn.shutdown(syscall.SHUT_WR)
539 if err != nil {
540 return conn.opErr("closewrite", err)
541 }
542 return nil
543}
544
545// LocalAddr returns the local address of the connection.
546func (conn *HvsockConn) LocalAddr() net.Addr {
547 return &conn.local
548}
549
550// RemoteAddr returns the remote address of the connection.
551func (conn *HvsockConn) RemoteAddr() net.Addr {
552 return &conn.remote
553}
554
555// SetDeadline implements the net.Conn SetDeadline method.
556func (conn *HvsockConn) SetDeadline(t time.Time) error {
557 // todo: implement `SetDeadline` for `win32File`
558 if err := conn.SetReadDeadline(t); err != nil {
559 return fmt.Errorf("set read deadline: %w", err)
560 }
561 if err := conn.SetWriteDeadline(t); err != nil {
562 return fmt.Errorf("set write deadline: %w", err)
563 }
564 return nil
565}
566
567// SetReadDeadline implements the net.Conn SetReadDeadline method.
568func (conn *HvsockConn) SetReadDeadline(t time.Time) error {
569 return conn.sock.SetReadDeadline(t)
570}
571
572// SetWriteDeadline implements the net.Conn SetWriteDeadline method.
573func (conn *HvsockConn) SetWriteDeadline(t time.Time) error {
574 return conn.sock.SetWriteDeadline(t)
575}
diff --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
0new file mode 100644576new file mode 100644
index 0000000..1f65388
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go
@@ -0,0 +1,2 @@
1// This package contains Win32 filesystem functionality.
2package fs
diff --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
0new file mode 1006443new file mode 100644
index 0000000..509b3ec
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go
@@ -0,0 +1,202 @@
1//go:build windows
2
3package fs
4
5import (
6 "golang.org/x/sys/windows"
7
8 "github.com/Microsoft/go-winio/internal/stringbuffer"
9)
10
11//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go fs.go
12
13// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew
14//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
15
16const NullHandle windows.Handle = 0
17
18// AccessMask defines standard, specific, and generic rights.
19//
20// Bitmask:
21// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
22// 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
23// +---------------+---------------+-------------------------------+
24// |G|G|G|G|Resvd|A| StandardRights| SpecificRights |
25// |R|W|E|A| |S| | |
26// +-+-------------+---------------+-------------------------------+
27//
28// GR Generic Read
29// GW Generic Write
30// GE Generic Exectue
31// GA Generic All
32// Resvd Reserved
33// AS Access Security System
34//
35// https://learn.microsoft.com/en-us/windows/win32/secauthz/access-mask
36//
37// https://learn.microsoft.com/en-us/windows/win32/secauthz/generic-access-rights
38//
39// https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants
40type AccessMask = windows.ACCESS_MASK
41
42//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
43const (
44 // Not actually any.
45 //
46 // For CreateFile: "query certain metadata such as file, directory, or device attributes without accessing that file or device"
47 // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#parameters
48 FILE_ANY_ACCESS AccessMask = 0
49
50 // Specific Object Access
51 // from ntioapi.h
52
53 FILE_READ_DATA AccessMask = (0x0001) // file & pipe
54 FILE_LIST_DIRECTORY AccessMask = (0x0001) // directory
55
56 FILE_WRITE_DATA AccessMask = (0x0002) // file & pipe
57 FILE_ADD_FILE AccessMask = (0x0002) // directory
58
59 FILE_APPEND_DATA AccessMask = (0x0004) // file
60 FILE_ADD_SUBDIRECTORY AccessMask = (0x0004) // directory
61 FILE_CREATE_PIPE_INSTANCE AccessMask = (0x0004) // named pipe
62
63 FILE_READ_EA AccessMask = (0x0008) // file & directory
64 FILE_READ_PROPERTIES AccessMask = FILE_READ_EA
65
66 FILE_WRITE_EA AccessMask = (0x0010) // file & directory
67 FILE_WRITE_PROPERTIES AccessMask = FILE_WRITE_EA
68
69 FILE_EXECUTE AccessMask = (0x0020) // file
70 FILE_TRAVERSE AccessMask = (0x0020) // directory
71
72 FILE_DELETE_CHILD AccessMask = (0x0040) // directory
73
74 FILE_READ_ATTRIBUTES AccessMask = (0x0080) // all
75
76 FILE_WRITE_ATTRIBUTES AccessMask = (0x0100) // all
77
78 FILE_ALL_ACCESS AccessMask = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
79 FILE_GENERIC_READ AccessMask = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE)
80 FILE_GENERIC_WRITE AccessMask = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE)
81 FILE_GENERIC_EXECUTE AccessMask = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE)
82
83 SPECIFIC_RIGHTS_ALL AccessMask = 0x0000FFFF
84
85 // Standard Access
86 // from ntseapi.h
87
88 DELETE AccessMask = 0x0001_0000
89 READ_CONTROL AccessMask = 0x0002_0000
90 WRITE_DAC AccessMask = 0x0004_0000
91 WRITE_OWNER AccessMask = 0x0008_0000
92 SYNCHRONIZE AccessMask = 0x0010_0000
93
94 STANDARD_RIGHTS_REQUIRED AccessMask = 0x000F_0000
95
96 STANDARD_RIGHTS_READ AccessMask = READ_CONTROL
97 STANDARD_RIGHTS_WRITE AccessMask = READ_CONTROL
98 STANDARD_RIGHTS_EXECUTE AccessMask = READ_CONTROL
99
100 STANDARD_RIGHTS_ALL AccessMask = 0x001F_0000
101)
102
103type FileShareMode uint32
104
105//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
106const (
107 FILE_SHARE_NONE FileShareMode = 0x00
108 FILE_SHARE_READ FileShareMode = 0x01
109 FILE_SHARE_WRITE FileShareMode = 0x02
110 FILE_SHARE_DELETE FileShareMode = 0x04
111 FILE_SHARE_VALID_FLAGS FileShareMode = 0x07
112)
113
114type FileCreationDisposition uint32
115
116//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
117const (
118 // from winbase.h
119
120 CREATE_NEW FileCreationDisposition = 0x01
121 CREATE_ALWAYS FileCreationDisposition = 0x02
122 OPEN_EXISTING FileCreationDisposition = 0x03
123 OPEN_ALWAYS FileCreationDisposition = 0x04
124 TRUNCATE_EXISTING FileCreationDisposition = 0x05
125)
126
127// CreateFile and co. take flags or attributes together as one parameter.
128// Define alias until we can use generics to allow both
129
130// https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
131type FileFlagOrAttribute uint32
132
133//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
134const ( // from winnt.h
135 FILE_FLAG_WRITE_THROUGH FileFlagOrAttribute = 0x8000_0000
136 FILE_FLAG_OVERLAPPED FileFlagOrAttribute = 0x4000_0000
137 FILE_FLAG_NO_BUFFERING FileFlagOrAttribute = 0x2000_0000
138 FILE_FLAG_RANDOM_ACCESS FileFlagOrAttribute = 0x1000_0000
139 FILE_FLAG_SEQUENTIAL_SCAN FileFlagOrAttribute = 0x0800_0000
140 FILE_FLAG_DELETE_ON_CLOSE FileFlagOrAttribute = 0x0400_0000
141 FILE_FLAG_BACKUP_SEMANTICS FileFlagOrAttribute = 0x0200_0000
142 FILE_FLAG_POSIX_SEMANTICS FileFlagOrAttribute = 0x0100_0000
143 FILE_FLAG_OPEN_REPARSE_POINT FileFlagOrAttribute = 0x0020_0000
144 FILE_FLAG_OPEN_NO_RECALL FileFlagOrAttribute = 0x0010_0000
145 FILE_FLAG_FIRST_PIPE_INSTANCE FileFlagOrAttribute = 0x0008_0000
146)
147
148type FileSQSFlag = FileFlagOrAttribute
149
150//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
151const ( // from winbase.h
152 SECURITY_ANONYMOUS FileSQSFlag = FileSQSFlag(SecurityAnonymous << 16)
153 SECURITY_IDENTIFICATION FileSQSFlag = FileSQSFlag(SecurityIdentification << 16)
154 SECURITY_IMPERSONATION FileSQSFlag = FileSQSFlag(SecurityImpersonation << 16)
155 SECURITY_DELEGATION FileSQSFlag = FileSQSFlag(SecurityDelegation << 16)
156
157 SECURITY_SQOS_PRESENT FileSQSFlag = 0x00100000
158 SECURITY_VALID_SQOS_FLAGS FileSQSFlag = 0x001F0000
159)
160
161// GetFinalPathNameByHandle flags
162//
163// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew#parameters
164type GetFinalPathFlag uint32
165
166//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
167const (
168 GetFinalPathDefaultFlag GetFinalPathFlag = 0x0
169
170 FILE_NAME_NORMALIZED GetFinalPathFlag = 0x0
171 FILE_NAME_OPENED GetFinalPathFlag = 0x8
172
173 VOLUME_NAME_DOS GetFinalPathFlag = 0x0
174 VOLUME_NAME_GUID GetFinalPathFlag = 0x1
175 VOLUME_NAME_NT GetFinalPathFlag = 0x2
176 VOLUME_NAME_NONE GetFinalPathFlag = 0x4
177)
178
179// getFinalPathNameByHandle facilitates calling the Windows API GetFinalPathNameByHandle
180// with the given handle and flags. It transparently takes care of creating a buffer of the
181// correct size for the call.
182//
183// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew
184func GetFinalPathNameByHandle(h windows.Handle, flags GetFinalPathFlag) (string, error) {
185 b := stringbuffer.NewWString()
186 //TODO: can loop infinitely if Win32 keeps returning the same (or a larger) n?
187 for {
188 n, err := windows.GetFinalPathNameByHandle(h, b.Pointer(), b.Cap(), uint32(flags))
189 if err != nil {
190 return "", err
191 }
192 // If the buffer wasn't large enough, n will be the total size needed (including null terminator).
193 // Resize and try again.
194 if n > b.Cap() {
195 b.ResizeTo(n)
196 continue
197 }
198 // If the buffer is large enough, n will be the size not including the null terminator.
199 // Convert to a Go string and return.
200 return b.String(), nil
201 }
202}
diff --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
0new file mode 100644203new file mode 100644
index 0000000..81760ac
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/security.go
@@ -0,0 +1,12 @@
1package fs
2
3// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level
4type SecurityImpersonationLevel int32 // C default enums underlying type is `int`, which is Go `int32`
5
6// Impersonation levels
7const (
8 SecurityAnonymous SecurityImpersonationLevel = 0
9 SecurityIdentification SecurityImpersonationLevel = 1
10 SecurityImpersonation SecurityImpersonationLevel = 2
11 SecurityDelegation SecurityImpersonationLevel = 3
12)
diff --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
0new file mode 10064413new file mode 100644
index 0000000..e2f7bb2
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go
@@ -0,0 +1,64 @@
1//go:build windows
2
3// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
4
5package fs
6
7import (
8 "syscall"
9 "unsafe"
10
11 "golang.org/x/sys/windows"
12)
13
14var _ unsafe.Pointer
15
16// Do the interface allocations only once for common
17// Errno values.
18const (
19 errnoERROR_IO_PENDING = 997
20)
21
22var (
23 errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
24 errERROR_EINVAL error = syscall.EINVAL
25)
26
27// errnoErr returns common boxed Errno values, to prevent
28// allocations at runtime.
29func errnoErr(e syscall.Errno) error {
30 switch e {
31 case 0:
32 return errERROR_EINVAL
33 case errnoERROR_IO_PENDING:
34 return errERROR_IO_PENDING
35 }
36 // TODO: add more here, after collecting data on the common
37 // error values see on Windows. (perhaps when running
38 // all.bat?)
39 return e
40}
41
42var (
43 modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
44
45 procCreateFileW = modkernel32.NewProc("CreateFileW")
46)
47
48func CreateFile(name string, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {
49 var _p0 *uint16
50 _p0, err = syscall.UTF16PtrFromString(name)
51 if err != nil {
52 return
53 }
54 return _CreateFile(_p0, access, mode, sa, createmode, attrs, templatefile)
55}
56
57func _CreateFile(name *uint16, access AccessMask, mode FileShareMode, sa *syscall.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) {
58 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)
59 handle = windows.Handle(r0)
60 if handle == windows.InvalidHandle {
61 err = errnoErr(e1)
62 }
63 return
64}
diff --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
0new file mode 10064465new file mode 100644
index 0000000..7e82f9a
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go
@@ -0,0 +1,20 @@
1package socket
2
3import (
4 "unsafe"
5)
6
7// RawSockaddr allows structs to be used with [Bind] and [ConnectEx]. The
8// struct must meet the Win32 sockaddr requirements specified here:
9// https://docs.microsoft.com/en-us/windows/win32/winsock/sockaddr-2
10//
11// Specifically, the struct size must be least larger than an int16 (unsigned short)
12// for the address family.
13type RawSockaddr interface {
14 // Sockaddr returns a pointer to the RawSockaddr and its struct size, allowing
15 // for the RawSockaddr's data to be overwritten by syscalls (if necessary).
16 //
17 // It is the callers responsibility to validate that the values are valid; invalid
18 // pointers or size can cause a panic.
19 Sockaddr() (unsafe.Pointer, int32, error)
20}
diff --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
0new file mode 10064421new file mode 100644
index 0000000..aeb7b72
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go
@@ -0,0 +1,179 @@
1//go:build windows
2
3package socket
4
5import (
6 "errors"
7 "fmt"
8 "net"
9 "sync"
10 "syscall"
11 "unsafe"
12
13 "github.com/Microsoft/go-winio/pkg/guid"
14 "golang.org/x/sys/windows"
15)
16
17//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go socket.go
18
19//sys getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getsockname
20//sys getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getpeername
21//sys bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socketError] = ws2_32.bind
22
23const socketError = uintptr(^uint32(0))
24
25var (
26 // todo(helsaawy): create custom error types to store the desired vs actual size and addr family?
27
28 ErrBufferSize = errors.New("buffer size")
29 ErrAddrFamily = errors.New("address family")
30 ErrInvalidPointer = errors.New("invalid pointer")
31 ErrSocketClosed = fmt.Errorf("socket closed: %w", net.ErrClosed)
32)
33
34// todo(helsaawy): replace these with generics, ie: GetSockName[S RawSockaddr](s windows.Handle) (S, error)
35
36// GetSockName writes the local address of socket s to the [RawSockaddr] rsa.
37// If rsa is not large enough, the [windows.WSAEFAULT] is returned.
38func GetSockName(s windows.Handle, rsa RawSockaddr) error {
39 ptr, l, err := rsa.Sockaddr()
40 if err != nil {
41 return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
42 }
43
44 // although getsockname returns WSAEFAULT if the buffer is too small, it does not set
45 // &l to the correct size, so--apart from doubling the buffer repeatedly--there is no remedy
46 return getsockname(s, ptr, &l)
47}
48
49// GetPeerName returns the remote address the socket is connected to.
50//
51// See [GetSockName] for more information.
52func GetPeerName(s windows.Handle, rsa RawSockaddr) error {
53 ptr, l, err := rsa.Sockaddr()
54 if err != nil {
55 return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
56 }
57
58 return getpeername(s, ptr, &l)
59}
60
61func Bind(s windows.Handle, rsa RawSockaddr) (err error) {
62 ptr, l, err := rsa.Sockaddr()
63 if err != nil {
64 return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
65 }
66
67 return bind(s, ptr, l)
68}
69
70// "golang.org/x/sys/windows".ConnectEx and .Bind only accept internal implementations of the
71// their sockaddr interface, so they cannot be used with HvsockAddr
72// Replicate functionality here from
73// https://cs.opensource.google/go/x/sys/+/master:windows/syscall_windows.go
74
75// The function pointers to `AcceptEx`, `ConnectEx` and `GetAcceptExSockaddrs` must be loaded at
76// runtime via a WSAIoctl call:
77// https://docs.microsoft.com/en-us/windows/win32/api/Mswsock/nc-mswsock-lpfn_connectex#remarks
78
79type runtimeFunc struct {
80 id guid.GUID
81 once sync.Once
82 addr uintptr
83 err error
84}
85
86func (f *runtimeFunc) Load() error {
87 f.once.Do(func() {
88 var s windows.Handle
89 s, f.err = windows.Socket(windows.AF_INET, windows.SOCK_STREAM, windows.IPPROTO_TCP)
90 if f.err != nil {
91 return
92 }
93 defer windows.CloseHandle(s) //nolint:errcheck
94
95 var n uint32
96 f.err = windows.WSAIoctl(s,
97 windows.SIO_GET_EXTENSION_FUNCTION_POINTER,
98 (*byte)(unsafe.Pointer(&f.id)),
99 uint32(unsafe.Sizeof(f.id)),
100 (*byte)(unsafe.Pointer(&f.addr)),
101 uint32(unsafe.Sizeof(f.addr)),
102 &n,
103 nil, // overlapped
104 0, // completionRoutine
105 )
106 })
107 return f.err
108}
109
110var (
111 // todo: add `AcceptEx` and `GetAcceptExSockaddrs`
112 WSAID_CONNECTEX = guid.GUID{ //revive:disable-line:var-naming ALL_CAPS
113 Data1: 0x25a207b9,
114 Data2: 0xddf3,
115 Data3: 0x4660,
116 Data4: [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e},
117 }
118
119 connectExFunc = runtimeFunc{id: WSAID_CONNECTEX}
120)
121
122func ConnectEx(
123 fd windows.Handle,
124 rsa RawSockaddr,
125 sendBuf *byte,
126 sendDataLen uint32,
127 bytesSent *uint32,
128 overlapped *windows.Overlapped,
129) error {
130 if err := connectExFunc.Load(); err != nil {
131 return fmt.Errorf("failed to load ConnectEx function pointer: %w", err)
132 }
133 ptr, n, err := rsa.Sockaddr()
134 if err != nil {
135 return err
136 }
137 return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped)
138}
139
140// BOOL LpfnConnectex(
141// [in] SOCKET s,
142// [in] const sockaddr *name,
143// [in] int namelen,
144// [in, optional] PVOID lpSendBuffer,
145// [in] DWORD dwSendDataLength,
146// [out] LPDWORD lpdwBytesSent,
147// [in] LPOVERLAPPED lpOverlapped
148// )
149
150func connectEx(
151 s windows.Handle,
152 name unsafe.Pointer,
153 namelen int32,
154 sendBuf *byte,
155 sendDataLen uint32,
156 bytesSent *uint32,
157 overlapped *windows.Overlapped,
158) (err error) {
159 // todo: after upgrading to 1.18, switch from syscall.Syscall9 to syscall.SyscallN
160 r1, _, e1 := syscall.Syscall9(connectExFunc.addr,
161 7,
162 uintptr(s),
163 uintptr(name),
164 uintptr(namelen),
165 uintptr(unsafe.Pointer(sendBuf)),
166 uintptr(sendDataLen),
167 uintptr(unsafe.Pointer(bytesSent)),
168 uintptr(unsafe.Pointer(overlapped)),
169 0,
170 0)
171 if r1 == 0 {
172 if e1 != 0 {
173 err = error(e1)
174 } else {
175 err = syscall.EINVAL
176 }
177 }
178 return err
179}
diff --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
0new file mode 100644180new file mode 100644
index 0000000..6d2e1a9
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go
@@ -0,0 +1,72 @@
1//go:build windows
2
3// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
4
5package socket
6
7import (
8 "syscall"
9 "unsafe"
10
11 "golang.org/x/sys/windows"
12)
13
14var _ unsafe.Pointer
15
16// Do the interface allocations only once for common
17// Errno values.
18const (
19 errnoERROR_IO_PENDING = 997
20)
21
22var (
23 errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
24 errERROR_EINVAL error = syscall.EINVAL
25)
26
27// errnoErr returns common boxed Errno values, to prevent
28// allocations at runtime.
29func errnoErr(e syscall.Errno) error {
30 switch e {
31 case 0:
32 return errERROR_EINVAL
33 case errnoERROR_IO_PENDING:
34 return errERROR_IO_PENDING
35 }
36 // TODO: add more here, after collecting data on the common
37 // error values see on Windows. (perhaps when running
38 // all.bat?)
39 return e
40}
41
42var (
43 modws2_32 = windows.NewLazySystemDLL("ws2_32.dll")
44
45 procbind = modws2_32.NewProc("bind")
46 procgetpeername = modws2_32.NewProc("getpeername")
47 procgetsockname = modws2_32.NewProc("getsockname")
48)
49
50func bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) {
51 r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
52 if r1 == socketError {
53 err = errnoErr(e1)
54 }
55 return
56}
57
58func getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {
59 r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))
60 if r1 == socketError {
61 err = errnoErr(e1)
62 }
63 return
64}
65
66func getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {
67 r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))
68 if r1 == socketError {
69 err = errnoErr(e1)
70 }
71 return
72}
diff --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
0new file mode 10064473new file mode 100644
index 0000000..7ad5057
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go
@@ -0,0 +1,132 @@
1package stringbuffer
2
3import (
4 "sync"
5 "unicode/utf16"
6)
7
8// TODO: worth exporting and using in mkwinsyscall?
9
10// Uint16BufferSize is the buffer size in the pool, chosen somewhat arbitrarily to accommodate
11// large path strings:
12// MAX_PATH (260) + size of volume GUID prefix (49) + null terminator = 310.
13const MinWStringCap = 310
14
15// use *[]uint16 since []uint16 creates an extra allocation where the slice header
16// is copied to heap and then referenced via pointer in the interface header that sync.Pool
17// stores.
18var pathPool = sync.Pool{ // if go1.18+ adds Pool[T], use that to store []uint16 directly
19 New: func() interface{} {
20 b := make([]uint16, MinWStringCap)
21 return &b
22 },
23}
24
25func newBuffer() []uint16 { return *(pathPool.Get().(*[]uint16)) }
26
27// freeBuffer copies the slice header data, and puts a pointer to that in the pool.
28// This avoids taking a pointer to the slice header in WString, which can be set to nil.
29func freeBuffer(b []uint16) { pathPool.Put(&b) }
30
31// WString is a wide string buffer ([]uint16) meant for storing UTF-16 encoded strings
32// for interacting with Win32 APIs.
33// Sizes are specified as uint32 and not int.
34//
35// It is not thread safe.
36type WString struct {
37 // type-def allows casting to []uint16 directly, use struct to prevent that and allow adding fields in the future.
38
39 // raw buffer
40 b []uint16
41}
42
43// NewWString returns a [WString] allocated from a shared pool with an
44// initial capacity of at least [MinWStringCap].
45// Since the buffer may have been previously used, its contents are not guaranteed to be empty.
46//
47// The buffer should be freed via [WString.Free]
48func NewWString() *WString {
49 return &WString{
50 b: newBuffer(),
51 }
52}
53
54func (b *WString) Free() {
55 if b.empty() {
56 return
57 }
58 freeBuffer(b.b)
59 b.b = nil
60}
61
62// ResizeTo grows the buffer to at least c and returns the new capacity, freeing the
63// previous buffer back into pool.
64func (b *WString) ResizeTo(c uint32) uint32 {
65 // allready sufficient (or n is 0)
66 if c <= b.Cap() {
67 return b.Cap()
68 }
69
70 if c <= MinWStringCap {
71 c = MinWStringCap
72 }
73 // allocate at-least double buffer size, as is done in [bytes.Buffer] and other places
74 if c <= 2*b.Cap() {
75 c = 2 * b.Cap()
76 }
77
78 b2 := make([]uint16, c)
79 if !b.empty() {
80 copy(b2, b.b)
81 freeBuffer(b.b)
82 }
83 b.b = b2
84 return c
85}
86
87// Buffer returns the underlying []uint16 buffer.
88func (b *WString) Buffer() []uint16 {
89 if b.empty() {
90 return nil
91 }
92 return b.b
93}
94
95// Pointer returns a pointer to the first uint16 in the buffer.
96// If the [WString.Free] has already been called, the pointer will be nil.
97func (b *WString) Pointer() *uint16 {
98 if b.empty() {
99 return nil
100 }
101 return &b.b[0]
102}
103
104// String returns the returns the UTF-8 encoding of the UTF-16 string in the buffer.
105//
106// It assumes that the data is null-terminated.
107func (b *WString) String() string {
108 // Using [windows.UTF16ToString] would require importing "golang.org/x/sys/windows"
109 // and would make this code Windows-only, which makes no sense.
110 // So copy UTF16ToString code into here.
111 // If other windows-specific code is added, switch to [windows.UTF16ToString]
112
113 s := b.b
114 for i, v := range s {
115 if v == 0 {
116 s = s[:i]
117 break
118 }
119 }
120 return string(utf16.Decode(s))
121}
122
123// Cap returns the underlying buffer capacity.
124func (b *WString) Cap() uint32 {
125 if b.empty() {
126 return 0
127 }
128 return b.cap()
129}
130
131func (b *WString) cap() uint32 { return uint32(cap(b.b)) }
132func (b *WString) empty() bool { return b == nil || b.cap() == 0 }
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/pipe.go b/debian/extra/vendor/github.com/Microsoft/go-winio/pipe.go
0new file mode 100644133new file mode 100644
index 0000000..25cc811
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pipe.go
@@ -0,0 +1,525 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "context"
8 "errors"
9 "fmt"
10 "io"
11 "net"
12 "os"
13 "runtime"
14 "syscall"
15 "time"
16 "unsafe"
17
18 "golang.org/x/sys/windows"
19
20 "github.com/Microsoft/go-winio/internal/fs"
21)
22
23//sys connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) = ConnectNamedPipe
24//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
25//sys getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo
26//sys getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
27//sys localAlloc(uFlags uint32, length uint32) (ptr uintptr) = LocalAlloc
28//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
29//sys rtlNtStatusToDosError(status ntStatus) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb
30//sys rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) = ntdll.RtlDosPathNameToNtPathName_U
31//sys rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) = ntdll.RtlDefaultNpAcl
32
33type ioStatusBlock struct {
34 Status, Information uintptr
35}
36
37type objectAttributes struct {
38 Length uintptr
39 RootDirectory uintptr
40 ObjectName *unicodeString
41 Attributes uintptr
42 SecurityDescriptor *securityDescriptor
43 SecurityQoS uintptr
44}
45
46type unicodeString struct {
47 Length uint16
48 MaximumLength uint16
49 Buffer uintptr
50}
51
52type securityDescriptor struct {
53 Revision byte
54 Sbz1 byte
55 Control uint16
56 Owner uintptr
57 Group uintptr
58 Sacl uintptr //revive:disable-line:var-naming SACL, not Sacl
59 Dacl uintptr //revive:disable-line:var-naming DACL, not Dacl
60}
61
62type ntStatus int32
63
64func (status ntStatus) Err() error {
65 if status >= 0 {
66 return nil
67 }
68 return rtlNtStatusToDosError(status)
69}
70
71var (
72 // ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed.
73 ErrPipeListenerClosed = net.ErrClosed
74
75 errPipeWriteClosed = errors.New("pipe has been closed for write")
76)
77
78type win32Pipe struct {
79 *win32File
80 path string
81}
82
83type win32MessageBytePipe struct {
84 win32Pipe
85 writeClosed bool
86 readEOF bool
87}
88
89type pipeAddress string
90
91func (f *win32Pipe) LocalAddr() net.Addr {
92 return pipeAddress(f.path)
93}
94
95func (f *win32Pipe) RemoteAddr() net.Addr {
96 return pipeAddress(f.path)
97}
98
99func (f *win32Pipe) SetDeadline(t time.Time) error {
100 if err := f.SetReadDeadline(t); err != nil {
101 return err
102 }
103 return f.SetWriteDeadline(t)
104}
105
106// CloseWrite closes the write side of a message pipe in byte mode.
107func (f *win32MessageBytePipe) CloseWrite() error {
108 if f.writeClosed {
109 return errPipeWriteClosed
110 }
111 err := f.win32File.Flush()
112 if err != nil {
113 return err
114 }
115 _, err = f.win32File.Write(nil)
116 if err != nil {
117 return err
118 }
119 f.writeClosed = true
120 return nil
121}
122
123// Write writes bytes to a message pipe in byte mode. Zero-byte writes are ignored, since
124// they are used to implement CloseWrite().
125func (f *win32MessageBytePipe) Write(b []byte) (int, error) {
126 if f.writeClosed {
127 return 0, errPipeWriteClosed
128 }
129 if len(b) == 0 {
130 return 0, nil
131 }
132 return f.win32File.Write(b)
133}
134
135// Read reads bytes from a message pipe in byte mode. A read of a zero-byte message on a message
136// mode pipe will return io.EOF, as will all subsequent reads.
137func (f *win32MessageBytePipe) Read(b []byte) (int, error) {
138 if f.readEOF {
139 return 0, io.EOF
140 }
141 n, err := f.win32File.Read(b)
142 if err == io.EOF { //nolint:errorlint
143 // If this was the result of a zero-byte read, then
144 // it is possible that the read was due to a zero-size
145 // message. Since we are simulating CloseWrite with a
146 // zero-byte message, ensure that all future Read() calls
147 // also return EOF.
148 f.readEOF = true
149 } else if err == syscall.ERROR_MORE_DATA { //nolint:errorlint // err is Errno
150 // ERROR_MORE_DATA indicates that the pipe's read mode is message mode
151 // and the message still has more bytes. Treat this as a success, since
152 // this package presents all named pipes as byte streams.
153 err = nil
154 }
155 return n, err
156}
157
158func (pipeAddress) Network() string {
159 return "pipe"
160}
161
162func (s pipeAddress) String() string {
163 return string(s)
164}
165
166// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout.
167func tryDialPipe(ctx context.Context, path *string, access fs.AccessMask) (syscall.Handle, error) {
168 for {
169 select {
170 case <-ctx.Done():
171 return syscall.Handle(0), ctx.Err()
172 default:
173 wh, err := fs.CreateFile(*path,
174 access,
175 0, // mode
176 nil, // security attributes
177 fs.OPEN_EXISTING,
178 fs.FILE_FLAG_OVERLAPPED|fs.SECURITY_SQOS_PRESENT|fs.SECURITY_ANONYMOUS,
179 0, // template file handle
180 )
181 h := syscall.Handle(wh)
182 if err == nil {
183 return h, nil
184 }
185 if err != windows.ERROR_PIPE_BUSY { //nolint:errorlint // err is Errno
186 return h, &os.PathError{Err: err, Op: "open", Path: *path}
187 }
188 // Wait 10 msec and try again. This is a rather simplistic
189 // view, as we always try each 10 milliseconds.
190 time.Sleep(10 * time.Millisecond)
191 }
192 }
193}
194
195// DialPipe connects to a named pipe by path, timing out if the connection
196// takes longer than the specified duration. If timeout is nil, then we use
197// a default timeout of 2 seconds. (We do not use WaitNamedPipe.)
198func DialPipe(path string, timeout *time.Duration) (net.Conn, error) {
199 var absTimeout time.Time
200 if timeout != nil {
201 absTimeout = time.Now().Add(*timeout)
202 } else {
203 absTimeout = time.Now().Add(2 * time.Second)
204 }
205 ctx, cancel := context.WithDeadline(context.Background(), absTimeout)
206 defer cancel()
207 conn, err := DialPipeContext(ctx, path)
208 if errors.Is(err, context.DeadlineExceeded) {
209 return nil, ErrTimeout
210 }
211 return conn, err
212}
213
214// DialPipeContext attempts to connect to a named pipe by `path` until `ctx`
215// cancellation or timeout.
216func DialPipeContext(ctx context.Context, path string) (net.Conn, error) {
217 return DialPipeAccess(ctx, path, syscall.GENERIC_READ|syscall.GENERIC_WRITE)
218}
219
220// DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx`
221// cancellation or timeout.
222func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) {
223 var err error
224 var h syscall.Handle
225 h, err = tryDialPipe(ctx, &path, fs.AccessMask(access))
226 if err != nil {
227 return nil, err
228 }
229
230 var flags uint32
231 err = getNamedPipeInfo(h, &flags, nil, nil, nil)
232 if err != nil {
233 return nil, err
234 }
235
236 f, err := makeWin32File(h)
237 if err != nil {
238 syscall.Close(h)
239 return nil, err
240 }
241
242 // If the pipe is in message mode, return a message byte pipe, which
243 // supports CloseWrite().
244 if flags&windows.PIPE_TYPE_MESSAGE != 0 {
245 return &win32MessageBytePipe{
246 win32Pipe: win32Pipe{win32File: f, path: path},
247 }, nil
248 }
249 return &win32Pipe{win32File: f, path: path}, nil
250}
251
252type acceptResponse struct {
253 f *win32File
254 err error
255}
256
257type win32PipeListener struct {
258 firstHandle syscall.Handle
259 path string
260 config PipeConfig
261 acceptCh chan (chan acceptResponse)
262 closeCh chan int
263 doneCh chan int
264}
265
266func makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (syscall.Handle, error) {
267 path16, err := syscall.UTF16FromString(path)
268 if err != nil {
269 return 0, &os.PathError{Op: "open", Path: path, Err: err}
270 }
271
272 var oa objectAttributes
273 oa.Length = unsafe.Sizeof(oa)
274
275 var ntPath unicodeString
276 if err := rtlDosPathNameToNtPathName(&path16[0],
277 &ntPath,
278 0,
279 0,
280 ).Err(); err != nil {
281 return 0, &os.PathError{Op: "open", Path: path, Err: err}
282 }
283 defer localFree(ntPath.Buffer)
284 oa.ObjectName = &ntPath
285 oa.Attributes = windows.OBJ_CASE_INSENSITIVE
286
287 // The security descriptor is only needed for the first pipe.
288 if first {
289 if sd != nil {
290 l := uint32(len(sd))
291 sdb := localAlloc(0, l)
292 defer localFree(sdb)
293 copy((*[0xffff]byte)(unsafe.Pointer(sdb))[:], sd)
294 oa.SecurityDescriptor = (*securityDescriptor)(unsafe.Pointer(sdb))
295 } else {
296 // Construct the default named pipe security descriptor.
297 var dacl uintptr
298 if err := rtlDefaultNpAcl(&dacl).Err(); err != nil {
299 return 0, fmt.Errorf("getting default named pipe ACL: %w", err)
300 }
301 defer localFree(dacl)
302
303 sdb := &securityDescriptor{
304 Revision: 1,
305 Control: windows.SE_DACL_PRESENT,
306 Dacl: dacl,
307 }
308 oa.SecurityDescriptor = sdb
309 }
310 }
311
312 typ := uint32(windows.FILE_PIPE_REJECT_REMOTE_CLIENTS)
313 if c.MessageMode {
314 typ |= windows.FILE_PIPE_MESSAGE_TYPE
315 }
316
317 disposition := uint32(windows.FILE_OPEN)
318 access := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE | syscall.SYNCHRONIZE)
319 if first {
320 disposition = windows.FILE_CREATE
321 // By not asking for read or write access, the named pipe file system
322 // will put this pipe into an initially disconnected state, blocking
323 // client connections until the next call with first == false.
324 access = syscall.SYNCHRONIZE
325 }
326
327 timeout := int64(-50 * 10000) // 50ms
328
329 var (
330 h syscall.Handle
331 iosb ioStatusBlock
332 )
333 err = ntCreateNamedPipeFile(&h,
334 access,
335 &oa,
336 &iosb,
337 syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE,
338 disposition,
339 0,
340 typ,
341 0,
342 0,
343 0xffffffff,
344 uint32(c.InputBufferSize),
345 uint32(c.OutputBufferSize),
346 &timeout).Err()
347 if err != nil {
348 return 0, &os.PathError{Op: "open", Path: path, Err: err}
349 }
350
351 runtime.KeepAlive(ntPath)
352 return h, nil
353}
354
355func (l *win32PipeListener) makeServerPipe() (*win32File, error) {
356 h, err := makeServerPipeHandle(l.path, nil, &l.config, false)
357 if err != nil {
358 return nil, err
359 }
360 f, err := makeWin32File(h)
361 if err != nil {
362 syscall.Close(h)
363 return nil, err
364 }
365 return f, nil
366}
367
368func (l *win32PipeListener) makeConnectedServerPipe() (*win32File, error) {
369 p, err := l.makeServerPipe()
370 if err != nil {
371 return nil, err
372 }
373
374 // Wait for the client to connect.
375 ch := make(chan error)
376 go func(p *win32File) {
377 ch <- connectPipe(p)
378 }(p)
379
380 select {
381 case err = <-ch:
382 if err != nil {
383 p.Close()
384 p = nil
385 }
386 case <-l.closeCh:
387 // Abort the connect request by closing the handle.
388 p.Close()
389 p = nil
390 err = <-ch
391 if err == nil || err == ErrFileClosed { //nolint:errorlint // err is Errno
392 err = ErrPipeListenerClosed
393 }
394 }
395 return p, err
396}
397
398func (l *win32PipeListener) listenerRoutine() {
399 closed := false
400 for !closed {
401 select {
402 case <-l.closeCh:
403 closed = true
404 case responseCh := <-l.acceptCh:
405 var (
406 p *win32File
407 err error
408 )
409 for {
410 p, err = l.makeConnectedServerPipe()
411 // If the connection was immediately closed by the client, try
412 // again.
413 if err != windows.ERROR_NO_DATA { //nolint:errorlint // err is Errno
414 break
415 }
416 }
417 responseCh <- acceptResponse{p, err}
418 closed = err == ErrPipeListenerClosed //nolint:errorlint // err is Errno
419 }
420 }
421 syscall.Close(l.firstHandle)
422 l.firstHandle = 0
423 // Notify Close() and Accept() callers that the handle has been closed.
424 close(l.doneCh)
425}
426
427// PipeConfig contain configuration for the pipe listener.
428type PipeConfig struct {
429 // SecurityDescriptor contains a Windows security descriptor in SDDL format.
430 SecurityDescriptor string
431
432 // MessageMode determines whether the pipe is in byte or message mode. In either
433 // case the pipe is read in byte mode by default. The only practical difference in
434 // this implementation is that CloseWrite() is only supported for message mode pipes;
435 // CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only
436 // transferred to the reader (and returned as io.EOF in this implementation)
437 // when the pipe is in message mode.
438 MessageMode bool
439
440 // InputBufferSize specifies the size of the input buffer, in bytes.
441 InputBufferSize int32
442
443 // OutputBufferSize specifies the size of the output buffer, in bytes.
444 OutputBufferSize int32
445}
446
447// ListenPipe creates a listener on a Windows named pipe path, e.g. \\.\pipe\mypipe.
448// The pipe must not already exist.
449func ListenPipe(path string, c *PipeConfig) (net.Listener, error) {
450 var (
451 sd []byte
452 err error
453 )
454 if c == nil {
455 c = &PipeConfig{}
456 }
457 if c.SecurityDescriptor != "" {
458 sd, err = SddlToSecurityDescriptor(c.SecurityDescriptor)
459 if err != nil {
460 return nil, err
461 }
462 }
463 h, err := makeServerPipeHandle(path, sd, c, true)
464 if err != nil {
465 return nil, err
466 }
467 l := &win32PipeListener{
468 firstHandle: h,
469 path: path,
470 config: *c,
471 acceptCh: make(chan (chan acceptResponse)),
472 closeCh: make(chan int),
473 doneCh: make(chan int),
474 }
475 go l.listenerRoutine()
476 return l, nil
477}
478
479func connectPipe(p *win32File) error {
480 c, err := p.prepareIO()
481 if err != nil {
482 return err
483 }
484 defer p.wg.Done()
485
486 err = connectNamedPipe(p.handle, &c.o)
487 _, err = p.asyncIO(c, nil, 0, err)
488 if err != nil && err != windows.ERROR_PIPE_CONNECTED { //nolint:errorlint // err is Errno
489 return err
490 }
491 return nil
492}
493
494func (l *win32PipeListener) Accept() (net.Conn, error) {
495 ch := make(chan acceptResponse)
496 select {
497 case l.acceptCh <- ch:
498 response := <-ch
499 err := response.err
500 if err != nil {
501 return nil, err
502 }
503 if l.config.MessageMode {
504 return &win32MessageBytePipe{
505 win32Pipe: win32Pipe{win32File: response.f, path: l.path},
506 }, nil
507 }
508 return &win32Pipe{win32File: response.f, path: l.path}, nil
509 case <-l.doneCh:
510 return nil, ErrPipeListenerClosed
511 }
512}
513
514func (l *win32PipeListener) Close() error {
515 select {
516 case l.closeCh <- 1:
517 <-l.doneCh
518 case <-l.doneCh:
519 }
520 return nil
521}
522
523func (l *win32PipeListener) Addr() net.Addr {
524 return pipeAddress(l.path)
525}
diff --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
0new file mode 100644526new file mode 100644
index 0000000..48ce4e9
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go
@@ -0,0 +1,232 @@
1// Package guid provides a GUID type. The backing structure for a GUID is
2// identical to that used by the golang.org/x/sys/windows GUID type.
3// There are two main binary encodings used for a GUID, the big-endian encoding,
4// and the Windows (mixed-endian) encoding. See here for details:
5// https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding
6package guid
7
8import (
9 "crypto/rand"
10 "crypto/sha1" //nolint:gosec // not used for secure application
11 "encoding"
12 "encoding/binary"
13 "fmt"
14 "strconv"
15)
16
17//go:generate go run golang.org/x/tools/cmd/stringer -type=Variant -trimprefix=Variant -linecomment
18
19// Variant specifies which GUID variant (or "type") of the GUID. It determines
20// how the entirety of the rest of the GUID is interpreted.
21type Variant uint8
22
23// The variants specified by RFC 4122 section 4.1.1.
24const (
25 // VariantUnknown specifies a GUID variant which does not conform to one of
26 // the variant encodings specified in RFC 4122.
27 VariantUnknown Variant = iota
28 VariantNCS
29 VariantRFC4122 // RFC 4122
30 VariantMicrosoft
31 VariantFuture
32)
33
34// Version specifies how the bits in the GUID were generated. For instance, a
35// version 4 GUID is randomly generated, and a version 5 is generated from the
36// hash of an input string.
37type Version uint8
38
39func (v Version) String() string {
40 return strconv.FormatUint(uint64(v), 10)
41}
42
43var _ = (encoding.TextMarshaler)(GUID{})
44var _ = (encoding.TextUnmarshaler)(&GUID{})
45
46// NewV4 returns a new version 4 (pseudorandom) GUID, as defined by RFC 4122.
47func NewV4() (GUID, error) {
48 var b [16]byte
49 if _, err := rand.Read(b[:]); err != nil {
50 return GUID{}, err
51 }
52
53 g := FromArray(b)
54 g.setVersion(4) // Version 4 means randomly generated.
55 g.setVariant(VariantRFC4122)
56
57 return g, nil
58}
59
60// NewV5 returns a new version 5 (generated from a string via SHA-1 hashing)
61// GUID, as defined by RFC 4122. The RFC is unclear on the encoding of the name,
62// and the sample code treats it as a series of bytes, so we do the same here.
63//
64// Some implementations, such as those found on Windows, treat the name as a
65// big-endian UTF16 stream of bytes. If that is desired, the string can be
66// encoded as such before being passed to this function.
67func NewV5(namespace GUID, name []byte) (GUID, error) {
68 b := sha1.New() //nolint:gosec // not used for secure application
69 namespaceBytes := namespace.ToArray()
70 b.Write(namespaceBytes[:])
71 b.Write(name)
72
73 a := [16]byte{}
74 copy(a[:], b.Sum(nil))
75
76 g := FromArray(a)
77 g.setVersion(5) // Version 5 means generated from a string.
78 g.setVariant(VariantRFC4122)
79
80 return g, nil
81}
82
83func fromArray(b [16]byte, order binary.ByteOrder) GUID {
84 var g GUID
85 g.Data1 = order.Uint32(b[0:4])
86 g.Data2 = order.Uint16(b[4:6])
87 g.Data3 = order.Uint16(b[6:8])
88 copy(g.Data4[:], b[8:16])
89 return g
90}
91
92func (g GUID) toArray(order binary.ByteOrder) [16]byte {
93 b := [16]byte{}
94 order.PutUint32(b[0:4], g.Data1)
95 order.PutUint16(b[4:6], g.Data2)
96 order.PutUint16(b[6:8], g.Data3)
97 copy(b[8:16], g.Data4[:])
98 return b
99}
100
101// FromArray constructs a GUID from a big-endian encoding array of 16 bytes.
102func FromArray(b [16]byte) GUID {
103 return fromArray(b, binary.BigEndian)
104}
105
106// ToArray returns an array of 16 bytes representing the GUID in big-endian
107// encoding.
108func (g GUID) ToArray() [16]byte {
109 return g.toArray(binary.BigEndian)
110}
111
112// FromWindowsArray constructs a GUID from a Windows encoding array of bytes.
113func FromWindowsArray(b [16]byte) GUID {
114 return fromArray(b, binary.LittleEndian)
115}
116
117// ToWindowsArray returns an array of 16 bytes representing the GUID in Windows
118// encoding.
119func (g GUID) ToWindowsArray() [16]byte {
120 return g.toArray(binary.LittleEndian)
121}
122
123func (g GUID) String() string {
124 return fmt.Sprintf(
125 "%08x-%04x-%04x-%04x-%012x",
126 g.Data1,
127 g.Data2,
128 g.Data3,
129 g.Data4[:2],
130 g.Data4[2:])
131}
132
133// FromString parses a string containing a GUID and returns the GUID. The only
134// format currently supported is the `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
135// format.
136func FromString(s string) (GUID, error) {
137 if len(s) != 36 {
138 return GUID{}, fmt.Errorf("invalid GUID %q", s)
139 }
140 if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
141 return GUID{}, fmt.Errorf("invalid GUID %q", s)
142 }
143
144 var g GUID
145
146 data1, err := strconv.ParseUint(s[0:8], 16, 32)
147 if err != nil {
148 return GUID{}, fmt.Errorf("invalid GUID %q", s)
149 }
150 g.Data1 = uint32(data1)
151
152 data2, err := strconv.ParseUint(s[9:13], 16, 16)
153 if err != nil {
154 return GUID{}, fmt.Errorf("invalid GUID %q", s)
155 }
156 g.Data2 = uint16(data2)
157
158 data3, err := strconv.ParseUint(s[14:18], 16, 16)
159 if err != nil {
160 return GUID{}, fmt.Errorf("invalid GUID %q", s)
161 }
162 g.Data3 = uint16(data3)
163
164 for i, x := range []int{19, 21, 24, 26, 28, 30, 32, 34} {
165 v, err := strconv.ParseUint(s[x:x+2], 16, 8)
166 if err != nil {
167 return GUID{}, fmt.Errorf("invalid GUID %q", s)
168 }
169 g.Data4[i] = uint8(v)
170 }
171
172 return g, nil
173}
174
175func (g *GUID) setVariant(v Variant) {
176 d := g.Data4[0]
177 switch v {
178 case VariantNCS:
179 d = (d & 0x7f)
180 case VariantRFC4122:
181 d = (d & 0x3f) | 0x80
182 case VariantMicrosoft:
183 d = (d & 0x1f) | 0xc0
184 case VariantFuture:
185 d = (d & 0x0f) | 0xe0
186 case VariantUnknown:
187 fallthrough
188 default:
189 panic(fmt.Sprintf("invalid variant: %d", v))
190 }
191 g.Data4[0] = d
192}
193
194// Variant returns the GUID variant, as defined in RFC 4122.
195func (g GUID) Variant() Variant {
196 b := g.Data4[0]
197 if b&0x80 == 0 {
198 return VariantNCS
199 } else if b&0xc0 == 0x80 {
200 return VariantRFC4122
201 } else if b&0xe0 == 0xc0 {
202 return VariantMicrosoft
203 } else if b&0xe0 == 0xe0 {
204 return VariantFuture
205 }
206 return VariantUnknown
207}
208
209func (g *GUID) setVersion(v Version) {
210 g.Data3 = (g.Data3 & 0x0fff) | (uint16(v) << 12)
211}
212
213// Version returns the GUID version, as defined in RFC 4122.
214func (g GUID) Version() Version {
215 return Version((g.Data3 & 0xF000) >> 12)
216}
217
218// MarshalText returns the textual representation of the GUID.
219func (g GUID) MarshalText() ([]byte, error) {
220 return []byte(g.String()), nil
221}
222
223// UnmarshalText takes the textual representation of a GUID, and unmarhals it
224// into this GUID.
225func (g *GUID) UnmarshalText(text []byte) error {
226 g2, err := FromString(string(text))
227 if err != nil {
228 return err
229 }
230 *g = g2
231 return nil
232}
diff --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
0new file mode 100644233new file mode 100644
index 0000000..805bd35
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go
@@ -0,0 +1,16 @@
1//go:build !windows
2// +build !windows
3
4package guid
5
6// GUID represents a GUID/UUID. It has the same structure as
7// golang.org/x/sys/windows.GUID so that it can be used with functions expecting
8// that type. It is defined as its own type as that is only available to builds
9// targeted at `windows`. The representation matches that used by native Windows
10// code.
11type GUID struct {
12 Data1 uint32
13 Data2 uint16
14 Data3 uint16
15 Data4 [8]byte
16}
diff --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
0new file mode 10064417new file mode 100644
index 0000000..27e45ee
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go
@@ -0,0 +1,13 @@
1//go:build windows
2// +build windows
3
4package guid
5
6import "golang.org/x/sys/windows"
7
8// GUID represents a GUID/UUID. It has the same structure as
9// golang.org/x/sys/windows.GUID so that it can be used with functions expecting
10// that type. It is defined as its own type so that stringification and
11// marshaling can be supported. The representation matches that used by native
12// Windows code.
13type GUID windows.GUID
diff --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
0new file mode 10064414new file mode 100644
index 0000000..4076d31
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go
@@ -0,0 +1,27 @@
1// Code generated by "stringer -type=Variant -trimprefix=Variant -linecomment"; DO NOT EDIT.
2
3package guid
4
5import "strconv"
6
7func _() {
8 // An "invalid array index" compiler error signifies that the constant values have changed.
9 // Re-run the stringer command to generate them again.
10 var x [1]struct{}
11 _ = x[VariantUnknown-0]
12 _ = x[VariantNCS-1]
13 _ = x[VariantRFC4122-2]
14 _ = x[VariantMicrosoft-3]
15 _ = x[VariantFuture-4]
16}
17
18const _Variant_name = "UnknownNCSRFC 4122MicrosoftFuture"
19
20var _Variant_index = [...]uint8{0, 7, 10, 18, 27, 33}
21
22func (i Variant) String() string {
23 if i >= Variant(len(_Variant_index)-1) {
24 return "Variant(" + strconv.FormatInt(int64(i), 10) + ")"
25 }
26 return _Variant_name[_Variant_index[i]:_Variant_index[i+1]]
27}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/privilege.go b/debian/extra/vendor/github.com/Microsoft/go-winio/privilege.go
0new file mode 10064428new file mode 100644
index 0000000..0ff9dac
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/privilege.go
@@ -0,0 +1,197 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "bytes"
8 "encoding/binary"
9 "fmt"
10 "runtime"
11 "sync"
12 "syscall"
13 "unicode/utf16"
14
15 "golang.org/x/sys/windows"
16)
17
18//sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges
19//sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf
20//sys revertToSelf() (err error) = advapi32.RevertToSelf
21//sys openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken
22//sys getCurrentThread() (h syscall.Handle) = GetCurrentThread
23//sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW
24//sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW
25//sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW
26
27const (
28 //revive:disable-next-line:var-naming ALL_CAPS
29 SE_PRIVILEGE_ENABLED = windows.SE_PRIVILEGE_ENABLED
30
31 //revive:disable-next-line:var-naming ALL_CAPS
32 ERROR_NOT_ALL_ASSIGNED syscall.Errno = windows.ERROR_NOT_ALL_ASSIGNED
33
34 SeBackupPrivilege = "SeBackupPrivilege"
35 SeRestorePrivilege = "SeRestorePrivilege"
36 SeSecurityPrivilege = "SeSecurityPrivilege"
37)
38
39var (
40 privNames = make(map[string]uint64)
41 privNameMutex sync.Mutex
42)
43
44// PrivilegeError represents an error enabling privileges.
45type PrivilegeError struct {
46 privileges []uint64
47}
48
49func (e *PrivilegeError) Error() string {
50 s := "Could not enable privilege "
51 if len(e.privileges) > 1 {
52 s = "Could not enable privileges "
53 }
54 for i, p := range e.privileges {
55 if i != 0 {
56 s += ", "
57 }
58 s += `"`
59 s += getPrivilegeName(p)
60 s += `"`
61 }
62 return s
63}
64
65// RunWithPrivilege enables a single privilege for a function call.
66func RunWithPrivilege(name string, fn func() error) error {
67 return RunWithPrivileges([]string{name}, fn)
68}
69
70// RunWithPrivileges enables privileges for a function call.
71func RunWithPrivileges(names []string, fn func() error) error {
72 privileges, err := mapPrivileges(names)
73 if err != nil {
74 return err
75 }
76 runtime.LockOSThread()
77 defer runtime.UnlockOSThread()
78 token, err := newThreadToken()
79 if err != nil {
80 return err
81 }
82 defer releaseThreadToken(token)
83 err = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED)
84 if err != nil {
85 return err
86 }
87 return fn()
88}
89
90func mapPrivileges(names []string) ([]uint64, error) {
91 privileges := make([]uint64, 0, len(names))
92 privNameMutex.Lock()
93 defer privNameMutex.Unlock()
94 for _, name := range names {
95 p, ok := privNames[name]
96 if !ok {
97 err := lookupPrivilegeValue("", name, &p)
98 if err != nil {
99 return nil, err
100 }
101 privNames[name] = p
102 }
103 privileges = append(privileges, p)
104 }
105 return privileges, nil
106}
107
108// EnableProcessPrivileges enables privileges globally for the process.
109func EnableProcessPrivileges(names []string) error {
110 return enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED)
111}
112
113// DisableProcessPrivileges disables privileges globally for the process.
114func DisableProcessPrivileges(names []string) error {
115 return enableDisableProcessPrivilege(names, 0)
116}
117
118func enableDisableProcessPrivilege(names []string, action uint32) error {
119 privileges, err := mapPrivileges(names)
120 if err != nil {
121 return err
122 }
123
124 p := windows.CurrentProcess()
125 var token windows.Token
126 err = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token)
127 if err != nil {
128 return err
129 }
130
131 defer token.Close()
132 return adjustPrivileges(token, privileges, action)
133}
134
135func adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error {
136 var b bytes.Buffer
137 _ = binary.Write(&b, binary.LittleEndian, uint32(len(privileges)))
138 for _, p := range privileges {
139 _ = binary.Write(&b, binary.LittleEndian, p)
140 _ = binary.Write(&b, binary.LittleEndian, action)
141 }
142 prevState := make([]byte, b.Len())
143 reqSize := uint32(0)
144 success, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize)
145 if !success {
146 return err
147 }
148 if err == ERROR_NOT_ALL_ASSIGNED { //nolint:errorlint // err is Errno
149 return &PrivilegeError{privileges}
150 }
151 return nil
152}
153
154func getPrivilegeName(luid uint64) string {
155 var nameBuffer [256]uint16
156 bufSize := uint32(len(nameBuffer))
157 err := lookupPrivilegeName("", &luid, &nameBuffer[0], &bufSize)
158 if err != nil {
159 return fmt.Sprintf("<unknown privilege %d>", luid)
160 }
161
162 var displayNameBuffer [256]uint16
163 displayBufSize := uint32(len(displayNameBuffer))
164 var langID uint32
165 err = lookupPrivilegeDisplayName("", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID)
166 if err != nil {
167 return fmt.Sprintf("<unknown privilege %s>", string(utf16.Decode(nameBuffer[:bufSize])))
168 }
169
170 return string(utf16.Decode(displayNameBuffer[:displayBufSize]))
171}
172
173func newThreadToken() (windows.Token, error) {
174 err := impersonateSelf(windows.SecurityImpersonation)
175 if err != nil {
176 return 0, err
177 }
178
179 var token windows.Token
180 err = openThreadToken(getCurrentThread(), syscall.TOKEN_ADJUST_PRIVILEGES|syscall.TOKEN_QUERY, false, &token)
181 if err != nil {
182 rerr := revertToSelf()
183 if rerr != nil {
184 panic(rerr)
185 }
186 return 0, err
187 }
188 return token, nil
189}
190
191func releaseThreadToken(h windows.Token) {
192 err := revertToSelf()
193 if err != nil {
194 panic(err)
195 }
196 h.Close()
197}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/reparse.go b/debian/extra/vendor/github.com/Microsoft/go-winio/reparse.go
0new file mode 100644198new file mode 100644
index 0000000..67d1a10
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/reparse.go
@@ -0,0 +1,131 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "bytes"
8 "encoding/binary"
9 "fmt"
10 "strings"
11 "unicode/utf16"
12 "unsafe"
13)
14
15const (
16 reparseTagMountPoint = 0xA0000003
17 reparseTagSymlink = 0xA000000C
18)
19
20type reparseDataBuffer struct {
21 ReparseTag uint32
22 ReparseDataLength uint16
23 Reserved uint16
24 SubstituteNameOffset uint16
25 SubstituteNameLength uint16
26 PrintNameOffset uint16
27 PrintNameLength uint16
28}
29
30// ReparsePoint describes a Win32 symlink or mount point.
31type ReparsePoint struct {
32 Target string
33 IsMountPoint bool
34}
35
36// UnsupportedReparsePointError is returned when trying to decode a non-symlink or
37// mount point reparse point.
38type UnsupportedReparsePointError struct {
39 Tag uint32
40}
41
42func (e *UnsupportedReparsePointError) Error() string {
43 return fmt.Sprintf("unsupported reparse point %x", e.Tag)
44}
45
46// DecodeReparsePoint decodes a Win32 REPARSE_DATA_BUFFER structure containing either a symlink
47// or a mount point.
48func DecodeReparsePoint(b []byte) (*ReparsePoint, error) {
49 tag := binary.LittleEndian.Uint32(b[0:4])
50 return DecodeReparsePointData(tag, b[8:])
51}
52
53func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) {
54 isMountPoint := false
55 switch tag {
56 case reparseTagMountPoint:
57 isMountPoint = true
58 case reparseTagSymlink:
59 default:
60 return nil, &UnsupportedReparsePointError{tag}
61 }
62 nameOffset := 8 + binary.LittleEndian.Uint16(b[4:6])
63 if !isMountPoint {
64 nameOffset += 4
65 }
66 nameLength := binary.LittleEndian.Uint16(b[6:8])
67 name := make([]uint16, nameLength/2)
68 err := binary.Read(bytes.NewReader(b[nameOffset:nameOffset+nameLength]), binary.LittleEndian, &name)
69 if err != nil {
70 return nil, err
71 }
72 return &ReparsePoint{string(utf16.Decode(name)), isMountPoint}, nil
73}
74
75func isDriveLetter(c byte) bool {
76 return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
77}
78
79// EncodeReparsePoint encodes a Win32 REPARSE_DATA_BUFFER structure describing a symlink or
80// mount point.
81func EncodeReparsePoint(rp *ReparsePoint) []byte {
82 // Generate an NT path and determine if this is a relative path.
83 var ntTarget string
84 relative := false
85 if strings.HasPrefix(rp.Target, `\\?\`) {
86 ntTarget = `\??\` + rp.Target[4:]
87 } else if strings.HasPrefix(rp.Target, `\\`) {
88 ntTarget = `\??\UNC\` + rp.Target[2:]
89 } else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' {
90 ntTarget = `\??\` + rp.Target
91 } else {
92 ntTarget = rp.Target
93 relative = true
94 }
95
96 // The paths must be NUL-terminated even though they are counted strings.
97 target16 := utf16.Encode([]rune(rp.Target + "\x00"))
98 ntTarget16 := utf16.Encode([]rune(ntTarget + "\x00"))
99
100 size := int(unsafe.Sizeof(reparseDataBuffer{})) - 8
101 size += len(ntTarget16)*2 + len(target16)*2
102
103 tag := uint32(reparseTagMountPoint)
104 if !rp.IsMountPoint {
105 tag = reparseTagSymlink
106 size += 4 // Add room for symlink flags
107 }
108
109 data := reparseDataBuffer{
110 ReparseTag: tag,
111 ReparseDataLength: uint16(size),
112 SubstituteNameOffset: 0,
113 SubstituteNameLength: uint16((len(ntTarget16) - 1) * 2),
114 PrintNameOffset: uint16(len(ntTarget16) * 2),
115 PrintNameLength: uint16((len(target16) - 1) * 2),
116 }
117
118 var b bytes.Buffer
119 _ = binary.Write(&b, binary.LittleEndian, &data)
120 if !rp.IsMountPoint {
121 flags := uint32(0)
122 if relative {
123 flags |= 1
124 }
125 _ = binary.Write(&b, binary.LittleEndian, flags)
126 }
127
128 _ = binary.Write(&b, binary.LittleEndian, ntTarget16)
129 _ = binary.Write(&b, binary.LittleEndian, target16)
130 return b.Bytes()
131}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/sd.go b/debian/extra/vendor/github.com/Microsoft/go-winio/sd.go
0new file mode 100644132new file mode 100644
index 0000000..5550ef6
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/sd.go
@@ -0,0 +1,144 @@
1//go:build windows
2// +build windows
3
4package winio
5
6import (
7 "errors"
8 "syscall"
9 "unsafe"
10
11 "golang.org/x/sys/windows"
12)
13
14//sys lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountNameW
15//sys lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountSidW
16//sys convertSidToStringSid(sid *byte, str **uint16) (err error) = advapi32.ConvertSidToStringSidW
17//sys convertStringSidToSid(str *uint16, sid **byte) (err error) = advapi32.ConvertStringSidToSidW
18//sys convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW
19//sys convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) = advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW
20//sys localFree(mem uintptr) = LocalFree
21//sys getSecurityDescriptorLength(sd uintptr) (len uint32) = advapi32.GetSecurityDescriptorLength
22
23type AccountLookupError struct {
24 Name string
25 Err error
26}
27
28func (e *AccountLookupError) Error() string {
29 if e.Name == "" {
30 return "lookup account: empty account name specified"
31 }
32 var s string
33 switch {
34 case errors.Is(e.Err, windows.ERROR_INVALID_SID):
35 s = "the security ID structure is invalid"
36 case errors.Is(e.Err, windows.ERROR_NONE_MAPPED):
37 s = "not found"
38 default:
39 s = e.Err.Error()
40 }
41 return "lookup account " + e.Name + ": " + s
42}
43
44func (e *AccountLookupError) Unwrap() error { return e.Err }
45
46type SddlConversionError struct {
47 Sddl string
48 Err error
49}
50
51func (e *SddlConversionError) Error() string {
52 return "convert " + e.Sddl + ": " + e.Err.Error()
53}
54
55func (e *SddlConversionError) Unwrap() error { return e.Err }
56
57// LookupSidByName looks up the SID of an account by name
58//
59//revive:disable-next-line:var-naming SID, not Sid
60func LookupSidByName(name string) (sid string, err error) {
61 if name == "" {
62 return "", &AccountLookupError{name, windows.ERROR_NONE_MAPPED}
63 }
64
65 var sidSize, sidNameUse, refDomainSize uint32
66 err = lookupAccountName(nil, name, nil, &sidSize, nil, &refDomainSize, &sidNameUse)
67 if err != nil && err != syscall.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno
68 return "", &AccountLookupError{name, err}
69 }
70 sidBuffer := make([]byte, sidSize)
71 refDomainBuffer := make([]uint16, refDomainSize)
72 err = lookupAccountName(nil, name, &sidBuffer[0], &sidSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)
73 if err != nil {
74 return "", &AccountLookupError{name, err}
75 }
76 var strBuffer *uint16
77 err = convertSidToStringSid(&sidBuffer[0], &strBuffer)
78 if err != nil {
79 return "", &AccountLookupError{name, err}
80 }
81 sid = syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(strBuffer))[:])
82 localFree(uintptr(unsafe.Pointer(strBuffer)))
83 return sid, nil
84}
85
86// LookupNameBySid looks up the name of an account by SID
87//
88//revive:disable-next-line:var-naming SID, not Sid
89func LookupNameBySid(sid string) (name string, err error) {
90 if sid == "" {
91 return "", &AccountLookupError{sid, windows.ERROR_NONE_MAPPED}
92 }
93
94 sidBuffer, err := windows.UTF16PtrFromString(sid)
95 if err != nil {
96 return "", &AccountLookupError{sid, err}
97 }
98
99 var sidPtr *byte
100 if err = convertStringSidToSid(sidBuffer, &sidPtr); err != nil {
101 return "", &AccountLookupError{sid, err}
102 }
103 defer localFree(uintptr(unsafe.Pointer(sidPtr)))
104
105 var nameSize, refDomainSize, sidNameUse uint32
106 err = lookupAccountSid(nil, sidPtr, nil, &nameSize, nil, &refDomainSize, &sidNameUse)
107 if err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno
108 return "", &AccountLookupError{sid, err}
109 }
110
111 nameBuffer := make([]uint16, nameSize)
112 refDomainBuffer := make([]uint16, refDomainSize)
113 err = lookupAccountSid(nil, sidPtr, &nameBuffer[0], &nameSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)
114 if err != nil {
115 return "", &AccountLookupError{sid, err}
116 }
117
118 name = windows.UTF16ToString(nameBuffer)
119 return name, nil
120}
121
122func SddlToSecurityDescriptor(sddl string) ([]byte, error) {
123 var sdBuffer uintptr
124 err := convertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, &sdBuffer, nil)
125 if err != nil {
126 return nil, &SddlConversionError{sddl, err}
127 }
128 defer localFree(sdBuffer)
129 sd := make([]byte, getSecurityDescriptorLength(sdBuffer))
130 copy(sd, (*[0xffff]byte)(unsafe.Pointer(sdBuffer))[:len(sd)])
131 return sd, nil
132}
133
134func SecurityDescriptorToSddl(sd []byte) (string, error) {
135 var sddl *uint16
136 // The returned string length seems to include an arbitrary number of terminating NULs.
137 // Don't use it.
138 err := convertSecurityDescriptorToStringSecurityDescriptor(&sd[0], 1, 0xff, &sddl, nil)
139 if err != nil {
140 return "", err
141 }
142 defer localFree(uintptr(unsafe.Pointer(sddl)))
143 return syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(sddl))[:]), nil
144}
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/syscall.go b/debian/extra/vendor/github.com/Microsoft/go-winio/syscall.go
0new file mode 100644145new file mode 100644
index 0000000..a6ca111
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/syscall.go
@@ -0,0 +1,5 @@
1//go:build windows
2
3package winio
4
5//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go ./*.go
diff --git a/debian/extra/vendor/github.com/Microsoft/go-winio/tools.go b/debian/extra/vendor/github.com/Microsoft/go-winio/tools.go
0new file mode 1006446new file mode 100644
index 0000000..2aa0458
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/tools.go
@@ -0,0 +1,5 @@
1//go:build tools
2
3package winio
4
5import _ "golang.org/x/tools/cmd/stringer"
diff --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
0new file mode 1006446new file mode 100644
index 0000000..469b16f
--- /dev/null
+++ b/debian/extra/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
@@ -0,0 +1,419 @@
1//go:build windows
2
3// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
4
5package winio
6
7import (
8 "syscall"
9 "unsafe"
10
11 "golang.org/x/sys/windows"
12)
13
14var _ unsafe.Pointer
15
16// Do the interface allocations only once for common
17// Errno values.
18const (
19 errnoERROR_IO_PENDING = 997
20)
21
22var (
23 errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
24 errERROR_EINVAL error = syscall.EINVAL
25)
26
27// errnoErr returns common boxed Errno values, to prevent
28// allocations at runtime.
29func errnoErr(e syscall.Errno) error {
30 switch e {
31 case 0:
32 return errERROR_EINVAL
33 case errnoERROR_IO_PENDING:
34 return errERROR_IO_PENDING
35 }
36 // TODO: add more here, after collecting data on the common
37 // error values see on Windows. (perhaps when running
38 // all.bat?)
39 return e
40}
41
42var (
43 modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
44 modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
45 modntdll = windows.NewLazySystemDLL("ntdll.dll")
46 modws2_32 = windows.NewLazySystemDLL("ws2_32.dll")
47
48 procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
49 procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
50 procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
51 procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
52 procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
53 procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
54 procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
55 procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
56 procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
57 procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW")
58 procLookupPrivilegeNameW = modadvapi32.NewProc("LookupPrivilegeNameW")
59 procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
60 procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
61 procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
62 procBackupRead = modkernel32.NewProc("BackupRead")
63 procBackupWrite = modkernel32.NewProc("BackupWrite")
64 procCancelIoEx = modkernel32.NewProc("CancelIoEx")
65 procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
66 procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
67 procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
68 procGetCurrentThread = modkernel32.NewProc("GetCurrentThread")
69 procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
70 procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
71 procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
72 procLocalAlloc = modkernel32.NewProc("LocalAlloc")
73 procLocalFree = modkernel32.NewProc("LocalFree")
74 procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
75 procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
76 procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl")
77 procRtlDosPathNameToNtPathName_U = modntdll.NewProc("RtlDosPathNameToNtPathName_U")
78 procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb")
79 procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult")
80)
81
82func adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) {
83 var _p0 uint32
84 if releaseAll {
85 _p0 = 1
86 }
87 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)))
88 success = r0 != 0
89 if true {
90 err = errnoErr(e1)
91 }
92 return
93}
94
95func convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) {
96 r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(secInfo), uintptr(unsafe.Pointer(sddl)), uintptr(unsafe.Pointer(sddlSize)), 0)
97 if r1 == 0 {
98 err = errnoErr(e1)
99 }
100 return
101}
102
103func convertSidToStringSid(sid *byte, str **uint16) (err error) {
104 r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(str)), 0)
105 if r1 == 0 {
106 err = errnoErr(e1)
107 }
108 return
109}
110
111func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) {
112 var _p0 *uint16
113 _p0, err = syscall.UTF16PtrFromString(str)
114 if err != nil {
115 return
116 }
117 return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
118}
119
120func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd *uintptr, size *uint32) (err error) {
121 r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
122 if r1 == 0 {
123 err = errnoErr(e1)
124 }
125 return
126}
127
128func convertStringSidToSid(str *uint16, sid **byte) (err error) {
129 r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(sid)), 0)
130 if r1 == 0 {
131 err = errnoErr(e1)
132 }
133 return
134}
135
136func getSecurityDescriptorLength(sd uintptr) (len uint32) {
137 r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(sd), 0, 0)
138 len = uint32(r0)
139 return
140}
141
142func impersonateSelf(level uint32) (err error) {
143 r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(level), 0, 0)
144 if r1 == 0 {
145 err = errnoErr(e1)
146 }
147 return
148}
149
150func lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
151 var _p0 *uint16
152 _p0, err = syscall.UTF16PtrFromString(accountName)
153 if err != nil {
154 return
155 }
156 return _lookupAccountName(systemName, _p0, sid, sidSize, refDomain, refDomainSize, sidNameUse)
157}
158
159func _lookupAccountName(systemName *uint16, accountName *uint16, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
160 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)
161 if r1 == 0 {
162 err = errnoErr(e1)
163 }
164 return
165}
166
167func lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
168 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)
169 if r1 == 0 {
170 err = errnoErr(e1)
171 }
172 return
173}
174
175func lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
176 var _p0 *uint16
177 _p0, err = syscall.UTF16PtrFromString(systemName)
178 if err != nil {
179 return
180 }
181 return _lookupPrivilegeDisplayName(_p0, name, buffer, size, languageId)
182}
183
184func _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
185 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)
186 if r1 == 0 {
187 err = errnoErr(e1)
188 }
189 return
190}
191
192func lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) {
193 var _p0 *uint16
194 _p0, err = syscall.UTF16PtrFromString(systemName)
195 if err != nil {
196 return
197 }
198 return _lookupPrivilegeName(_p0, luid, buffer, size)
199}
200
201func _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint16, size *uint32) (err error) {
202 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)
203 if r1 == 0 {
204 err = errnoErr(e1)
205 }
206 return
207}
208
209func lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) {
210 var _p0 *uint16
211 _p0, err = syscall.UTF16PtrFromString(systemName)
212 if err != nil {
213 return
214 }
215 var _p1 *uint16
216 _p1, err = syscall.UTF16PtrFromString(name)
217 if err != nil {
218 return
219 }
220 return _lookupPrivilegeValue(_p0, _p1, luid)
221}
222
223func _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint64) (err error) {
224 r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
225 if r1 == 0 {
226 err = errnoErr(e1)
227 }
228 return
229}
230
231func openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) {
232 var _p0 uint32
233 if openAsSelf {
234 _p0 = 1
235 }
236 r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(accessMask), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
237 if r1 == 0 {
238 err = errnoErr(e1)
239 }
240 return
241}
242
243func revertToSelf() (err error) {
244 r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
245 if r1 == 0 {
246 err = errnoErr(e1)
247 }
248 return
249}
250
251func backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
252 var _p0 *byte
253 if len(b) > 0 {
254 _p0 = &b[0]
255 }
256 var _p1 uint32
257 if abort {
258 _p1 = 1
259 }
260 var _p2 uint32
261 if processSecurity {
262 _p2 = 1
263 }
264 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)
265 if r1 == 0 {
266 err = errnoErr(e1)
267 }
268 return
269}
270
271func backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
272 var _p0 *byte
273 if len(b) > 0 {
274 _p0 = &b[0]
275 }
276 var _p1 uint32
277 if abort {
278 _p1 = 1
279 }
280 var _p2 uint32
281 if processSecurity {
282 _p2 = 1
283 }
284 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)
285 if r1 == 0 {
286 err = errnoErr(e1)
287 }
288 return
289}
290
291func cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) {
292 r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(file), uintptr(unsafe.Pointer(o)), 0)
293 if r1 == 0 {
294 err = errnoErr(e1)
295 }
296 return
297}
298
299func connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) {
300 r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(o)), 0)
301 if r1 == 0 {
302 err = errnoErr(e1)
303 }
304 return
305}
306
307func createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) {
308 r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount), 0, 0)
309 newport = syscall.Handle(r0)
310 if newport == 0 {
311 err = errnoErr(e1)
312 }
313 return
314}
315
316func createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) {
317 var _p0 *uint16
318 _p0, err = syscall.UTF16PtrFromString(name)
319 if err != nil {
320 return
321 }
322 return _createNamedPipe(_p0, flags, pipeMode, maxInstances, outSize, inSize, defaultTimeout, sa)
323}
324
325func _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) {
326 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)
327 handle = syscall.Handle(r0)
328 if handle == syscall.InvalidHandle {
329 err = errnoErr(e1)
330 }
331 return
332}
333
334func getCurrentThread() (h syscall.Handle) {
335 r0, _, _ := syscall.Syscall(procGetCurrentThread.Addr(), 0, 0, 0, 0)
336 h = syscall.Handle(r0)
337 return
338}
339
340func getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
341 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)
342 if r1 == 0 {
343 err = errnoErr(e1)
344 }
345 return
346}
347
348func getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
349 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)
350 if r1 == 0 {
351 err = errnoErr(e1)
352 }
353 return
354}
355
356func getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) {
357 r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(port), uintptr(unsafe.Pointer(bytes)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(o)), uintptr(timeout), 0)
358 if r1 == 0 {
359 err = errnoErr(e1)
360 }
361 return
362}
363
364func localAlloc(uFlags uint32, length uint32) (ptr uintptr) {
365 r0, _, _ := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(uFlags), uintptr(length), 0)
366 ptr = uintptr(r0)
367 return
368}
369
370func localFree(mem uintptr) {
371 syscall.Syscall(procLocalFree.Addr(), 1, uintptr(mem), 0, 0)
372 return
373}
374
375func setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) {
376 r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(h), uintptr(flags), 0)
377 if r1 == 0 {
378 err = errnoErr(e1)
379 }
380 return
381}
382
383func 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) {
384 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)
385 status = ntStatus(r0)
386 return
387}
388
389func rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) {
390 r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(dacl)), 0, 0)
391 status = ntStatus(r0)
392 return
393}
394
395func rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) {
396 r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ntName)), uintptr(filePart), uintptr(reserved), 0, 0)
397 status = ntStatus(r0)
398 return
399}
400
401func rtlNtStatusToDosError(status ntStatus) (winerr error) {
402 r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(status), 0, 0)
403 if r0 != 0 {
404 winerr = syscall.Errno(r0)
405 }
406 return
407}
408
409func wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) {
410 var _p0 uint32
411 if wait {
412 _p0 = 1
413 }
414 r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0)
415 if r1 == 0 {
416 err = errnoErr(e1)
417 }
418 return
419}
diff --git a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go
index 6c16c25..c6f66f1 100644
--- a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go
+++ b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/decode.go
@@ -56,6 +56,7 @@ type Unmarshaler struct {
56// implement JSONPBMarshaler so that the custom format can be produced.56// implement JSONPBMarshaler so that the custom format can be produced.
57//57//
58// The JSON unmarshaling must follow the JSON to proto specification:58// The JSON unmarshaling must follow the JSON to proto specification:
59//
59// https://developers.google.com/protocol-buffers/docs/proto3#json60// https://developers.google.com/protocol-buffers/docs/proto3#json
60//61//
61// Deprecated: Custom types should implement protobuf reflection instead.62// Deprecated: Custom types should implement protobuf reflection instead.
diff --git a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go
index 685c80a..e9438a9 100644
--- a/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go
+++ b/debian/extra/vendor/github.com/golang/protobuf/jsonpb/encode.go
@@ -55,6 +55,7 @@ type Marshaler struct {
55// implement JSONPBUnmarshaler so that the custom format can be parsed.55// implement JSONPBUnmarshaler so that the custom format can be parsed.
56//56//
57// The JSON marshaling must follow the proto to JSON specification:57// The JSON marshaling must follow the proto to JSON specification:
58//
58// https://developers.google.com/protocol-buffers/docs/proto3#json59// https://developers.google.com/protocol-buffers/docs/proto3#json
59//60//
60// Deprecated: Custom types should implement protobuf reflection instead.61// Deprecated: Custom types should implement protobuf reflection instead.
diff --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