From a40d03e544ced9aec1de4a620dcef41fcf100a62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Apr 2023 05:01:35 +0000 Subject: [PATCH] build(deps): bump github.com/containers/storage Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.45.5-0.20230326103843-b1216421c44b to 1.46.0. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/commits/v1.46.0) --- updated-dependencies: - dependency-name: github.com/containers/storage dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- common/go.mod | 8 +- common/go.sum | 18 +- .../github.com/containers/storage/.cirrus.yml | 26 +- .../containers/storage/.golangci.yml | 36 ++- .../github.com/containers/storage/Makefile | 6 +- .../github.com/containers/storage/VERSION | 2 +- .../containers/storage/containers.go | 51 ++-- .../containers/storage/drivers/aufs/aufs.go | 2 +- .../containers/storage/drivers/btrfs/btrfs.go | 2 +- .../storage/drivers/copy/copy_linux.go | 4 +- .../storage/drivers/copy/copy_unsupported.go | 4 +- .../storage/drivers/devmapper/device_setup.go | 6 +- .../storage/drivers/devmapper/deviceset.go | 7 +- .../containers/storage/drivers/driver.go | 4 +- .../storage/drivers/driver_solaris.go | 2 +- .../storage/drivers/overlay/overlay.go | 41 +-- .../containers/storage/drivers/vfs/driver.go | 16 +- .../github.com/containers/storage/images.go | 73 ++++-- .../github.com/containers/storage/layers.go | 167 ++++++------ .../storage/pkg/archive/archive_linux.go | 6 +- .../storage/pkg/archive/changes_linux.go | 4 +- .../containers/storage/pkg/archive/wrap.go | 4 +- .../storage/pkg/chunked/cache_linux.go | 5 +- .../storage/pkg/chunked/compression_linux.go | 5 +- .../storage/pkg/chunked/storage_linux.go | 7 +- .../storage/pkg/devicemapper/devmapper.go | 11 +- .../storage/pkg/devicemapper/devmapper_log.go | 1 + .../storage/pkg/fileutils/fileutils.go | 2 +- .../storage/pkg/idmap/idmapped_utils.go | 4 +- .../containers/storage/pkg/parsers/parsers.go | 15 +- .../containers/storage/pkg/reexec/reexec.go | 2 +- .../storage/pkg/system/chtimes_unix.go | 6 +- .../storage/pkg/system/chtimes_windows.go | 4 +- .../storage/pkg/system/meminfo_freebsd.go | 3 +- .../storage/pkg/system/meminfo_solaris.go | 3 +- .../storage/pkg/system/meminfo_windows.go | 3 +- .../storage/pkg/unshare/unshare_linux.go | 9 +- .../containers/storage/storage.conf | 2 + .../github.com/containers/storage/store.go | 237 ++++++++++++++---- .../github.com/containers/storage/userns.go | 2 +- .../github.com/containers/storage/utils.go | 13 - .../vbatts/tar-split/archive/tar/reader.go | 12 +- .../vbatts/tar-split/tar/asm/assemble.go | 2 + .../golang.org/x/sys/unix/ioctl_signed.go | 70 ++++++ .../sys/unix/{ioctl.go => ioctl_unsigned.go} | 4 +- .../vendor/golang.org/x/sys/unix/ioctl_zos.go | 12 +- .../vendor/golang.org/x/sys/unix/mkerrors.sh | 2 + .../golang.org/x/sys/unix/syscall_aix.go | 4 +- .../golang.org/x/sys/unix/syscall_aix_ppc.go | 1 - .../x/sys/unix/syscall_aix_ppc64.go | 1 - .../golang.org/x/sys/unix/syscall_darwin.go | 3 +- .../x/sys/unix/syscall_dragonfly.go | 1 - .../golang.org/x/sys/unix/syscall_freebsd.go | 1 - .../golang.org/x/sys/unix/syscall_linux.go | 10 +- .../x/sys/unix/syscall_linux_386.go | 27 -- .../x/sys/unix/syscall_linux_amd64.go | 1 - .../x/sys/unix/syscall_linux_arm.go | 27 -- .../x/sys/unix/syscall_linux_arm64.go | 10 - .../x/sys/unix/syscall_linux_loong64.go | 5 - .../x/sys/unix/syscall_linux_mips64x.go | 1 - .../x/sys/unix/syscall_linux_mipsx.go | 27 -- .../x/sys/unix/syscall_linux_ppc.go | 27 -- .../x/sys/unix/syscall_linux_ppc64x.go | 1 - .../x/sys/unix/syscall_linux_riscv64.go | 1 - .../x/sys/unix/syscall_linux_s390x.go | 1 - .../x/sys/unix/syscall_linux_sparc64.go | 1 - .../golang.org/x/sys/unix/syscall_netbsd.go | 2 - .../golang.org/x/sys/unix/syscall_openbsd.go | 1 - .../golang.org/x/sys/unix/syscall_solaris.go | 21 +- .../golang.org/x/sys/unix/syscall_unix.go | 7 + .../x/sys/unix/syscall_zos_s390x.go | 4 +- .../x/sys/unix/zerrors_darwin_amd64.go | 19 ++ .../x/sys/unix/zerrors_darwin_arm64.go | 19 ++ .../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 15 +- .../x/sys/unix/zsyscall_aix_ppc64.go | 18 +- .../x/sys/unix/zsyscall_aix_ppc64_gc.go | 10 - .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 10 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 39 +-- .../x/sys/unix/zsyscall_darwin_amd64.s | 11 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 39 +-- .../x/sys/unix/zsyscall_darwin_arm64.s | 11 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 10 - .../x/sys/unix/zsyscall_freebsd_386.go | 10 - .../x/sys/unix/zsyscall_freebsd_amd64.go | 10 - .../x/sys/unix/zsyscall_freebsd_arm.go | 10 - .../x/sys/unix/zsyscall_freebsd_arm64.go | 10 - .../x/sys/unix/zsyscall_freebsd_riscv64.go | 10 - .../golang.org/x/sys/unix/zsyscall_linux.go | 10 - .../x/sys/unix/zsyscall_linux_386.go | 10 - .../x/sys/unix/zsyscall_linux_amd64.go | 10 - .../x/sys/unix/zsyscall_linux_arm.go | 10 - .../x/sys/unix/zsyscall_linux_arm64.go | 10 - .../x/sys/unix/zsyscall_linux_mips.go | 10 - .../x/sys/unix/zsyscall_linux_mips64.go | 10 - .../x/sys/unix/zsyscall_linux_mips64le.go | 10 - .../x/sys/unix/zsyscall_linux_mipsle.go | 10 - .../x/sys/unix/zsyscall_linux_ppc.go | 10 - .../x/sys/unix/zsyscall_linux_ppc64.go | 10 - .../x/sys/unix/zsyscall_linux_ppc64le.go | 10 - .../x/sys/unix/zsyscall_linux_riscv64.go | 10 - .../x/sys/unix/zsyscall_linux_s390x.go | 10 - .../x/sys/unix/zsyscall_linux_sparc64.go | 10 - .../x/sys/unix/zsyscall_netbsd_386.go | 10 - .../x/sys/unix/zsyscall_netbsd_amd64.go | 10 - .../x/sys/unix/zsyscall_netbsd_arm.go | 10 - .../x/sys/unix/zsyscall_netbsd_arm64.go | 10 - .../x/sys/unix/zsyscall_openbsd_386.go | 14 -- .../x/sys/unix/zsyscall_openbsd_386.s | 5 - .../x/sys/unix/zsyscall_openbsd_amd64.go | 14 -- .../x/sys/unix/zsyscall_openbsd_amd64.s | 5 - .../x/sys/unix/zsyscall_openbsd_arm.go | 14 -- .../x/sys/unix/zsyscall_openbsd_arm.s | 5 - .../x/sys/unix/zsyscall_openbsd_arm64.go | 14 -- .../x/sys/unix/zsyscall_openbsd_arm64.s | 5 - .../x/sys/unix/zsyscall_openbsd_mips64.go | 14 -- .../x/sys/unix/zsyscall_openbsd_mips64.s | 5 - .../x/sys/unix/zsyscall_openbsd_ppc64.go | 14 -- .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 - .../x/sys/unix/zsyscall_openbsd_riscv64.go | 14 -- .../x/sys/unix/zsyscall_openbsd_riscv64.s | 5 - .../x/sys/unix/zsyscall_solaris_amd64.go | 17 +- .../x/sys/unix/zsyscall_zos_s390x.go | 4 +- .../x/sys/unix/ztypes_darwin_amd64.go | 11 + .../x/sys/unix/ztypes_darwin_arm64.go | 11 + .../golang.org/x/sys/windows/types_windows.go | 4 +- common/vendor/modules.txt | 10 +- 126 files changed, 768 insertions(+), 974 deletions(-) create mode 100644 common/vendor/golang.org/x/sys/unix/ioctl_signed.go rename common/vendor/golang.org/x/sys/unix/{ioctl.go => ioctl_unsigned.go} (92%) diff --git a/common/go.mod b/common/go.mod index 8413f42be7..dd3fb669d3 100644 --- a/common/go.mod +++ b/common/go.mod @@ -10,7 +10,7 @@ require ( github.com/containernetworking/plugins v1.2.0 github.com/containers/image/v5 v5.24.2 github.com/containers/ocicrypt v1.1.7 - github.com/containers/storage v1.45.5-0.20230326103843-b1216421c44b + github.com/containers/storage v1.46.0 github.com/coreos/go-systemd/v22 v22.5.0 github.com/cyphar/filepath-securejoin v0.2.3 github.com/davecgh/go-spew v1.1.1 @@ -28,7 +28,7 @@ require ( github.com/onsi/gomega v1.27.6 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b - github.com/opencontainers/runc v1.1.4 + github.com/opencontainers/runc v1.1.5 github.com/opencontainers/runtime-spec v1.1.0-rc.1 github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 github.com/opencontainers/selinux v1.11.0 @@ -44,7 +44,7 @@ require ( go.etcd.io/bbolt v1.3.7 golang.org/x/crypto v0.7.0 golang.org/x/sync v0.1.0 - golang.org/x/sys v0.6.0 + golang.org/x/sys v0.7.0 golang.org/x/term v0.6.0 ) @@ -114,7 +114,7 @@ require ( github.com/theupdateframework/go-tuf v0.5.2 // indirect github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/vbatts/tar-split v0.11.2 // indirect + github.com/vbatts/tar-split v0.11.3 // indirect github.com/vbauerster/mpb/v7 v7.5.3 // indirect github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect go.mongodb.org/mongo-driver v1.11.1 // indirect diff --git a/common/go.sum b/common/go.sum index 1f0072cf4b..4545d98cf2 100644 --- a/common/go.sum +++ b/common/go.sum @@ -52,11 +52,10 @@ github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYgle github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= github.com/containers/ocicrypt v1.1.7 h1:thhNr4fu2ltyGz8aMx8u48Ae0Pnbip3ePP9/mzkZ/3U= github.com/containers/ocicrypt v1.1.7/go.mod h1:7CAhjcj2H8AYp5YvEie7oVSK2AhBY8NscCYRawuDNtw= -github.com/containers/storage v1.45.5-0.20230326103843-b1216421c44b h1:ip+OrrC/fT7iqIuNHXmfxq7Xc5myNesE/e99qu8p030= -github.com/containers/storage v1.45.5-0.20230326103843-b1216421c44b/go.mod h1:oZ5Sscs6ALLhT3j2qTZAtD5Mi8B3G6+PFa54raz7pF4= +github.com/containers/storage v1.46.0 h1:K3Tw/U+ZwmMT/tzX04mh5wnK2PuIdEGS2BGMP7ZYAqw= +github.com/containers/storage v1.46.0/go.mod h1:AVNewDV1jODy8b4Ia4AgsJ6UFKQSIaOQvQ8S6N4VuH0= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberphone/json-canonicalization v0.0.0-20220623050100-57a0ce2678a7 h1:vU+EP9ZuFUCYE0NYLwTSob+3LNEJATzNfP/DC7SWGWI= @@ -347,13 +346,11 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y= github.com/seccomp/libseccomp-golang v0.10.0 h1:aA4bp+/Zzi0BnWZ2F1wgNBs5gTpm+na2rWM6M9YjLpY= github.com/seccomp/libseccomp-golang v0.10.0/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sigstore/fulcio v1.1.0 h1:mzzJ05Ccu8Y2inyioklNvc8MpzlGHxu8YqNeTm0dHfU= github.com/sigstore/fulcio v1.1.0/go.mod h1:zv1ZQTXZbUwQdRwajlQksc34pRas+2aZYpIZoQBNev8= github.com/sigstore/rekor v1.0.1 h1:rcESXSNkAPRWFYZel9rarspdvneET60F2ngNkadi89c= @@ -404,9 +401,9 @@ github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHT github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.19.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= -github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= +github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= +github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= +github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= github.com/vbauerster/mpb/v7 v7.5.3 h1:BkGfmb6nMrrBQDFECR/Q7RkKCw7ylMetCb4079CGs4w= github.com/vbauerster/mpb/v7 v7.5.3/go.mod h1:i+h4QY6lmLvBNK2ah1fSreiw3ajskRlBp9AhY/PnuOE= github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= @@ -521,10 +518,11 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/common/vendor/github.com/containers/storage/.cirrus.yml b/common/vendor/github.com/containers/storage/.cirrus.yml index f8fe6b6156..364790f3b9 100644 --- a/common/vendor/github.com/containers/storage/.cirrus.yml +++ b/common/vendor/github.com/containers/storage/.cirrus.yml @@ -17,15 +17,15 @@ env: #### #### Cache-image names to test with (double-quotes around names are critical) ### - FEDORA_NAME: "fedora-37" ### 20230120t152650z-f37f36u2204 - UBUNTU_NAME: "ubuntu-2204" ### 20230120t152650z-f37f36u2204 + FEDORA_NAME: "fedora-37" + DEBIAN_NAME: "debian-12" # GCE project where images live IMAGE_PROJECT: "libpod-218412" # VM Image built in containers/automation_images - IMAGE_SUFFIX: "c20230120t152650z-f37f36u2204" + IMAGE_SUFFIX: "c20230330t153101z-f37f36d12" FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}" - UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}" + DEBIAN_CACHE_IMAGE_NAME: "debian-${IMAGE_SUFFIX}" #### #### Command variables to help avoid duplication @@ -67,7 +67,7 @@ linux_testing: &linux_testing always: df_script: '${_DFCMD} || true' rh_audit_log_script: '${_RAUDITCMD} || true' - ubuntu_audit_log_script: '${_UAUDITCMD} || true' + debian_audit_log_script: '${_UAUDITCMD} || true' journal_log_script: '${_JOURNALCMD} || true' @@ -95,13 +95,13 @@ fedora_testing_task: &fedora_testing # aufs was dropped between 20.04 and 22.04, can't test it -ubuntu_testing_task: &ubuntu_testing +debian_testing_task: &debian_testing <<: *linux_testing - alias: ubuntu_testing + alias: debian_testing name: *std_test_name env: - OS_NAME: "${UBUNTU_NAME}" - VM_IMAGE: "${UBUNTU_CACHE_IMAGE_NAME}" + OS_NAME: "${DEBIAN_NAME}" + VM_IMAGE: "${DEBIAN_CACHE_IMAGE_NAME}" # Not all $TEST_DRIVER combinations valid for all $VM_IMAGE types. matrix: - env: @@ -122,7 +122,7 @@ lint_task: env: CIRRUS_WORKING_DIR: "/go/src/github.com/containers/storage" container: - image: golang:1.17 + image: golang modules_cache: fingerprint_script: cat go.sum folder: $GOPATH/pkg/mod @@ -145,7 +145,7 @@ meta_task: # Space-separated list of images used by this repository state IMGNAMES: |- ${FEDORA_CACHE_IMAGE_NAME} - ${UBUNTU_CACHE_IMAGE_NAME} + ${DEBIAN_CACHE_IMAGE_NAME} BUILDID: "${CIRRUS_BUILD_ID}" REPOREF: "${CIRRUS_CHANGE_IN_REPO}" GCPJSON: ENCRYPTED[244a93fe8b386b48b96f748342bf741350e43805eee81dd04b45093bdf737e540b993fc735df41f131835fa0f9b65826] @@ -158,7 +158,7 @@ meta_task: vendor_task: container: - image: golang:1.17 + image: golang modules_cache: fingerprint_script: cat go.sum folder: $GOPATH/pkg/mod @@ -177,7 +177,7 @@ success_task: depends_on: - lint - fedora_testing - - ubuntu_testing + - debian_testing - meta - vendor - cross diff --git a/common/vendor/github.com/containers/storage/.golangci.yml b/common/vendor/github.com/containers/storage/.golangci.yml index cd4638a39c..755aa35c0f 100644 --- a/common/vendor/github.com/containers/storage/.golangci.yml +++ b/common/vendor/github.com/containers/storage/.golangci.yml @@ -2,36 +2,70 @@ run: concurrency: 6 deadline: 5m + skip-dirs-use-default: true linters: enable-all: true disable: + - cyclop + - deadcode - dogsled - dupl - errcheck + - errname + - errorlint + - exhaustive + - exhaustivestruct + - exhaustruct + - forbidigo + - forcetypeassert - funlen + - gci - gochecknoglobals - gochecknoinits - gocognit - gocritic - gocyclo + - godot - godox + - goerr113 + - gofumpt + - golint - gomnd - gosec - gosimple - govet + - ifshort - ineffassign + - interfacer + - interfacebloat + - ireturn - lll + - maintidx - maligned - misspell + - musttag - nakedret + - nestif + - nlreturn + - nolintlint + - nonamedreturns + - nosnakecase + - paralleltest - prealloc + - predeclared + - rowserrcheck - scopelint - staticcheck - structcheck - stylecheck + - tagliatelle + - testpackage + - thelper - unconvert - unparam - - unused - varcheck + - varnamelen + - wastedassign - whitespace + - wrapcheck - wsl diff --git a/common/vendor/github.com/containers/storage/Makefile b/common/vendor/github.com/containers/storage/Makefile index 69298ba520..52266da0f9 100644 --- a/common/vendor/github.com/containers/storage/Makefile +++ b/common/vendor/github.com/containers/storage/Makefile @@ -26,7 +26,7 @@ NATIVETAGS := AUTOTAGS := $(shell ./hack/btrfs_tag.sh) $(shell ./hack/libdm_tag.sh) $(shell ./hack/libsubid_tag.sh) BUILDFLAGS := -tags "$(AUTOTAGS) $(TAGS)" $(FLAGS) GO ?= go -TESTFLAGS := $(shell go test -race $(BUILDFLAGS) ./pkg/stringutils 2>&1 > /dev/null && echo -race) +TESTFLAGS := $(shell $(GO) test -race $(BUILDFLAGS) ./pkg/stringutils 2>&1 > /dev/null && echo -race) # Go module support: set `-mod=vendor` to use the vendored sources ifeq ($(shell $(GO) help mod >/dev/null 2>&1 && echo true), true) @@ -93,9 +93,9 @@ help: ## this help @awk 'BEGIN {FS = ":.*?## "} /^[a-z A-Z_-]+:.*?## / {gsub(" ",",",$$1);gsub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-21s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) vendor-in-container: - podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang:1.17 make vendor + podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src golang make vendor vendor: - $(GO) mod tidy -compat=1.17 + $(GO) mod tidy $(GO) mod vendor $(GO) mod verify diff --git a/common/vendor/github.com/containers/storage/VERSION b/common/vendor/github.com/containers/storage/VERSION index bbeb97eef8..0a3db35b24 100644 --- a/common/vendor/github.com/containers/storage/VERSION +++ b/common/vendor/github.com/containers/storage/VERSION @@ -1 +1 @@ -1.45.5-dev +1.46.0 diff --git a/common/vendor/github.com/containers/storage/containers.go b/common/vendor/github.com/containers/storage/containers.go index bdb280e07a..6cc2e3da6e 100644 --- a/common/vendor/github.com/containers/storage/containers.go +++ b/common/vendor/github.com/containers/storage/containers.go @@ -107,13 +107,13 @@ type rwContainerStore interface { // stopReading releases locks obtained by startReading. stopReading() - // Create creates a container that has a specified ID (or generates a + // create creates a container that has a specified ID (or generates a // random one if an empty value is supplied) and optional names, // based on the specified image, using the specified layer as its // read-write layer. // The maps in the container's options structure are recorded for the // convenience of the caller, nothing more. - Create(id string, names []string, image, layer, metadata string, options *ContainerOptions) (*Container, error) + create(id string, names []string, image, layer string, options *ContainerOptions) (*Container, error) // updateNames modifies names associated with a container based on (op, names). updateNames(id string, names []string, op updateNameOperation) error @@ -411,7 +411,7 @@ func (r *containerStore) GarbageCollect() error { for _, entry := range entries { id := entry.Name() // Does it look like a datadir directory? - if !entry.IsDir() || !nameLooksLikeID(id) { + if !entry.IsDir() || stringid.ValidateID(id) != nil { continue } @@ -651,7 +651,10 @@ func (r *containerStore) SetFlag(id string, flag string, value interface{}) erro } // Requires startWriting. -func (r *containerStore) Create(id string, names []string, image, layer, metadata string, options *ContainerOptions) (container *Container, err error) { +func (r *containerStore) create(id string, names []string, image, layer string, options *ContainerOptions) (container *Container, err error) { + if options == nil { + options = &ContainerOptions{} + } if id == "" { id = stringid.GenerateRandomID() _, idInUse := r.byid[id] @@ -663,12 +666,6 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat if _, idInUse := r.byid[id]; idInUse { return nil, ErrDuplicateID } - if options.MountOpts != nil { - options.Flags[mountOptsFlag] = append([]string{}, options.MountOpts...) - } - if options.Volatile { - options.Flags[volatileFlag] = true - } names = dedupeNames(names) for _, name := range names { if _, nameInUse := r.byname[name]; nameInUse { @@ -686,7 +683,7 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat Names: names, ImageID: image, LayerID: layer, - Metadata: metadata, + Metadata: options.Metadata, BigDataNames: []string{}, BigDataSizes: make(map[string]int64), BigDataDigests: make(map[string]digest.Digest), @@ -696,16 +693,42 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat GIDMap: copyIDMap(options.GIDMap), volatileStore: options.Volatile, } + if options.MountOpts != nil { + container.Flags[mountOptsFlag] = append([]string{}, options.MountOpts...) + } + if options.Volatile { + container.Flags[volatileFlag] = true + } r.containers = append(r.containers, container) - r.byid[id] = container - // This can only fail on duplicate IDs, which shouldn’t happen — and in that case the index is already in the desired state anyway. - // Implementing recovery from an unlikely and unimportant failure here would be too risky. + // This can only fail on duplicate IDs, which shouldn’t happen — and in + // that case the index is already in the desired state anyway. + // Implementing recovery from an unlikely and unimportant failure here + // would be too risky. _ = r.idindex.Add(id) + r.byid[id] = container r.bylayer[layer] = container for _, name := range names { r.byname[name] = container } + defer func() { + if err != nil { + // now that the in-memory structures know about the new + // record, we can use regular Delete() to clean up if + // anything breaks from here on out + if e := r.Delete(id); e != nil { + logrus.Debugf("while cleaning up partially-created container %q we failed to create: %v", id, e) + } + } + }() err = r.saveFor(container) + if err != nil { + return nil, err + } + for _, item := range options.BigData { + if err = r.SetBigData(id, item.Key, item.Data); err != nil { + return nil, err + } + } container = copyContainer(container) return container, err } diff --git a/common/vendor/github.com/containers/storage/drivers/aufs/aufs.go b/common/vendor/github.com/containers/storage/drivers/aufs/aufs.go index 10341d41ac..301ee24d24 100644 --- a/common/vendor/github.com/containers/storage/drivers/aufs/aufs.go +++ b/common/vendor/github.com/containers/storage/drivers/aufs/aufs.go @@ -239,7 +239,7 @@ func (a *Driver) Status() [][2]string { // Metadata not implemented func (a *Driver) Metadata(id string) (map[string]string, error) { - return nil, nil + return nil, nil //nolint: nilnil } // Exists returns true if the given id is registered with diff --git a/common/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go b/common/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go index 3d9053297b..8452fa1899 100644 --- a/common/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go +++ b/common/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go @@ -157,7 +157,7 @@ func (d *Driver) Status() [][2]string { // Metadata returns empty metadata for this driver. func (d *Driver) Metadata(id string) (map[string]string, error) { - return nil, nil + return nil, nil //nolint: nilnil } // Cleanup unmounts the home directory. diff --git a/common/vendor/github.com/containers/storage/drivers/copy/copy_linux.go b/common/vendor/github.com/containers/storage/drivers/copy/copy_linux.go index 58c0b5daf1..aa88c1a74f 100644 --- a/common/vendor/github.com/containers/storage/drivers/copy/copy_linux.go +++ b/common/vendor/github.com/containers/storage/drivers/copy/copy_linux.go @@ -41,7 +41,7 @@ const ( ) // CopyRegularToFile copies the content of a file to another -func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { // nolint: golint +func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { // nolint: revive,golint srcFile, err := os.Open(srcPath) if err != nil { return err @@ -73,7 +73,7 @@ func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, c } // CopyRegular copies the content of a file to another -func CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { // nolint: golint +func CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { // nolint: revive,golint // If the destination file already exists, we shouldn't blow it away dstFile, err := os.OpenFile(dstPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, fileinfo.Mode()) if err != nil { diff --git a/common/vendor/github.com/containers/storage/drivers/copy/copy_unsupported.go b/common/vendor/github.com/containers/storage/drivers/copy/copy_unsupported.go index 470e6a7247..5a4629b745 100644 --- a/common/vendor/github.com/containers/storage/drivers/copy/copy_unsupported.go +++ b/common/vendor/github.com/containers/storage/drivers/copy/copy_unsupported.go @@ -25,7 +25,7 @@ func DirCopy(srcDir, dstDir string, _ Mode, _ bool) error { } // CopyRegularToFile copies the content of a file to another -func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint: revive // "func name will be used as copy.CopyRegularToFile by other packages, and that stutters" +func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint: revive,golint // "func name will be used as copy.CopyRegularToFile by other packages, and that stutters" f, err := os.Open(srcPath) if err != nil { return err @@ -36,6 +36,6 @@ func CopyRegularToFile(srcPath string, dstFile *os.File, fileinfo os.FileInfo, c } // CopyRegular copies the content of a file to another -func CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint:revive // "func name will be used as copy.CopyRegular by other packages, and that stutters" +func CopyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRange, copyWithFileClone *bool) error { //nolint:revive,golint // "func name will be used as copy.CopyRegular by other packages, and that stutters" return chrootarchive.NewArchiver(nil).CopyWithTar(srcPath, dstPath) } diff --git a/common/vendor/github.com/containers/storage/drivers/devmapper/device_setup.go b/common/vendor/github.com/containers/storage/drivers/devmapper/device_setup.go index 96c4cdacb4..56c117d1b4 100644 --- a/common/vendor/github.com/containers/storage/drivers/devmapper/device_setup.go +++ b/common/vendor/github.com/containers/storage/drivers/devmapper/device_setup.go @@ -48,7 +48,7 @@ func validateLVMConfig(cfg directLVMConfig) error { func checkDevAvailable(dev string) error { lvmScan, err := exec.LookPath("lvmdiskscan") if err != nil { - logrus.Debug("could not find lvmdiskscan") + logrus.Debugf("could not find lvmdiskscan: %v", err) return nil } @@ -67,7 +67,7 @@ func checkDevAvailable(dev string) error { func checkDevInVG(dev string) error { pvDisplay, err := exec.LookPath("pvdisplay") if err != nil { - logrus.Debug("could not find pvdisplay") + logrus.Debugf("could not find pvdisplay: %v", err) return nil } @@ -96,7 +96,7 @@ func checkDevInVG(dev string) error { func checkDevHasFS(dev string) error { blkid, err := exec.LookPath("blkid") if err != nil { - logrus.Debug("could not find blkid") + logrus.Debugf("could not find blkid %v", err) return nil } diff --git a/common/vendor/github.com/containers/storage/drivers/devmapper/deviceset.go b/common/vendor/github.com/containers/storage/drivers/devmapper/deviceset.go index 697a16fda7..d2d0effc34 100644 --- a/common/vendor/github.com/containers/storage/drivers/devmapper/deviceset.go +++ b/common/vendor/github.com/containers/storage/drivers/devmapper/deviceset.go @@ -460,7 +460,7 @@ func (devices *DeviceSet) loadDeviceFilesOnStart() error { var scan = func(path string, d fs.DirEntry, err error) error { if err != nil { - logrus.Debugf("devmapper: Can't walk the file %s", path) + logrus.Debugf("devmapper: Can't walk the file %s: %v", path, err) return nil } @@ -2487,10 +2487,11 @@ func (devices *DeviceSet) deviceStatus(devName string) (sizeInSectors, mappedSec var params string _, sizeInSectors, _, params, err = devicemapper.GetStatus(devName) if err != nil { + logrus.Debugf("could not find devicemapper status: %v", err) return } - if _, err = fmt.Sscanf(params, "%d %d", &mappedSectors, &highestMappedSector); err == nil { - return + if _, err = fmt.Sscanf(params, "%d %d", &mappedSectors, &highestMappedSector); err != nil { + logrus.Debugf("could not find scanf devicemapper status: %v", err) } return } diff --git a/common/vendor/github.com/containers/storage/drivers/driver.go b/common/vendor/github.com/containers/storage/drivers/driver.go index 3d4a15ee39..055d99d183 100644 --- a/common/vendor/github.com/containers/storage/drivers/driver.go +++ b/common/vendor/github.com/containers/storage/drivers/driver.go @@ -52,8 +52,8 @@ type MountOpts struct { // Mount label is the MAC Labels to assign to mount point (SELINUX) MountLabel string // UidMaps & GidMaps are the User Namespace mappings to be assigned to content in the mount point - UidMaps []idtools.IDMap //nolint: golint,revive - GidMaps []idtools.IDMap //nolint: golint + UidMaps []idtools.IDMap //nolint: revive,golint + GidMaps []idtools.IDMap //nolint: revive,golint Options []string // Volatile specifies whether the container storage can be optimized diff --git a/common/vendor/github.com/containers/storage/drivers/driver_solaris.go b/common/vendor/github.com/containers/storage/drivers/driver_solaris.go index e329309166..962edd1763 100644 --- a/common/vendor/github.com/containers/storage/drivers/driver_solaris.go +++ b/common/vendor/github.com/containers/storage/drivers/driver_solaris.go @@ -78,7 +78,7 @@ func (c *defaultChecker) IsMounted(path string) bool { } // Mounted checks if the given path is mounted as the fs type -//Solaris supports only ZFS for now +// Solaris supports only ZFS for now func Mounted(fsType FsMagic, mountPath string) (bool, error) { cs := C.CString(filepath.Dir(mountPath)) diff --git a/common/vendor/github.com/containers/storage/drivers/overlay/overlay.go b/common/vendor/github.com/containers/storage/drivers/overlay/overlay.go index d85cdd9514..b606713f04 100644 --- a/common/vendor/github.com/containers/storage/drivers/overlay/overlay.go +++ b/common/vendor/github.com/containers/storage/drivers/overlay/overlay.go @@ -17,7 +17,6 @@ import ( "strings" "sync" "syscall" - "unicode" graphdriver "github.com/containers/storage/drivers" "github.com/containers/storage/drivers/overlayutils" @@ -30,6 +29,7 @@ import ( "github.com/containers/storage/pkg/idtools" "github.com/containers/storage/pkg/mount" "github.com/containers/storage/pkg/parsers" + "github.com/containers/storage/pkg/stringid" "github.com/containers/storage/pkg/system" "github.com/containers/storage/pkg/unshare" units "github.com/docker/go-units" @@ -314,9 +314,6 @@ func Init(home string, options graphdriver.Options) (graphdriver.Driver, error) } fsName, ok := graphdriver.FsNames[fsMagic] if !ok { - if opts.mountProgram == "" { - return nil, fmt.Errorf("filesystem type %#x reported for %s is not supported with 'overlay': %w", fsMagic, filepath.Dir(home), graphdriver.ErrIncompatibleFS) - } fsName = "" } backingFs = fsName @@ -549,6 +546,9 @@ func parseOptions(options []string) (*overlayOptions, error) { case "skip_mount_home": logrus.Debugf("overlay: skip_mount_home=%s", val) o.skipMountHome, err = strconv.ParseBool(val) + if err != nil { + return nil, err + } case "ignore_chown_errors": logrus.Debugf("overlay: ignore_chown_errors=%s", val) o.ignoreChownErrors, err = strconv.ParseBool(val) @@ -685,8 +685,11 @@ func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGI // Try a test mount in the specific location we're looking at using. mergedDir := filepath.Join(layerDir, "merged") + mergedSubdir := filepath.Join(mergedDir, "subdir") lower1Dir := filepath.Join(layerDir, "lower1") lower2Dir := filepath.Join(layerDir, "lower2") + lower2Subdir := filepath.Join(lower2Dir, "subdir") + lower2SubdirFile := filepath.Join(lower2Subdir, "file") upperDir := filepath.Join(layerDir, "upper") workDir := filepath.Join(layerDir, "work") defer func() { @@ -700,8 +703,15 @@ func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGI _ = idtools.MkdirAs(mergedDir, 0700, rootUID, rootGID) _ = idtools.MkdirAs(lower1Dir, 0700, rootUID, rootGID) _ = idtools.MkdirAs(lower2Dir, 0700, rootUID, rootGID) + _ = idtools.MkdirAs(lower2Subdir, 0700, rootUID, rootGID) _ = idtools.MkdirAs(upperDir, 0700, rootUID, rootGID) _ = idtools.MkdirAs(workDir, 0700, rootUID, rootGID) + f, err := os.Create(lower2SubdirFile) + if err != nil { + logrus.Debugf("Unable to create test file: %v", err) + return supportsDType, fmt.Errorf("unable to create test file: %w", err) + } + f.Close() flags := fmt.Sprintf("lowerdir=%s:%s,upperdir=%s,workdir=%s", lower1Dir, lower2Dir, upperDir, workDir) if selinux.GetEnabled() && selinux.SecurityCheckContext(selinuxLabelTest) == nil { @@ -721,6 +731,10 @@ func supportsOverlay(home string, homeMagic graphdriver.FsMagic, rootUID, rootGI if len(flags) < unix.Getpagesize() { err := unix.Mount("overlay", mergedDir, "overlay", 0, flags) if err == nil { + if err = os.RemoveAll(mergedSubdir); err != nil { + logrus.StandardLogger().Logf(logLevel, "overlay: removing an item from the merged directory failed: %v", err) + return supportsDType, fmt.Errorf("kernel returned %v when we tried to delete an item in the merged directory: %w", err, graphdriver.ErrNotSupported) + } logrus.Debugf("overlay: test mount with multiple lowers succeeded") return supportsDType, nil } @@ -1427,7 +1441,6 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO perms = os.FileMode(st2.Mode()) permsKnown = true } - l = lower break } lower = "" @@ -1509,7 +1522,7 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO } } - if !disableShifting && len(options.UidMaps) > 0 && len(options.GidMaps) > 0 { + if !disableShifting && len(options.UidMaps) > 0 && len(options.GidMaps) > 0 && d.options.mountProgram == "" { var newAbsDir []string mappedRoot := filepath.Join(d.home, id, "mapped") if err := os.MkdirAll(mappedRoot, 0700); err != nil { @@ -1706,18 +1719,6 @@ func (d *Driver) Exists(id string) bool { return err == nil } -func nameLooksLikeID(name string) bool { - if len(name) != 64 { - return false - } - for _, c := range name { - if !unicode.Is(unicode.ASCII_Hex_Digit, c) { - return false - } - } - return true -} - // List layers (not including additional image stores) func (d *Driver) ListLayers() ([]string, error) { entries, err := os.ReadDir(d.home) @@ -1730,7 +1731,7 @@ func (d *Driver) ListLayers() ([]string, error) { for _, entry := range entries { id := entry.Name() // Does it look like a datadir directory? - if !entry.IsDir() || !nameLooksLikeID(id) { + if !entry.IsDir() || stringid.ValidateID(id) != nil { continue } @@ -1827,7 +1828,7 @@ func (d *Driver) ApplyDiffWithDiffer(id, parent string, options *graphdriver.App idMappings = &idtools.IDMappings{} } - applyDir := "" + var applyDir string if id == "" { err := os.MkdirAll(d.getStagingDir(), 0700) diff --git a/common/vendor/github.com/containers/storage/drivers/vfs/driver.go b/common/vendor/github.com/containers/storage/drivers/vfs/driver.go index 9deaa7c3a8..bf0cfe9408 100644 --- a/common/vendor/github.com/containers/storage/drivers/vfs/driver.go +++ b/common/vendor/github.com/containers/storage/drivers/vfs/driver.go @@ -8,13 +8,13 @@ import ( "runtime" "strconv" "strings" - "unicode" graphdriver "github.com/containers/storage/drivers" "github.com/containers/storage/pkg/archive" "github.com/containers/storage/pkg/directory" "github.com/containers/storage/pkg/idtools" "github.com/containers/storage/pkg/parsers" + "github.com/containers/storage/pkg/stringid" "github.com/containers/storage/pkg/system" "github.com/opencontainers/selinux/go-selinux/label" "github.com/sirupsen/logrus" @@ -266,18 +266,6 @@ func (d *Driver) Exists(id string) bool { return err == nil } -func nameLooksLikeID(name string) bool { - if len(name) != 64 { - return false - } - for _, c := range name { - if !unicode.Is(unicode.ASCII_Hex_Digit, c) { - return false - } - } - return true -} - // List layers (not including additional image stores) func (d *Driver) ListLayers() ([]string, error) { entries, err := os.ReadDir(d.homes[0]) @@ -290,7 +278,7 @@ func (d *Driver) ListLayers() ([]string, error) { for _, entry := range entries { id := entry.Name() // Does it look like a datadir directory? - if !entry.IsDir() || !nameLooksLikeID(id) { + if !entry.IsDir() || stringid.ValidateID(id) != nil { continue } diff --git a/common/vendor/github.com/containers/storage/images.go b/common/vendor/github.com/containers/storage/images.go index 2079c0ff1c..dffe4d7aaf 100644 --- a/common/vendor/github.com/containers/storage/images.go +++ b/common/vendor/github.com/containers/storage/images.go @@ -137,10 +137,10 @@ type rwImageStore interface { // stopWriting releases locks obtained by startWriting. stopWriting() - // Create creates an image that has a specified ID (or a random one) and + // create creates an image that has a specified ID (or a random one) and // optional names, using the specified layer as its topmost (hopefully // read-only) layer. That layer can be referenced by multiple images. - Create(id string, names []string, layer, metadata string, created time.Time, searchableDigest digest.Digest) (*Image, error) + create(id string, names []string, layer string, options ImageOptions) (*Image, error) // updateNames modifies names associated with an image based on (op, names). // The values are expected to be valid normalized @@ -414,7 +414,7 @@ func (r *imageStore) GarbageCollect() error { for _, entry := range entries { id := entry.Name() // Does it look like a datadir directory? - if !entry.IsDir() || !nameLooksLikeID(id) { + if !entry.IsDir() || stringid.ValidateID(id) != nil { continue } @@ -688,7 +688,7 @@ func (r *imageStore) SetFlag(id string, flag string, value interface{}) error { } // Requires startWriting. -func (r *imageStore) Create(id string, names []string, layer, metadata string, created time.Time, searchableDigest digest.Digest) (image *Image, err error) { +func (r *imageStore) create(id string, names []string, layer string, options ImageOptions) (image *Image, err error) { if !r.lockfile.IsReadWrite() { return nil, fmt.Errorf("not allowed to create new images at %q: %w", r.imagespath(), ErrStoreIsReadOnly) } @@ -709,30 +709,32 @@ func (r *imageStore) Create(id string, names []string, layer, metadata string, c return nil, fmt.Errorf("image name %q is already associated with image %q: %w", name, image.ID, ErrDuplicateName) } } - if created.IsZero() { - created = time.Now().UTC() - } - image = &Image{ ID: id, - Digest: searchableDigest, - Digests: nil, + Digest: options.Digest, + Digests: copyDigestSlice(options.Digests), Names: names, + NamesHistory: copyStringSlice(options.NamesHistory), TopLayer: layer, - Metadata: metadata, + Metadata: options.Metadata, BigDataNames: []string{}, BigDataSizes: make(map[string]int64), BigDataDigests: make(map[string]digest.Digest), - Created: created, - Flags: make(map[string]interface{}), + Created: options.CreationDate, + Flags: copyStringInterfaceMap(options.Flags), + } + if image.Created.IsZero() { + image.Created = time.Now().UTC() } err = image.recomputeDigests() if err != nil { return nil, fmt.Errorf("validating digests for new image: %w", err) } r.images = append(r.images, image) - // This can only fail on duplicate IDs, which shouldn’t happen — and in that case the index is already in the desired state anyway. - // Implementing recovery from an unlikely and unimportant failure here would be too risky. + // This can only fail on duplicate IDs, which shouldn’t happen — and in + // that case the index is already in the desired state anyway. + // Implementing recovery from an unlikely and unimportant failure here + // would be too risky. _ = r.idindex.Add(id) r.byid[id] = image for _, name := range names { @@ -742,7 +744,28 @@ func (r *imageStore) Create(id string, names []string, layer, metadata string, c list := r.bydigest[digest] r.bydigest[digest] = append(list, image) } + defer func() { + if err != nil { + // now that the in-memory structures know about the new + // record, we can use regular Delete() to clean up if + // anything breaks from here on out + if e := r.Delete(id); e != nil { + logrus.Debugf("while cleaning up partially-created image %q we failed to create: %v", id, e) + } + } + }() err = r.Save() + if err != nil { + return nil, err + } + for _, item := range options.BigData { + if item.Digest == "" { + item.Digest = digest.Canonical.FromBytes(item.Data) + } + if err = r.setBigData(image, item.Key, item.Data, item.Digest); err != nil { + return nil, err + } + } image = copyImage(image) return image, err } @@ -965,9 +988,6 @@ func imageSliceWithoutValue(slice []*Image, value *Image) []*Image { // Requires startWriting. func (r *imageStore) SetBigData(id, key string, data []byte, digestManifest func([]byte) (digest.Digest, error)) error { - if key == "" { - return fmt.Errorf("can't set empty name for image big data item: %w", ErrInvalidBigDataName) - } if !r.lockfile.IsReadWrite() { return fmt.Errorf("not allowed to save data items associated with images at %q: %w", r.imagespath(), ErrStoreIsReadOnly) } @@ -975,10 +995,7 @@ func (r *imageStore) SetBigData(id, key string, data []byte, digestManifest func if !ok { return fmt.Errorf("locating image with ID %q: %w", id, ErrImageUnknown) } - err := os.MkdirAll(r.datadir(image.ID), 0700) - if err != nil { - return err - } + var err error var newDigest digest.Digest if bigDataNameIsManifest(key) { if digestManifest == nil { @@ -990,6 +1007,18 @@ func (r *imageStore) SetBigData(id, key string, data []byte, digestManifest func } else { newDigest = digest.Canonical.FromBytes(data) } + return r.setBigData(image, key, data, newDigest) +} + +// Requires startWriting. +func (r *imageStore) setBigData(image *Image, key string, data []byte, newDigest digest.Digest) error { + if key == "" { + return fmt.Errorf("can't set empty name for image big data item: %w", ErrInvalidBigDataName) + } + err := os.MkdirAll(r.datadir(image.ID), 0700) + if err != nil { + return err + } err = ioutils.AtomicWriteFile(r.datapath(image.ID, key), data, 0600) if err == nil { save := false diff --git a/common/vendor/github.com/containers/storage/layers.go b/common/vendor/github.com/containers/storage/layers.go index 3176062b9c..cbfebfe733 100644 --- a/common/vendor/github.com/containers/storage/layers.go +++ b/common/vendor/github.com/containers/storage/layers.go @@ -112,33 +112,33 @@ type Layer struct { Created time.Time `json:"created,omitempty"` // CompressedDigest is the digest of the blob that was last passed to - // ApplyDiff() or Put(), as it was presented to us. + // ApplyDiff() or create(), as it was presented to us. CompressedDigest digest.Digest `json:"compressed-diff-digest,omitempty"` // CompressedSize is the length of the blob that was last passed to - // ApplyDiff() or Put(), as it was presented to us. If + // ApplyDiff() or create(), as it was presented to us. If // CompressedDigest is not set, this should be treated as if it were an // uninitialized value. CompressedSize int64 `json:"compressed-size,omitempty"` // UncompressedDigest is the digest of the blob that was last passed to - // ApplyDiff() or Put(), after we decompressed it. Often referred to + // ApplyDiff() or create(), after we decompressed it. Often referred to // as a DiffID. UncompressedDigest digest.Digest `json:"diff-digest,omitempty"` // UncompressedSize is the length of the blob that was last passed to - // ApplyDiff() or Put(), after we decompressed it. If + // ApplyDiff() or create(), after we decompressed it. If // UncompressedDigest is not set, this should be treated as if it were // an uninitialized value. UncompressedSize int64 `json:"diff-size,omitempty"` // CompressionType is the type of compression which we detected on the blob - // that was last passed to ApplyDiff() or Put(). + // that was last passed to ApplyDiff() or create(). CompressionType archive.Compression `json:"compression,omitempty"` // UIDs and GIDs are lists of UIDs and GIDs used in the layer. This // field is only populated (i.e., will only contain one or more - // entries) if the layer was created using ApplyDiff() or Put(). + // entries) if the layer was created using ApplyDiff() or create(). UIDs []uint32 `json:"uidset,omitempty"` GIDs []uint32 `json:"gidset,omitempty"` @@ -248,20 +248,15 @@ type rwLayerStore interface { // stopWriting releases locks obtained by startWriting. stopWriting() - // Create creates a new layer, optionally giving it a specified ID rather than + // create creates a new layer, optionally giving it a specified ID rather than // a randomly-generated one, either inheriting data from another specified // layer or the empty base layer. The new layer can optionally be given names // and have an SELinux label specified for use when mounting it. Some // underlying drivers can accept a "size" option. At this time, most // underlying drivers do not themselves distinguish between writeable - // and read-only layers. - Create(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool) (*Layer, error) - - // CreateWithFlags combines the functions of Create and SetFlag. - CreateWithFlags(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, flags map[string]interface{}) (layer *Layer, err error) - - // Put combines the functions of CreateWithFlags and ApplyDiff. - Put(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, flags map[string]interface{}, diff io.Reader) (*Layer, int64, error) + // and read-only layers. Returns the new layer structure and the size of the + // diff which was applied to its parent to initialize its contents. + create(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, diff io.Reader) (*Layer, int64, error) // updateNames modifies names associated with a layer based on (op, names). updateNames(id string, names []string, op updateNameOperation) error @@ -1186,8 +1181,10 @@ func (r *layerStore) PutAdditionalLayer(id string, parentLayer *Layer, names []s // TODO: check if necessary fields are filled r.layers = append(r.layers, layer) - // This can only fail on duplicate IDs, which shouldn’t happen — and in that case the index is already in the desired state anyway. - // Implementing recovery from an unlikely and unimportant failure here would be too risky. + // This can only fail on duplicate IDs, which shouldn’t happen — and in + // that case the index is already in the desired state anyway. + // Implementing recovery from an unlikely and unimportant failure here + // would be too risky. _ = r.idindex.Add(id) r.byid[id] = layer for _, name := range names { // names got from the additional layer store won't be used @@ -1200,8 +1197,8 @@ func (r *layerStore) PutAdditionalLayer(id string, parentLayer *Layer, names []s r.byuncompressedsum[layer.UncompressedDigest] = append(r.byuncompressedsum[layer.UncompressedDigest], layer.ID) } if err := r.saveFor(layer); err != nil { - if err2 := r.driver.Remove(id); err2 != nil { - logrus.Errorf("While recovering from a failure to save layers, error deleting layer %#v: %v", id, err2) + if e := r.Delete(layer.ID); e != nil { + logrus.Errorf("While recovering from a failure to save layers, error deleting layer %#v: %v", id, e) } return nil, err } @@ -1209,7 +1206,10 @@ func (r *layerStore) PutAdditionalLayer(id string, parentLayer *Layer, names []s } // Requires startWriting. -func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, flags map[string]interface{}, diff io.Reader) (*Layer, int64, error) { +func (r *layerStore) create(id string, parentLayer *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, diff io.Reader) (layer *Layer, size int64, err error) { + if moreOptions == nil { + moreOptions = &LayerOptions{} + } if !r.lockfile.IsReadWrite() { return nil, -1, fmt.Errorf("not allowed to create new layers at %q: %w", r.layerdir, ErrStoreIsReadOnly) } @@ -1252,7 +1252,6 @@ func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLab templateTSdata []byte ) if moreOptions.TemplateLayer != "" { - var tserr error templateLayer, ok := r.lookup(moreOptions.TemplateLayer) if !ok { return nil, -1, ErrLayerUnknown @@ -1263,9 +1262,9 @@ func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLab templateUncompressedDigest, templateUncompressedSize = templateLayer.UncompressedDigest, templateLayer.UncompressedSize templateCompressionType = templateLayer.CompressionType templateUIDs, templateGIDs = append([]uint32{}, templateLayer.UIDs...), append([]uint32{}, templateLayer.GIDs...) - templateTSdata, tserr = os.ReadFile(r.tspath(templateLayer.ID)) - if tserr != nil && !os.IsNotExist(tserr) { - return nil, -1, tserr + templateTSdata, err = os.ReadFile(r.tspath(templateLayer.ID)) + if err != nil && !errors.Is(err, os.ErrNotExist) { + return nil, -1, err } } else { templateIDMappings = &idtools.IDMappings{} @@ -1279,9 +1278,10 @@ func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLab selinux.ReserveLabel(mountLabel) } - // Before actually creating the layer, make a persistent record of it with incompleteFlag, - // so that future processes have a chance to delete it. - layer := &Layer{ + // Before actually creating the layer, make a persistent record of it + // with the incomplete flag set, so that future processes have a chance + // to clean up after it. + layer = &Layer{ ID: id, Parent: parent, Names: names, @@ -1295,98 +1295,109 @@ func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLab CompressionType: templateCompressionType, UIDs: templateUIDs, GIDs: templateGIDs, - Flags: make(map[string]interface{}), + Flags: copyStringInterfaceMap(moreOptions.Flags), UIDMap: copyIDMap(moreOptions.UIDMap), GIDMap: copyIDMap(moreOptions.GIDMap), BigDataNames: []string{}, volatileStore: moreOptions.Volatile, } + layer.Flags[incompleteFlag] = true + r.layers = append(r.layers, layer) - // This can only fail if the ID is already missing, which shouldn’t happen — and in that case the index is already in the desired state anyway. - // This is on various paths to recover from failures, so this should be robust against partially missing data. + // This can only fail if the ID is already missing, which shouldn’t + // happen — and in that case the index is already in the desired state + // anyway. This is on various paths to recover from failures, so this + // should be robust against partially missing data. _ = r.idindex.Add(id) r.byid[id] = layer for _, name := range names { r.byname[name] = layer } - for flag, value := range flags { - layer.Flags[flag] = value - } - layer.Flags[incompleteFlag] = true - succeeded := false cleanupFailureContext := "" defer func() { - if !succeeded { - // On any error, try both removing the driver's data as well - // as the in-memory layer record. - if err2 := r.Delete(layer.ID); err2 != nil { - if cleanupFailureContext == "" { - cleanupFailureContext = "unknown: cleanupFailureContext not set at the failure site" - } - logrus.Errorf("While recovering from a failure (%s), error deleting layer %#v: %v", cleanupFailureContext, layer.ID, err2) + if err != nil { + // now that the in-memory structures know about the new + // record, we can use regular Delete() to clean up if + // anything breaks from here on out + if cleanupFailureContext == "" { + cleanupFailureContext = "unknown: cleanupFailureContext not set at the failure site" + } + if e := r.Delete(id); e != nil { + logrus.Errorf("While recovering from a failure (%s), error deleting layer %#v: %v", cleanupFailureContext, id, e) } } }() - err := r.saveFor(layer) - if err != nil { + if err = r.saveFor(layer); err != nil { cleanupFailureContext = "saving incomplete layer metadata" return nil, -1, err } + for _, item := range moreOptions.BigData { + if err = r.setBigData(layer, item.Key, item.Data); err != nil { + cleanupFailureContext = fmt.Sprintf("saving big data item %q", item.Key) + return nil, -1, err + } + } + idMappings := idtools.NewIDMappingsFromMaps(moreOptions.UIDMap, moreOptions.GIDMap) opts := drivers.CreateOpts{ MountLabel: mountLabel, StorageOpt: options, IDMappings: idMappings, } + if moreOptions.TemplateLayer != "" { - if err := r.driver.CreateFromTemplate(id, moreOptions.TemplateLayer, templateIDMappings, parent, parentMappings, &opts, writeable); err != nil { - cleanupFailureContext = "creating a layer from template" + if err = r.driver.CreateFromTemplate(id, moreOptions.TemplateLayer, templateIDMappings, parent, parentMappings, &opts, writeable); err != nil { + cleanupFailureContext = fmt.Sprintf("creating a layer from template layer %q", moreOptions.TemplateLayer) return nil, -1, fmt.Errorf("creating copy of template layer %q with ID %q: %w", moreOptions.TemplateLayer, id, err) } oldMappings = templateIDMappings } else { if writeable { - if err := r.driver.CreateReadWrite(id, parent, &opts); err != nil { + if err = r.driver.CreateReadWrite(id, parent, &opts); err != nil { cleanupFailureContext = "creating a read-write layer" return nil, -1, fmt.Errorf("creating read-write layer with ID %q: %w", id, err) } } else { - if err := r.driver.Create(id, parent, &opts); err != nil { + if err = r.driver.Create(id, parent, &opts); err != nil { cleanupFailureContext = "creating a read-only layer" - return nil, -1, fmt.Errorf("creating layer with ID %q: %w", id, err) + return nil, -1, fmt.Errorf("creating read-only layer with ID %q: %w", id, err) } } oldMappings = parentMappings } + if !reflect.DeepEqual(oldMappings.UIDs(), idMappings.UIDs()) || !reflect.DeepEqual(oldMappings.GIDs(), idMappings.GIDs()) { - if err := r.driver.UpdateLayerIDMap(id, oldMappings, idMappings, mountLabel); err != nil { + if err = r.driver.UpdateLayerIDMap(id, oldMappings, idMappings, mountLabel); err != nil { cleanupFailureContext = "in UpdateLayerIDMap" return nil, -1, err } } + if len(templateTSdata) > 0 { - if err := os.MkdirAll(filepath.Dir(r.tspath(id)), 0o700); err != nil { + if err = os.MkdirAll(filepath.Dir(r.tspath(id)), 0o700); err != nil { cleanupFailureContext = "creating tar-split parent directory for a copy from template" return nil, -1, err } - if err := ioutils.AtomicWriteFile(r.tspath(id), templateTSdata, 0o600); err != nil { + if err = ioutils.AtomicWriteFile(r.tspath(id), templateTSdata, 0o600); err != nil { cleanupFailureContext = "creating a tar-split copy from template" return nil, -1, err } } - var size int64 = -1 + size = -1 if diff != nil { - size, err = r.applyDiffWithOptions(layer.ID, moreOptions, diff) - if err != nil { + if size, err = r.applyDiffWithOptions(layer.ID, moreOptions, diff); err != nil { cleanupFailureContext = "applying layer diff" return nil, -1, err } } else { - // applyDiffWithOptions in the `diff != nil` case handles this bit for us + // applyDiffWithOptions() would have updated r.bycompressedsum + // and r.byuncompressedsum for us, but if we used a template + // layer, we didn't call it, so add the new layer as candidates + // for searches for layers by checksum if layer.CompressedDigest != "" { r.bycompressedsum[layer.CompressedDigest] = append(r.bycompressedsum[layer.CompressedDigest], layer.ID) } @@ -1394,29 +1405,17 @@ func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLab r.byuncompressedsum[layer.UncompressedDigest] = append(r.byuncompressedsum[layer.UncompressedDigest], layer.ID) } } + delete(layer.Flags, incompleteFlag) - err = r.saveFor(layer) - if err != nil { + if err = r.saveFor(layer); err != nil { cleanupFailureContext = "saving finished layer metadata" return nil, -1, err } layer = copyLayer(layer) - succeeded = true return layer, size, err } -// Requires startWriting. -func (r *layerStore) CreateWithFlags(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool, flags map[string]interface{}) (layer *Layer, err error) { - layer, _, err = r.Put(id, parent, names, mountLabel, options, moreOptions, writeable, flags, nil) - return layer, err -} - -// Requires startWriting. -func (r *layerStore) Create(id string, parent *Layer, names []string, mountLabel string, options map[string]string, moreOptions *LayerOptions, writeable bool) (layer *Layer, err error) { - return r.CreateWithFlags(id, parent, names, mountLabel, options, moreOptions, writeable, nil) -} - // Requires startReading or startWriting. func (r *layerStore) Mounted(id string) (int, error) { if !r.lockfile.IsReadWrite() { @@ -1677,9 +1676,6 @@ func (r *layerStore) BigData(id, key string) (io.ReadCloser, error) { // Requires startWriting. func (r *layerStore) SetBigData(id, key string, data io.Reader) error { - if key == "" { - return fmt.Errorf("can't set empty name for layer big data item: %w", ErrInvalidBigDataName) - } if !r.lockfile.IsReadWrite() { return fmt.Errorf("not allowed to save data items associated with layers at %q: %w", r.layerdir, ErrStoreIsReadOnly) } @@ -1687,6 +1683,13 @@ func (r *layerStore) SetBigData(id, key string, data io.Reader) error { if !ok { return fmt.Errorf("locating layer with ID %q to write bigdata: %w", id, ErrLayerUnknown) } + return r.setBigData(layer, key, data) +} + +func (r *layerStore) setBigData(layer *Layer, key string, data io.Reader) error { + if key == "" { + return fmt.Errorf("can't set empty name for layer big data item: %w", ErrInvalidBigDataName) + } err := os.MkdirAll(r.datadir(layer.ID), 0700) if err != nil { return err @@ -1759,7 +1762,9 @@ func (r *layerStore) tspath(id string) string { // layerHasIncompleteFlag returns true if layer.Flags contains an incompleteFlag set to true // The caller must hold r.inProcessLock for reading. func layerHasIncompleteFlag(layer *Layer) bool { - // layer.Flags[…] is defined to succeed and return ok == false if Flags == nil + if layer.Flags == nil { + return false + } if flagValue, ok := layer.Flags[incompleteFlag]; ok { if b, ok := flagValue.(bool); ok && b { return true @@ -1788,20 +1793,21 @@ func (r *layerStore) deleteInternal(id string) error { } } // We never unset incompleteFlag; below, we remove the entire object from r.layers. - id = layer.ID - if err := r.driver.Remove(id); err != nil { + if err := r.driver.Remove(id); err != nil && !errors.Is(err, os.ErrNotExist) { return err } - os.Remove(r.tspath(id)) os.RemoveAll(r.datadir(id)) delete(r.byid, id) for _, name := range layer.Names { delete(r.byname, name) } - // This can only fail if the ID is already missing, which shouldn’t happen — and in that case the index is already in the desired state anyway. - // The store’s Delete method is used on various paths to recover from failures, so this should be robust against partially missing data. + // This can only fail if the ID is already missing, which shouldn’t + // happen — and in that case the index is already in the desired state + // anyway. The store’s Delete method is used on various paths to + // recover from failures, so this should be robust against partially + // missing data. _ = r.idindex.Delete(id) mountLabel := layer.MountLabel if layer.MountPoint != "" { @@ -1835,7 +1841,6 @@ func (r *layerStore) deleteInternal(id string) error { selinux.ReleaseLabel(mountLabel) } } - return nil } diff --git a/common/vendor/github.com/containers/storage/pkg/archive/archive_linux.go b/common/vendor/github.com/containers/storage/pkg/archive/archive_linux.go index 36e5d4bc2f..775bd0766c 100644 --- a/common/vendor/github.com/containers/storage/pkg/archive/archive_linux.go +++ b/common/vendor/github.com/containers/storage/pkg/archive/archive_linux.go @@ -53,7 +53,7 @@ func (o overlayWhiteoutConverter) ConvertWrite(hdr *tar.Header, path string, fi } // If there are no lower layers, then it can't have been deleted in this layer. if len(o.rolayers) == 0 { - return nil, nil + return nil, nil //nolint: nilnil } // At this point, we have a directory that's opaque. If it appears in one of the lower // layers, then it was newly-created here, so it wasn't also deleted here. @@ -66,7 +66,7 @@ func (o overlayWhiteoutConverter) ConvertWrite(hdr *tar.Header, path string, fi if statErr == nil { if stat.Mode()&os.ModeCharDevice != 0 { if isWhiteOut(stat) { - return nil, nil + return nil, nil //nolint: nilnil } } // It's not whiteout, so it was there in the older layer, so we need to @@ -100,7 +100,7 @@ func (o overlayWhiteoutConverter) ConvertWrite(hdr *tar.Header, path string, fi // original directory wasn't inherited into this layer, // so we don't need to emit whiteout for it. if isWhiteOut(stat) { - return nil, nil + return nil, nil //nolint: nilnil } } } diff --git a/common/vendor/github.com/containers/storage/pkg/archive/changes_linux.go b/common/vendor/github.com/containers/storage/pkg/archive/changes_linux.go index a3addebe69..77d3d6f51a 100644 --- a/common/vendor/github.com/containers/storage/pkg/archive/changes_linux.go +++ b/common/vendor/github.com/containers/storage/pkg/archive/changes_linux.go @@ -30,8 +30,8 @@ type walker struct { dir2 string root1 *FileInfo root2 *FileInfo - idmap1 *idtools.IDMappings - idmap2 *idtools.IDMappings + idmap1 *idtools.IDMappings //nolint:unused + idmap2 *idtools.IDMappings //nolint:unused } // collectFileInfoForChanges returns a complete representation of the trees diff --git a/common/vendor/github.com/containers/storage/pkg/archive/wrap.go b/common/vendor/github.com/containers/storage/pkg/archive/wrap.go index b39d12c878..903befd763 100644 --- a/common/vendor/github.com/containers/storage/pkg/archive/wrap.go +++ b/common/vendor/github.com/containers/storage/pkg/archive/wrap.go @@ -17,8 +17,8 @@ import ( // Generate("foo.txt", "hello world", "emptyfile") // // The above call will return an archive with 2 files: -// * ./foo.txt with content "hello world" -// * ./empty with empty content +// - ./foo.txt with content "hello world" +// - ./empty with empty content // // FIXME: stream content instead of buffering // FIXME: specify permissions and other archive metadata diff --git a/common/vendor/github.com/containers/storage/pkg/chunked/cache_linux.go b/common/vendor/github.com/containers/storage/pkg/chunked/cache_linux.go index 7279567999..7efd12373f 100644 --- a/common/vendor/github.com/containers/storage/pkg/chunked/cache_linux.go +++ b/common/vendor/github.com/containers/storage/pkg/chunked/cache_linux.go @@ -361,7 +361,7 @@ func readMetadataFromCache(bigData io.Reader) (*metadata, error) { return nil, err } if version != cacheVersion { - return nil, nil + return nil, nil //nolint: nilnil } if err := binary.Read(bigData, binary.LittleEndian, &tagLen); err != nil { return nil, err @@ -398,7 +398,8 @@ func prepareMetadata(manifest []byte) ([]*internal.FileMetadata, error) { toc, err := unmarshalToc(manifest) if err != nil { // ignore errors here. They might be caused by a different manifest format. - return nil, nil + logrus.Debugf("could not unmarshal manifest: %v", err) + return nil, nil //nolint: nilnil } var r []*internal.FileMetadata diff --git a/common/vendor/github.com/containers/storage/pkg/chunked/compression_linux.go b/common/vendor/github.com/containers/storage/pkg/chunked/compression_linux.go index f6c7b77b64..9333ed65c9 100644 --- a/common/vendor/github.com/containers/storage/pkg/chunked/compression_linux.go +++ b/common/vendor/github.com/containers/storage/pkg/chunked/compression_linux.go @@ -3,6 +3,7 @@ package chunked import ( archivetar "archive/tar" "bytes" + "context" "encoding/binary" "errors" "fmt" @@ -149,7 +150,7 @@ func readEstargzChunkedManifest(blobStream ImageSourceSeekable, blobSize int64, // readZstdChunkedManifest reads the zstd:chunked manifest from the seekable stream blobStream. The blob total size must // be specified. // This function uses the io.github.containers.zstd-chunked. annotations when specified. -func readZstdChunkedManifest(blobStream ImageSourceSeekable, blobSize int64, annotations map[string]string) ([]byte, int64, error) { +func readZstdChunkedManifest(ctx context.Context, blobStream ImageSourceSeekable, blobSize int64, annotations map[string]string) ([]byte, int64, error) { footerSize := int64(internal.FooterSizeSupported) if blobSize <= footerSize { return nil, 0, errors.New("blob too small") @@ -244,7 +245,7 @@ func readZstdChunkedManifest(blobStream ImageSourceSeekable, blobSize int64, ann return nil, 0, errors.New("invalid manifest checksum") } - decoder, err := zstd.NewReader(nil) + decoder, err := zstd.NewReader(nil) //nolint:contextcheck if err != nil { return nil, 0, err } diff --git a/common/vendor/github.com/containers/storage/pkg/chunked/storage_linux.go b/common/vendor/github.com/containers/storage/pkg/chunked/storage_linux.go index 42389071c1..adc1ad3983 100644 --- a/common/vendor/github.com/containers/storage/pkg/chunked/storage_linux.go +++ b/common/vendor/github.com/containers/storage/pkg/chunked/storage_linux.go @@ -147,7 +147,7 @@ func GetDiffer(ctx context.Context, store storage.Store, blobSize int64, annotat } func makeZstdChunkedDiffer(ctx context.Context, store storage.Store, blobSize int64, annotations map[string]string, iss ImageSourceSeekable) (*chunkedDiffer, error) { - manifest, tocOffset, err := readZstdChunkedManifest(iss, blobSize, annotations) + manifest, tocOffset, err := readZstdChunkedManifest(ctx, iss, blobSize, annotations) if err != nil { return nil, fmt.Errorf("read zstd:chunked manifest: %w", err) } @@ -279,6 +279,7 @@ func canDedupFileWithHardLink(file *internal.FileMetadata, fd int, s os.FileInfo func findFileInOSTreeRepos(file *internal.FileMetadata, ostreeRepos []string, dirfd int, useHardLinks bool) (bool, *os.File, int64, error) { digest, err := digest.Parse(file.Digest) if err != nil { + logrus.Debugf("could not parse digest: %v", err) return false, nil, 0, nil } payloadLink := digest.Encoded() + ".payload-link" @@ -297,6 +298,7 @@ func findFileInOSTreeRepos(file *internal.FileMetadata, ostreeRepos []string, di } fd, err := unix.Open(sourceFile, unix.O_RDONLY|unix.O_NONBLOCK, 0) if err != nil { + logrus.Debugf("could not open sourceFile %s: %v", sourceFile, err) return false, nil, 0, nil } f := os.NewFile(uintptr(fd), "fd") @@ -309,6 +311,7 @@ func findFileInOSTreeRepos(file *internal.FileMetadata, ostreeRepos []string, di dstFile, written, err := copyFileContent(fd, file.Name, dirfd, 0, useHardLinks) if err != nil { + logrus.Debugf("could not copyFileContent: %v", err) return false, nil, 0, nil } return true, dstFile, written, nil @@ -503,7 +506,7 @@ func openFileUnderRootFallback(dirfd int, name string, flags uint64, mode os.Fil hasNoFollow := (flags & unix.O_NOFOLLOW) != 0 - fd := -1 + var fd int // If O_NOFOLLOW is specified in the flags, then resolve only the parent directory and use the // last component as the path to openat(). if hasNoFollow { diff --git a/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper.go b/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper.go index 6e6852d4d7..6b9a7afcd2 100644 --- a/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper.go +++ b/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper.go @@ -15,7 +15,7 @@ import ( ) // Same as DM_DEVICE_* enum values from libdevmapper.h -// nolint: deadcode +// nolint: unused const ( deviceCreate TaskType = iota deviceReload @@ -198,13 +198,6 @@ func (t *Task) setAddNode(addNode AddNodeType) error { return nil } -func (t *Task) setRo() error { - if res := DmTaskSetRo(t.unmanaged); res != 1 { - return ErrTaskSetRo - } - return nil -} - func (t *Task) addTarget(start, size uint64, ttype, params string) error { if res := DmTaskAddTarget(t.unmanaged, start, size, ttype, params); res != 1 { @@ -213,7 +206,7 @@ func (t *Task) addTarget(start, size uint64, ttype, params string) error { return nil } -func (t *Task) getDeps() (*Deps, error) { +func (t *Task) getDeps() (*Deps, error) { //nolint:unused var deps *Deps if deps = DmTaskGetDeps(t.unmanaged); deps == nil { return nil, ErrTaskGetDeps diff --git a/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper_log.go b/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper_log.go index ead15c1486..6cfef0a5bf 100644 --- a/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper_log.go +++ b/common/vendor/github.com/containers/storage/pkg/devicemapper/devmapper_log.go @@ -39,6 +39,7 @@ func LogInit(logger DevmapperLogger) { // because we are using callbacks, this function will be called for *every* log // in libdm (even debug ones because there's no way of setting the verbosity // level for an external logging callback). +// //export StorageDevmapperLogCallback func StorageDevmapperLogCallback(level C.int, file *C.char, line, dmErrnoOrClass C.int, message *C.char) { msg := C.GoString(message) diff --git a/common/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go b/common/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go index e3cef48a30..bcc2109b6e 100644 --- a/common/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go +++ b/common/vendor/github.com/containers/storage/pkg/fileutils/fileutils.go @@ -165,7 +165,7 @@ func (pm *PatternMatcher) Patterns() []*Pattern { return pm.patterns } -// Pattern defines a single regexp used used to filter file paths. +// Pattern defines a single regexp used to filter file paths. type Pattern struct { cleanedPattern string dirs []string diff --git a/common/vendor/github.com/containers/storage/pkg/idmap/idmapped_utils.go b/common/vendor/github.com/containers/storage/pkg/idmap/idmapped_utils.go index 98ce707271..f52239f87f 100644 --- a/common/vendor/github.com/containers/storage/pkg/idmap/idmapped_utils.go +++ b/common/vendor/github.com/containers/storage/pkg/idmap/idmapped_utils.go @@ -34,10 +34,10 @@ func openTree(path string, flags int) (fd int, err error) { if e1 != 0 { err = e1 } - return int(r), nil + return int(r), err } -// moveMount is a wrapper for the the move_mount syscall. +// moveMount is a wrapper for the move_mount syscall. func moveMount(fdTree int, target string) (err error) { var _p0, _p1 *byte diff --git a/common/vendor/github.com/containers/storage/pkg/parsers/parsers.go b/common/vendor/github.com/containers/storage/pkg/parsers/parsers.go index 85c23381d9..3fb0c36b88 100644 --- a/common/vendor/github.com/containers/storage/pkg/parsers/parsers.go +++ b/common/vendor/github.com/containers/storage/pkg/parsers/parsers.go @@ -24,13 +24,14 @@ func ParseKeyValueOpt(opt string) (string, string, error) { // input string. It returns a `map[int]bool` with available elements from `val` // set to `true`. // Supported formats: -// 7 -// 1-6 -// 0,3-4,7,8-10 -// 0-0,0,1-7 -// 03,1-3 <- this is gonna get parsed as [1,2,3] -// 3,2,1 -// 0-2,3,1 +// +// 7 +// 1-6 +// 0,3-4,7,8-10 +// 0-0,0,1-7 +// 03,1-3 <- this is gonna get parsed as [1,2,3] +// 3,2,1 +// 0-2,3,1 func ParseUintList(val string) (map[int]bool, error) { if val == "" { return map[int]bool{}, nil diff --git a/common/vendor/github.com/containers/storage/pkg/reexec/reexec.go b/common/vendor/github.com/containers/storage/pkg/reexec/reexec.go index a1938cd4f3..0c032e6c47 100644 --- a/common/vendor/github.com/containers/storage/pkg/reexec/reexec.go +++ b/common/vendor/github.com/containers/storage/pkg/reexec/reexec.go @@ -49,7 +49,7 @@ func panicIfNotInitialized() { } } -func naiveSelf() string { +func naiveSelf() string { //nolint: unused name := os.Args[0] if filepath.Base(name) == name { if lp, err := exec.LookPath(name); err == nil { diff --git a/common/vendor/github.com/containers/storage/pkg/system/chtimes_unix.go b/common/vendor/github.com/containers/storage/pkg/system/chtimes_unix.go index a208a6b5ba..1ce4c0d6eb 100644 --- a/common/vendor/github.com/containers/storage/pkg/system/chtimes_unix.go +++ b/common/vendor/github.com/containers/storage/pkg/system/chtimes_unix.go @@ -7,9 +7,9 @@ import ( "time" ) -//setCTime will set the create time on a file. On Unix, the create -//time is updated as a side effect of setting the modified time, so -//no action is required. +// setCTime will set the create time on a file. On Unix, the create +// time is updated as a side effect of setting the modified time, so +// no action is required. func setCTime(path string, ctime time.Time) error { return nil } diff --git a/common/vendor/github.com/containers/storage/pkg/system/chtimes_windows.go b/common/vendor/github.com/containers/storage/pkg/system/chtimes_windows.go index bfb621dcc8..7a3d7937d6 100644 --- a/common/vendor/github.com/containers/storage/pkg/system/chtimes_windows.go +++ b/common/vendor/github.com/containers/storage/pkg/system/chtimes_windows.go @@ -9,8 +9,8 @@ import ( "golang.org/x/sys/windows" ) -//setCTime will set the create time on a file. On Windows, this requires -//calling SetFileTime and explicitly including the create time. +// setCTime will set the create time on a file. On Windows, this requires +// calling SetFileTime and explicitly including the create time. func setCTime(path string, ctime time.Time) error { ctimespec := windows.NsecToTimespec(ctime.UnixNano()) pathp, e := windows.UTF16PtrFromString(path) diff --git a/common/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go b/common/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go index 46cb40291f..37da93aa0b 100644 --- a/common/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go +++ b/common/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go @@ -59,7 +59,8 @@ func getSwapInfo() (int64, int64, error) { } // ReadMemInfo retrieves memory statistics of the host system and returns a -// MemInfo type. +// +// MemInfo type. func ReadMemInfo() (*MemInfo, error) { MemTotal, MemFree, err := getMemInfo() if err != nil { diff --git a/common/vendor/github.com/containers/storage/pkg/system/meminfo_solaris.go b/common/vendor/github.com/containers/storage/pkg/system/meminfo_solaris.go index d727b545c4..df53c40e21 100644 --- a/common/vendor/github.com/containers/storage/pkg/system/meminfo_solaris.go +++ b/common/vendor/github.com/containers/storage/pkg/system/meminfo_solaris.go @@ -81,7 +81,8 @@ func getFreeMem() int64 { } // ReadMemInfo retrieves memory statistics of the host system and returns a -// MemInfo type. +// +// MemInfo type. func ReadMemInfo() (*MemInfo, error) { ppKernel := C.getPpKernel() diff --git a/common/vendor/github.com/containers/storage/pkg/system/meminfo_windows.go b/common/vendor/github.com/containers/storage/pkg/system/meminfo_windows.go index 883944a4c5..c833f30f76 100644 --- a/common/vendor/github.com/containers/storage/pkg/system/meminfo_windows.go +++ b/common/vendor/github.com/containers/storage/pkg/system/meminfo_windows.go @@ -27,7 +27,8 @@ type memorystatusex struct { } // ReadMemInfo retrieves memory statistics of the host system and returns a -// MemInfo type. +// +// MemInfo type. func ReadMemInfo() (*MemInfo, error) { msi := &memorystatusex{ dwLength: 64, diff --git a/common/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go b/common/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go index 86922846e2..81cd67762f 100644 --- a/common/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go +++ b/common/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go @@ -33,9 +33,9 @@ type Cmd struct { *exec.Cmd UnshareFlags int UseNewuidmap bool - UidMappings []specs.LinuxIDMapping // nolint: golint + UidMappings []specs.LinuxIDMapping // nolint: revive,golint UseNewgidmap bool - GidMappings []specs.LinuxIDMapping // nolint: golint + GidMappings []specs.LinuxIDMapping // nolint: revive,golint GidMappingsEnableSetgroups bool Setsid bool Setpgrp bool @@ -175,12 +175,11 @@ func (c *Cmd) Start() error { pidWrite = nil // Read the child's PID from the pipe. - pidString := "" b := new(bytes.Buffer) if _, err := io.Copy(b, pidRead); err != nil { return fmt.Errorf("reading child PID: %w", err) } - pidString = b.String() + pidString := b.String() pid, err := strconv.Atoi(pidString) if err != nil { fmt.Fprintf(continueWrite, "error parsing PID %q: %v", pidString, err) @@ -451,7 +450,7 @@ type Runnable interface { Run() error } -func bailOnError(err error, format string, a ...interface{}) { // nolint: golint,goprintffuncname +func bailOnError(err error, format string, a ...interface{}) { // nolint: revive,goprintffuncname if err != nil { if format != "" { logrus.Errorf("%s: %v", fmt.Sprintf(format, a...), err) diff --git a/common/vendor/github.com/containers/storage/storage.conf b/common/vendor/github.com/containers/storage/storage.conf index 6c419a952f..99cc94a361 100644 --- a/common/vendor/github.com/containers/storage/storage.conf +++ b/common/vendor/github.com/containers/storage/storage.conf @@ -34,6 +34,8 @@ graphroot = "/var/lib/containers/storage" # Transient store mode makes all container metadata be saved in temporary storage # (i.e. runroot above). This is faster, but doesn't persist across reboots. +# Additional garbage collection must also be performed at boot-time, so this +# option should remain disabled in most configurations. # transient_store = true [storage.options] diff --git a/common/vendor/github.com/containers/storage/store.go b/common/vendor/github.com/containers/storage/store.go index 6e7a99314e..d80a18bbdf 100644 --- a/common/vendor/github.com/containers/storage/store.go +++ b/common/vendor/github.com/containers/storage/store.go @@ -506,10 +506,13 @@ type Store interface { // GetDigestLock returns digest-specific Locker. GetDigestLock(digest.Digest) (Locker, error) - // LayerFromAdditionalLayerStore searches layers from the additional layer store and - // returns the object for handling this. Note that this hasn't been stored to this store - // yet so this needs to be done through PutAs method. - // Releasing AdditionalLayer handler is caller's responsibility. + // LayerFromAdditionalLayerStore searches the additional layer store and returns an object + // which can create a layer with the specified digest associated with the specified image + // reference. Note that this hasn't been stored to this store yet: the actual creation of + // a usable layer is done by calling the returned object's PutAs() method. After creating + // a layer, the caller must then call the object's Release() method to free any temporary + // resources which were allocated for the object by this method or the object's PutAs() + // method. // This API is experimental and can be changed without bumping the major version number. LookupAdditionalLayer(d digest.Digest, imageref string) (AdditionalLayer, error) @@ -562,6 +565,17 @@ type LayerOptions struct { UncompressedDigest digest.Digest // True is the layer info can be treated as volatile Volatile bool + // BigData is a set of items which should be stored with the layer. + BigData []LayerBigDataOption + // Flags is a set of named flags and their values to store with the layer. + // Currently these can only be set when the layer record is created, but that + // could change in the future. + Flags map[string]interface{} +} + +type LayerBigDataOption struct { + Key string + Data io.Reader } // ImageOptions is used for passing options to a Store's CreateImage() method. @@ -571,6 +585,26 @@ type ImageOptions struct { CreationDate time.Time // Digest is a hard-coded digest value that we can use to look up the image. It is optional. Digest digest.Digest + // Digests is a list of digest values of the image's manifests, and + // possibly a manually-specified value, that we can use to locate the + // image. If Digest is set, its value is also in this list. + Digests []digest.Digest + // Metadata is caller-specified metadata associated with the layer. + Metadata string + // BigData is a set of items which should be stored with the image. + BigData []ImageBigDataOption + // NamesHistory is used for guessing for what this image was named when a container was created based + // on it, but it no longer has any names. + NamesHistory []string + // Flags is a set of named flags and their values to store with the image. Currently these can only + // be set when the image record is created, but that could change in the future. + Flags map[string]interface{} +} + +type ImageBigDataOption struct { + Key string + Data []byte + Digest digest.Digest } // ContainerOptions is used for passing options to a Store's CreateContainer() method. @@ -580,11 +614,23 @@ type ContainerOptions struct { // container's layer will inherit settings from the image's top layer // or, if it is not being created based on an image, the Store object. types.IDMappingOptions - LabelOpts []string + LabelOpts []string + // Flags is a set of named flags and their values to store with the container. + // Currently these can only be set when the container record is created, but that + // could change in the future. Flags map[string]interface{} MountOpts []string Volatile bool StorageOpt map[string]string + // Metadata is caller-specified metadata associated with the container. + Metadata string + // BigData is a set of items which should be stored for the container. + BigData []ContainerBigDataOption +} + +type ContainerBigDataOption struct { + Key string + Data []byte } type store struct { @@ -1221,7 +1267,7 @@ func canUseShifting(store rwLayerStore, uidmap, gidmap []idtools.IDMap) bool { return true } -func (s *store) PutLayer(id, parent string, names []string, mountLabel string, writeable bool, options *LayerOptions, diff io.Reader) (*Layer, int64, error) { +func (s *store) PutLayer(id, parent string, names []string, mountLabel string, writeable bool, lOptions *LayerOptions, diff io.Reader) (*Layer, int64, error) { var parentLayer *Layer rlstore, rlstores, err := s.bothLayerStoreKinds() if err != nil { @@ -1235,8 +1281,11 @@ func (s *store) PutLayer(id, parent string, names []string, mountLabel string, w return nil, -1, err } defer s.containerStore.stopWriting() - if options == nil { - options = &LayerOptions{} + var options LayerOptions + if lOptions != nil { + options = *lOptions + options.BigData = copyLayerBigDataOptionSlice(lOptions.BigData) + options.Flags = copyStringInterfaceMap(lOptions.Flags) } if options.HostUIDMapping { options.UIDMap = nil @@ -1303,7 +1352,7 @@ func (s *store) PutLayer(id, parent string, names []string, mountLabel string, w GIDMap: copyIDMap(gidMap), } } - return rlstore.Put(id, parentLayer, names, mountLabel, nil, &layerOptions, writeable, nil, diff) + return rlstore.create(id, parentLayer, names, mountLabel, nil, &layerOptions, writeable, diff) } func (s *store) CreateLayer(id, parent string, names []string, mountLabel string, writeable bool, options *LayerOptions) (*Layer, error) { @@ -1311,7 +1360,7 @@ func (s *store) CreateLayer(id, parent string, names []string, mountLabel string return layer, err } -func (s *store) CreateImage(id string, names []string, layer, metadata string, options *ImageOptions) (*Image, error) { +func (s *store) CreateImage(id string, names []string, layer, metadata string, iOptions *ImageOptions) (*Image, error) { if layer != "" { layerStores, err := s.allLayerStores() if err != nil { @@ -1337,13 +1386,22 @@ func (s *store) CreateImage(id string, names []string, layer, metadata string, o var res *Image err := s.writeToImageStore(func() error { - creationDate := time.Now().UTC() - if options != nil && !options.CreationDate.IsZero() { - creationDate = options.CreationDate + var options ImageOptions + + if iOptions != nil { + options = *iOptions + options.Digests = copyDigestSlice(iOptions.Digests) + options.BigData = copyImageBigDataOptionSlice(iOptions.BigData) + options.NamesHistory = copyStringSlice(iOptions.NamesHistory) + options.Flags = copyStringInterfaceMap(iOptions.Flags) } + if options.CreationDate.IsZero() { + options.CreationDate = time.Now().UTC() + } + options.Metadata = metadata var err error - res, err = s.imageStore.Create(id, names, layer, metadata, creationDate, options.Digest) + res, err = s.imageStore.create(id, names, layer, options) return err }) return res, err @@ -1426,26 +1484,22 @@ func (s *store) imageTopLayerForMapping(image *Image, ristore roImageStore, rlst // mappings, and register it as an alternate top layer in the image. var layerOptions LayerOptions if canUseShifting(rlstore, options.UIDMap, options.GIDMap) { - layerOptions = LayerOptions{ - IDMappingOptions: types.IDMappingOptions{ - HostUIDMapping: true, - HostGIDMapping: true, - UIDMap: nil, - GIDMap: nil, - }, + layerOptions.IDMappingOptions = types.IDMappingOptions{ + HostUIDMapping: true, + HostGIDMapping: true, + UIDMap: nil, + GIDMap: nil, } } else { - layerOptions = LayerOptions{ - IDMappingOptions: types.IDMappingOptions{ - HostUIDMapping: options.HostUIDMapping, - HostGIDMapping: options.HostGIDMapping, - UIDMap: copyIDMap(options.UIDMap), - GIDMap: copyIDMap(options.GIDMap), - }, + layerOptions.IDMappingOptions = types.IDMappingOptions{ + HostUIDMapping: options.HostUIDMapping, + HostGIDMapping: options.HostGIDMapping, + UIDMap: copyIDMap(options.UIDMap), + GIDMap: copyIDMap(options.GIDMap), } } layerOptions.TemplateLayer = layer.ID - mappedLayer, _, err := rlstore.Put("", parentLayer, nil, layer.MountLabel, nil, &layerOptions, false, nil, nil) + mappedLayer, _, err := rlstore.create("", parentLayer, nil, layer.MountLabel, nil, &layerOptions, false, nil) if err != nil { return nil, fmt.Errorf("creating an ID-mapped copy of layer %q: %w", layer.ID, err) } @@ -1459,9 +1513,17 @@ func (s *store) imageTopLayerForMapping(image *Image, ristore roImageStore, rlst return mappedLayer, nil } -func (s *store) CreateContainer(id string, names []string, image, layer, metadata string, options *ContainerOptions) (*Container, error) { - if options == nil { - options = &ContainerOptions{} +func (s *store) CreateContainer(id string, names []string, image, layer, metadata string, cOptions *ContainerOptions) (*Container, error) { + var options ContainerOptions + if cOptions != nil { + options = *cOptions + options.IDMappingOptions.UIDMap = copyIDMap(cOptions.IDMappingOptions.UIDMap) + options.IDMappingOptions.GIDMap = copyIDMap(cOptions.IDMappingOptions.GIDMap) + options.LabelOpts = copyStringSlice(cOptions.LabelOpts) + options.Flags = copyStringInterfaceMap(cOptions.Flags) + options.MountOpts = copyStringSlice(cOptions.MountOpts) + options.StorageOpt = copyStringStringMap(cOptions.StorageOpt) + options.BigData = copyContainerBigDataOptionSlice(cOptions.BigData) } if options.HostUIDMapping { options.UIDMap = nil @@ -1469,6 +1531,7 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat if options.HostGIDMapping { options.GIDMap = nil } + options.Metadata = metadata rlstore, lstores, err := s.bothLayerStoreKinds() // lstores will be locked read-only if image != "" if err != nil { return nil, err @@ -1574,22 +1637,19 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat Volatile: options.Volatile || s.transientStore, } if canUseShifting(rlstore, uidMap, gidMap) { - layerOptions.IDMappingOptions = - types.IDMappingOptions{ - HostUIDMapping: true, - HostGIDMapping: true, - UIDMap: nil, - GIDMap: nil, - } + layerOptions.IDMappingOptions = types.IDMappingOptions{ + HostUIDMapping: true, + HostGIDMapping: true, + UIDMap: nil, + GIDMap: nil, + } } else { - layerOptions.IDMappingOptions = - types.IDMappingOptions{ - HostUIDMapping: idMappingsOptions.HostUIDMapping, - HostGIDMapping: idMappingsOptions.HostGIDMapping, - UIDMap: copyIDMap(uidMap), - GIDMap: copyIDMap(gidMap), - } - + layerOptions.IDMappingOptions = types.IDMappingOptions{ + HostUIDMapping: idMappingsOptions.HostUIDMapping, + HostGIDMapping: idMappingsOptions.HostGIDMapping, + UIDMap: copyIDMap(uidMap), + GIDMap: copyIDMap(gidMap), + } } if options.Flags == nil { options.Flags = make(map[string]interface{}) @@ -1610,7 +1670,7 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat options.Flags[mountLabelFlag] = mountLabel } - clayer, err := rlstore.Create(layer, imageTopLayer, nil, mlabel, options.StorageOpt, layerOptions, true) + clayer, _, err := rlstore.create(layer, imageTopLayer, nil, mlabel, options.StorageOpt, layerOptions, true, nil) if err != nil { return nil, err } @@ -1630,7 +1690,7 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat GIDMap: copyIDMap(options.GIDMap), } var err error - container, err = s.containerStore.Create(id, names, imageID, layer, metadata, options) + container, err = s.containerStore.create(id, names, imageID, layer, &options) if err != nil || container == nil { if err2 := rlstore.Delete(layer); err2 != nil { if err == nil { @@ -2117,7 +2177,8 @@ func (s *store) updateNames(id string, names []string, op updateNameOperation) e return s.imageStore.updateNames(id, deduped, op) } - // Check is id refers to a RO Store + // Check if the id refers to a read-only image store -- we want to allow images in + // read-only stores to have their names changed. for _, is := range s.roImageStores { store := is if err := store.startReading(); err != nil { @@ -2125,12 +2186,35 @@ func (s *store) updateNames(id string, names []string, op updateNameOperation) e } defer store.stopReading() if i, err := store.Get(id); err == nil { - if len(deduped) > 1 { - // Do not want to create image name in R/W storage - deduped = deduped[1:] + // "pull up" the image so that we can change its names list + options := ImageOptions{ + Metadata: i.Metadata, + CreationDate: i.Created, + Digest: i.Digest, + Digests: copyDigestSlice(i.Digests), + NamesHistory: copyStringSlice(i.NamesHistory), } - _, err := s.imageStore.Create(id, deduped, i.TopLayer, i.Metadata, i.Created, i.Digest) - return err + for _, key := range i.BigDataNames { + data, err := store.BigData(id, key) + if err != nil { + return err + } + dataDigest, err := store.BigDataDigest(id, key) + if err != nil { + return err + } + options.BigData = append(options.BigData, ImageBigDataOption{ + Key: key, + Data: data, + Digest: dataDigest, + }) + } + _, err = s.imageStore.create(id, i.Names, i.TopLayer, options) + if err != nil { + return err + } + // now make the changes to the writeable image record's names list + return s.imageStore.updateNames(id, deduped, op) } } @@ -2962,6 +3046,16 @@ func (s *store) Image(id string) (*Image, error) { if done, err := s.readAllImageStores(func(store roImageStore) (bool, error) { image, err := store.Get(id) if err == nil { + if store != s.imageStore { + // found it in a read-only store - readAllImageStores() still has the writeable store locked for reading + if _, localErr := s.imageStore.Get(image.ID); localErr == nil { + // if the lookup key was a name, and we found the image in a read-only + // store, but we have an entry with the same ID in the read-write store, + // then the name was removed when we duplicated the image's + // record into writable storage, so we should ignore this entry + return false, nil + } + } res = image return true, nil } @@ -3247,6 +3341,14 @@ func copyStringDigestMap(m map[string]digest.Digest) map[string]digest.Digest { return ret } +func copyStringStringMap(m map[string]string) map[string]string { + ret := make(map[string]string, len(m)) + for k, v := range m { + ret[k] = v + } + return ret +} + func copyDigestSlice(slice []digest.Digest) []digest.Digest { if len(slice) == 0 { return nil @@ -3266,6 +3368,31 @@ func copyStringInterfaceMap(m map[string]interface{}) map[string]interface{} { return ret } +func copyLayerBigDataOptionSlice(slice []LayerBigDataOption) []LayerBigDataOption { + ret := make([]LayerBigDataOption, len(slice)) + copy(ret, slice) + return ret +} + +func copyImageBigDataOptionSlice(slice []ImageBigDataOption) []ImageBigDataOption { + ret := make([]ImageBigDataOption, len(slice)) + for i := range slice { + ret[i].Key = slice[i].Key + ret[i].Data = append([]byte{}, slice[i].Data...) + ret[i].Digest = slice[i].Digest + } + return ret +} + +func copyContainerBigDataOptionSlice(slice []ContainerBigDataOption) []ContainerBigDataOption { + ret := make([]ContainerBigDataOption, len(slice)) + for i := range slice { + ret[i].Key = slice[i].Key + ret[i].Data = append([]byte{}, slice[i].Data...) + } + return ret +} + // AutoUserNsMinSize is the minimum size for automatically created user namespaces const AutoUserNsMinSize = 1024 diff --git a/common/vendor/github.com/containers/storage/userns.go b/common/vendor/github.com/containers/storage/userns.go index 9c27b5d399..32ae830bea 100644 --- a/common/vendor/github.com/containers/storage/userns.go +++ b/common/vendor/github.com/containers/storage/userns.go @@ -175,7 +175,7 @@ outer: // We need to create a temporary layer so we can mount it and lookup the // maximum IDs used. - clayer, err := rlstore.Create("", topLayer, nil, "", nil, layerOptions, false) + clayer, _, err := rlstore.create("", topLayer, nil, "", nil, layerOptions, false, nil) if err != nil { return 0, err } diff --git a/common/vendor/github.com/containers/storage/utils.go b/common/vendor/github.com/containers/storage/utils.go index 7f9e92b930..ae9600e687 100644 --- a/common/vendor/github.com/containers/storage/utils.go +++ b/common/vendor/github.com/containers/storage/utils.go @@ -2,7 +2,6 @@ package storage import ( "fmt" - "unicode" "github.com/containers/storage/types" ) @@ -73,15 +72,3 @@ func applyNameOperation(oldNames []string, opParameters []string, op updateNameO } return dedupeNames(result), nil } - -func nameLooksLikeID(name string) bool { - if len(name) != 64 { - return false - } - for _, c := range name { - if !unicode.Is(unicode.ASCII_Hex_Digit, c) { - return false - } - } - return true -} diff --git a/common/vendor/github.com/vbatts/tar-split/archive/tar/reader.go b/common/vendor/github.com/vbatts/tar-split/archive/tar/reader.go index ea64a38207..fcf3215539 100644 --- a/common/vendor/github.com/vbatts/tar-split/archive/tar/reader.go +++ b/common/vendor/github.com/vbatts/tar-split/archive/tar/reader.go @@ -41,7 +41,7 @@ type fileReader interface { // RawBytes accesses the raw bytes of the archive, apart from the file payload itself. // This includes the header and padding. // -// This call resets the current rawbytes buffer +// # This call resets the current rawbytes buffer // // Only when RawAccounting is enabled, otherwise this returns nil func (tr *Reader) RawBytes() []byte { @@ -126,7 +126,9 @@ func (tr *Reader) next() (*Header, error) { return nil, err } if hdr.Typeflag == TypeXGlobalHeader { - mergePAX(hdr, paxHdrs) + if err = mergePAX(hdr, paxHdrs); err != nil { + return nil, err + } return &Header{ Name: hdr.Name, Typeflag: hdr.Typeflag, @@ -381,9 +383,9 @@ func parsePAX(r io.Reader) (map[string]string, error) { // header in case further processing is required. // // The err will be set to io.EOF only when one of the following occurs: -// * Exactly 0 bytes are read and EOF is hit. -// * Exactly 1 block of zeros is read and EOF is hit. -// * At least 2 blocks of zeros are read. +// - Exactly 0 bytes are read and EOF is hit. +// - Exactly 1 block of zeros is read and EOF is hit. +// - At least 2 blocks of zeros are read. func (tr *Reader) readHeader() (*Header, *block, error) { // Two blocks of zero bytes marks the end of the archive. n, err := io.ReadFull(tr.r, tr.blk[:]) diff --git a/common/vendor/github.com/vbatts/tar-split/tar/asm/assemble.go b/common/vendor/github.com/vbatts/tar-split/tar/asm/assemble.go index d624450ab7..3eb32ab613 100644 --- a/common/vendor/github.com/vbatts/tar-split/tar/asm/assemble.go +++ b/common/vendor/github.com/vbatts/tar-split/tar/asm/assemble.go @@ -71,6 +71,8 @@ func WriteOutputTarStream(fg storage.FileGetter, up storage.Unpacker, w io.Write crcSum = make([]byte, 8) multiWriter = io.MultiWriter(w, crcHash) copyBuffer = byteBufferPool.Get().([]byte) + // TODO once we have some benchmark or memory profile then we can experiment with using *bytes.Buffer + //nolint:staticcheck // SA6002 not going to do a pointer here defer byteBufferPool.Put(copyBuffer) } else { crcHash.Reset() diff --git a/common/vendor/golang.org/x/sys/unix/ioctl_signed.go b/common/vendor/golang.org/x/sys/unix/ioctl_signed.go new file mode 100644 index 0000000000..7def9580e6 --- /dev/null +++ b/common/vendor/golang.org/x/sys/unix/ioctl_signed.go @@ -0,0 +1,70 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build aix || solaris +// +build aix solaris + +package unix + +import ( + "unsafe" +) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req int, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +// IoctlSetPointerInt performs an ioctl operation which sets an +// integer value on fd, using the specified request number. The ioctl +// argument is called with a pointer to the integer value, rather than +// passing the integer value directly. +func IoctlSetPointerInt(fd int, req int, value int) error { + v := int32(value) + return ioctlPtr(fd, req, unsafe.Pointer(&v)) +} + +// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. +// +// To change fd's window size, the req argument should be TIOCSWINSZ. +func IoctlSetWinsize(fd int, req int, value *Winsize) error { + // TODO: if we get the chance, remove the req parameter and + // hardcode TIOCSWINSZ. + return ioctlPtr(fd, req, unsafe.Pointer(value)) +} + +// IoctlSetTermios performs an ioctl on fd with a *Termios. +// +// The req value will usually be TCSETA or TIOCSETA. +func IoctlSetTermios(fd int, req int, value *Termios) error { + // TODO: if we get the chance, remove the req parameter. + return ioctlPtr(fd, req, unsafe.Pointer(value)) +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +// +// A few ioctl requests use the return value as an output parameter; +// for those, IoctlRetInt should be used instead of this function. +func IoctlGetInt(fd int, req int) (int, error) { + var value int + err := ioctlPtr(fd, req, unsafe.Pointer(&value)) + return value, err +} + +func IoctlGetWinsize(fd int, req int) (*Winsize, error) { + var value Winsize + err := ioctlPtr(fd, req, unsafe.Pointer(&value)) + return &value, err +} + +func IoctlGetTermios(fd int, req int) (*Termios, error) { + var value Termios + err := ioctlPtr(fd, req, unsafe.Pointer(&value)) + return &value, err +} diff --git a/common/vendor/golang.org/x/sys/unix/ioctl.go b/common/vendor/golang.org/x/sys/unix/ioctl_unsigned.go similarity index 92% rename from common/vendor/golang.org/x/sys/unix/ioctl.go rename to common/vendor/golang.org/x/sys/unix/ioctl_unsigned.go index 7ce8dd406f..649913d1ea 100644 --- a/common/vendor/golang.org/x/sys/unix/ioctl.go +++ b/common/vendor/golang.org/x/sys/unix/ioctl_unsigned.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris +//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd +// +build darwin dragonfly freebsd hurd linux netbsd openbsd package unix diff --git a/common/vendor/golang.org/x/sys/unix/ioctl_zos.go b/common/vendor/golang.org/x/sys/unix/ioctl_zos.go index 6532f09af2..cdc21bf76d 100644 --- a/common/vendor/golang.org/x/sys/unix/ioctl_zos.go +++ b/common/vendor/golang.org/x/sys/unix/ioctl_zos.go @@ -17,14 +17,14 @@ import ( // IoctlSetInt performs an ioctl operation which sets an integer value // on fd, using the specified request number. -func IoctlSetInt(fd int, req uint, value int) error { +func IoctlSetInt(fd int, req int, value int) error { return ioctl(fd, req, uintptr(value)) } // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. // // To change fd's window size, the req argument should be TIOCSWINSZ. -func IoctlSetWinsize(fd int, req uint, value *Winsize) error { +func IoctlSetWinsize(fd int, req int, value *Winsize) error { // TODO: if we get the chance, remove the req parameter and // hardcode TIOCSWINSZ. return ioctlPtr(fd, req, unsafe.Pointer(value)) @@ -33,7 +33,7 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error { // IoctlSetTermios performs an ioctl on fd with a *Termios. // // The req value is expected to be TCSETS, TCSETSW, or TCSETSF -func IoctlSetTermios(fd int, req uint, value *Termios) error { +func IoctlSetTermios(fd int, req int, value *Termios) error { if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) { return ENOSYS } @@ -47,13 +47,13 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error { // // A few ioctl requests use the return value as an output parameter; // for those, IoctlRetInt should be used instead of this function. -func IoctlGetInt(fd int, req uint) (int, error) { +func IoctlGetInt(fd int, req int) (int, error) { var value int err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return value, err } -func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { +func IoctlGetWinsize(fd int, req int) (*Winsize, error) { var value Winsize err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err @@ -62,7 +62,7 @@ func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { // IoctlGetTermios performs an ioctl on fd with a *Termios. // // The req value is expected to be TCGETS -func IoctlGetTermios(fd int, req uint) (*Termios, error) { +func IoctlGetTermios(fd int, req int) (*Termios, error) { var value Termios if req != TCGETS { return &value, ENOSYS diff --git a/common/vendor/golang.org/x/sys/unix/mkerrors.sh b/common/vendor/golang.org/x/sys/unix/mkerrors.sh index 7456d9ddde..2045d3dadb 100644 --- a/common/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/common/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -66,6 +66,7 @@ includes_Darwin=' #include #include #include +#include #include #include #include @@ -521,6 +522,7 @@ ccflags="$@" $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || $2 ~ /^NFC_.*_(MAX)?SIZE$/ || $2 ~ /^RAW_PAYLOAD_/ || + $2 ~ /^[US]F_/ || $2 ~ /^TP_STATUS_/ || $2 ~ /^FALLOC_/ || $2 ~ /^ICMPV?6?_(FILTER|SEC)/ || diff --git a/common/vendor/golang.org/x/sys/unix/syscall_aix.go b/common/vendor/golang.org/x/sys/unix/syscall_aix.go index d9f5544ccf..c406ae00f4 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -408,8 +408,8 @@ func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 } func (w WaitStatus) TrapCause() int { return -1 } -//sys ioctl(fd int, req uint, arg uintptr) (err error) -//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = ioctl +//sys ioctl(fd int, req int, arg uintptr) (err error) +//sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl // fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX // There is no way to create a custom fcntl and to keep //sys fcntl easily, diff --git a/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go index e92a0be163..f2871fa953 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go @@ -8,7 +8,6 @@ package unix //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go index 16eed17098..75718ec0f1 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go @@ -8,7 +8,6 @@ package unix //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64 diff --git a/common/vendor/golang.org/x/sys/unix/syscall_darwin.go b/common/vendor/golang.org/x/sys/unix/syscall_darwin.go index 7064d6ebab..206921504c 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -613,6 +613,7 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { //sys Rmdir(path string) (err error) //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) //sys Setegid(egid int) (err error) //sysnb Seteuid(euid int) (err error) //sysnb Setgid(gid int) (err error) @@ -622,7 +623,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { //sys Setprivexec(flag int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) @@ -676,7 +676,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { // Kqueue_from_portset_np // Kqueue_portset // Getattrlist -// Setattrlist // Getdirentriesattr // Searchfs // Delete diff --git a/common/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/common/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 221efc26bc..d4ce988e72 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -326,7 +326,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/common/vendor/golang.org/x/sys/unix/syscall_freebsd.go index 5bdde03e4a..afb10106f6 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -433,7 +433,6 @@ func Dup3(oldfd, newfd, flags int) error { //sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux.go b/common/vendor/golang.org/x/sys/unix/syscall_linux.go index 9735331530..fbaeb5fff1 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1873,7 +1873,6 @@ func Getpgrp() (pid int) { //sys OpenTree(dfd int, fileName string, flags uint) (r int, err error) //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT -//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64 //sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6 //sys read(fd int, p []byte) (n int, err error) @@ -1887,6 +1886,15 @@ func Getpgrp() (pid int) { //sysnb Settimeofday(tv *Timeval) (err error) //sys Setns(fd int, nstype int) (err error) +//go:linkname syscall_prlimit syscall.prlimit +func syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error + +func Prlimit(pid, resource int, newlimit, old *Rlimit) error { + // Just call the syscall version, because as of Go 1.21 + // it will affect starting a new process. + return syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old)) +} + // PrctlRetInt performs a prctl operation specified by option and further // optional arguments arg2 through arg5 depending on option. It returns a // non-negative integer that is returned by the prctl syscall. diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_386.go index ff5b5899d6..c7d9945ea1 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -97,33 +97,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { newoffset, errno := seek(fd, offset, whence) if errno != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 9b27035329..5b21fcfd75 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -46,7 +46,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index 856ad1d635..da2986415a 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -171,33 +171,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) } func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) } diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index 6422704bc5..a81f5742b8 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -39,7 +39,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) @@ -143,15 +142,6 @@ func Getrlimit(resource int, rlim *Rlimit) error { return getrlimit(resource, rlim) } -// Setrlimit prefers the prlimit64 system call. See issue 38604. -func Setrlimit(resource int, rlim *Rlimit) error { - err := Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - return setrlimit(resource, rlim) -} - func (r *PtraceRegs) PC() uint64 { return r.Pc } func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc } diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index 59dab510e9..69d2d7c3db 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -126,11 +126,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - return -} - func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(dirfd, path, nil, 0) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index bfef09a39e..76d564095e 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -37,7 +37,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Statfs(path string, buf *Statfs_t) (err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index ab30250966..aae7f0ffd3 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -151,33 +151,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func (r *PtraceRegs) PC() uint64 { return r.Epc } func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go index eac1cf1acc..66eff19a32 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go @@ -159,33 +159,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { return } -//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT - -func Setrlimit(resource int, rlim *Rlimit) (err error) { - err = Prlimit(0, resource, rlim, nil) - if err != ENOSYS { - return err - } - - rl := rlimit32{} - if rlim.Cur == rlimInf64 { - rl.Cur = rlimInf32 - } else if rlim.Cur < uint64(rlimInf32) { - rl.Cur = uint32(rlim.Cur) - } else { - return EINVAL - } - if rlim.Max == rlimInf64 { - rl.Max = rlimInf32 - } else if rlim.Max < uint64(rlimInf32) { - rl.Max = uint32(rlim.Max) - } else { - return EINVAL - } - - return setrlimit(resource, &rl) -} - func (r *PtraceRegs) PC() uint32 { return r.Nip } func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc } diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 4df56616b8..806aa2574d 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -34,7 +34,6 @@ package unix //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Stat(path string, stat *Stat_t) (err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 5f4243dea2..35851ef70b 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -38,7 +38,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index d0a7d40668..2f89e8f5de 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -34,7 +34,6 @@ import ( //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Stat(path string, stat *Stat_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/common/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index f5c793be26..7ca064ae76 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -31,7 +31,6 @@ package unix //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) -//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Stat(path string, stat *Stat_t) (err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/common/vendor/golang.org/x/sys/unix/syscall_netbsd.go index e66865dccb..018d7d4782 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -340,7 +340,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { //sys Setpriority(which int, who int, prio int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) @@ -501,7 +500,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) { // compat_43_osendmsg // compat_43_osethostid // compat_43_osethostname -// compat_43_osetrlimit // compat_43_osigblock // compat_43_osigsetmask // compat_43_osigstack diff --git a/common/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/common/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 5e9de23ae3..f9c7a9663c 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -294,7 +294,6 @@ func Uname(uname *Utsname) error { //sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setrtable(rtable int) (err error) //sysnb Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) diff --git a/common/vendor/golang.org/x/sys/unix/syscall_solaris.go b/common/vendor/golang.org/x/sys/unix/syscall_solaris.go index d3444b64d6..b600a289d3 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -545,24 +545,24 @@ func Minor(dev uint64) uint32 { * Expose the ioctl function */ -//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl -//sys ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) = libc.ioctl +//sys ioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl +//sys ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl -func ioctl(fd int, req uint, arg uintptr) (err error) { +func ioctl(fd int, req int, arg uintptr) (err error) { _, err = ioctlRet(fd, req, arg) return err } -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { _, err = ioctlPtrRet(fd, req, arg) return err } -func IoctlSetTermio(fd int, req uint, value *Termio) error { +func IoctlSetTermio(fd int, req int, value *Termio) error { return ioctlPtr(fd, req, unsafe.Pointer(value)) } -func IoctlGetTermio(fd int, req uint) (*Termio, error) { +func IoctlGetTermio(fd int, req int) (*Termio, error) { var value Termio err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err @@ -665,7 +665,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e //sys Setpriority(which int, who int, prio int) (err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) -//sysnb Setrlimit(which int, lim *Rlimit) (err error) //sysnb Setsid() (pid int, err error) //sysnb Setuid(uid int) (err error) //sys Shutdown(s int, how int) (err error) = libsocket.shutdown @@ -1080,11 +1079,11 @@ func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags return retCl, retData, flags, nil } -func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) { +func IoctlSetIntRetInt(fd int, req int, arg int) (int, error) { return ioctlRet(fd, req, uintptr(arg)) } -func IoctlSetString(fd int, req uint, val string) error { +func IoctlSetString(fd int, req int, val string) error { bs := make([]byte, len(val)+1) copy(bs[:len(bs)-1], val) err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0])) @@ -1120,7 +1119,7 @@ func (l *Lifreq) GetLifruUint() uint { return *(*uint)(unsafe.Pointer(&l.Lifru[0])) } -func IoctlLifreq(fd int, req uint, l *Lifreq) error { +func IoctlLifreq(fd int, req int, l *Lifreq) error { return ioctlPtr(fd, req, unsafe.Pointer(l)) } @@ -1131,6 +1130,6 @@ func (s *Strioctl) SetInt(i int) { s.Dp = (*int8)(unsafe.Pointer(&i)) } -func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) { +func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) { return ioctlPtrRet(fd, req, unsafe.Pointer(s)) } diff --git a/common/vendor/golang.org/x/sys/unix/syscall_unix.go b/common/vendor/golang.org/x/sys/unix/syscall_unix.go index 00f0aa3758..8e48c29ec3 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -587,3 +587,10 @@ func emptyIovecs(iov []Iovec) bool { } return true } + +// Setrlimit sets a resource limit. +func Setrlimit(resource int, rlim *Rlimit) error { + // Just call the syscall version, because as of Go 1.21 + // it will affect starting a new process. + return syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim)) +} diff --git a/common/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/common/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index b295497ae4..d3d49ec3ed 100644 --- a/common/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/common/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -212,8 +212,8 @@ func (cmsg *Cmsghdr) SetLen(length int) { //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP //sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP -//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL -//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL +//sys ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL +//sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A //sys Chdir(path string) (err error) = SYS___CHDIR_A diff --git a/common/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/common/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index 476a1c7e77..1430076271 100644 --- a/common/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -1270,6 +1270,16 @@ const ( SEEK_END = 0x2 SEEK_HOLE = 0x3 SEEK_SET = 0x0 + SF_APPEND = 0x40000 + SF_ARCHIVED = 0x10000 + SF_DATALESS = 0x40000000 + SF_FIRMLINK = 0x800000 + SF_IMMUTABLE = 0x20000 + SF_NOUNLINK = 0x100000 + SF_RESTRICTED = 0x80000 + SF_SETTABLE = 0x3fff0000 + SF_SUPPORTED = 0x9f0000 + SF_SYNTHETIC = 0xc0000000 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1543,6 +1553,15 @@ const ( TIOCTIMESTAMP = 0x40107459 TIOCUCNTL = 0x80047466 TOSTOP = 0x400000 + UF_APPEND = 0x4 + UF_COMPRESSED = 0x20 + UF_DATAVAULT = 0x80 + UF_HIDDEN = 0x8000 + UF_IMMUTABLE = 0x2 + UF_NODUMP = 0x1 + UF_OPAQUE = 0x8 + UF_SETTABLE = 0xffff + UF_TRACKED = 0x40 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 diff --git a/common/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/common/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index e36f5178d6..ab044a7427 100644 --- a/common/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -1270,6 +1270,16 @@ const ( SEEK_END = 0x2 SEEK_HOLE = 0x3 SEEK_SET = 0x0 + SF_APPEND = 0x40000 + SF_ARCHIVED = 0x10000 + SF_DATALESS = 0x40000000 + SF_FIRMLINK = 0x800000 + SF_IMMUTABLE = 0x20000 + SF_NOUNLINK = 0x100000 + SF_RESTRICTED = 0x80000 + SF_SETTABLE = 0x3fff0000 + SF_SUPPORTED = 0x9f0000 + SF_SYNTHETIC = 0xc0000000 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 @@ -1543,6 +1553,15 @@ const ( TIOCTIMESTAMP = 0x40107459 TIOCUCNTL = 0x80047466 TOSTOP = 0x400000 + UF_APPEND = 0x4 + UF_COMPRESSED = 0x20 + UF_DATAVAULT = 0x80 + UF_HIDDEN = 0x8000 + UF_IMMUTABLE = 0x2 + UF_NODUMP = 0x1 + UF_OPAQUE = 0x8 + UF_SETTABLE = 0xffff + UF_TRACKED = 0x40 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go index ef9dcd1bef..9a257219d7 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go @@ -124,7 +124,6 @@ int utime(uintptr_t, uintptr_t); unsigned long long getsystemcfg(int); int umount(uintptr_t); int getrlimit64(int, uintptr_t); -int setrlimit64(int, uintptr_t); long long lseek64(int, long long, int); uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long); @@ -213,7 +212,7 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctl(fd int, req uint, arg uintptr) (err error) { +func ioctl(fd int, req int, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg)) if r0 == -1 && er != nil { err = er @@ -223,7 +222,7 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg))) if r0 == -1 && er != nil { err = er @@ -1464,16 +1463,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim)))) - if r0 == -1 && er != nil { - err = er - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Seek(fd int, offset int64, whence int) (off int64, err error) { r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence)) off = int64(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go index f86a945923..6de80c20cf 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go @@ -93,8 +93,8 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctl(fd int, req uint, arg uintptr) (err error) { - _, e1 := callioctl(fd, int(req), arg) +func ioctl(fd int, req int, arg uintptr) (err error) { + _, e1 := callioctl(fd, req, arg) if e1 != 0 { err = errnoErr(e1) } @@ -103,8 +103,8 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { - _, e1 := callioctl_ptr(fd, int(req), arg) +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { + _, e1 := callioctl_ptr(fd, req, arg) if e1 != 0 { err = errnoErr(e1) } @@ -1422,16 +1422,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Seek(fd int, offset int64, whence int) (off int64, err error) { r0, e1 := calllseek(fd, offset, whence) off = int64(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go index d32a84cae2..c4d50ae500 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go @@ -124,7 +124,6 @@ import ( //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o" //go:cgo_import_dynamic libc_umount umount "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o" -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o" //go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mmap64 mmap64 "libc.a/shr_64.o" @@ -242,7 +241,6 @@ import ( //go:linkname libc_getsystemcfg libc_getsystemcfg //go:linkname libc_umount libc_umount //go:linkname libc_getrlimit libc_getrlimit -//go:linkname libc_setrlimit libc_setrlimit //go:linkname libc_lseek libc_lseek //go:linkname libc_mmap64 libc_mmap64 @@ -363,7 +361,6 @@ var ( libc_getsystemcfg, libc_umount, libc_getrlimit, - libc_setrlimit, libc_lseek, libc_mmap64 syscallFunc ) @@ -1179,13 +1176,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { - r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0) - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0) return diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go index d7d8baf819..6903d3b09e 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go @@ -123,7 +123,6 @@ int utime(uintptr_t, uintptr_t); unsigned long long getsystemcfg(int); int umount(uintptr_t); int getrlimit(int, uintptr_t); -int setrlimit(int, uintptr_t); long long lseek(int, long long, int); uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long); @@ -131,6 +130,7 @@ uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long); import "C" import ( "syscall" + "unsafe" ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT @@ -1055,14 +1055,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { - r1 = uintptr(C.setrlimit(C.int(resource), C.uintptr_t(rlim))) - e1 = syscall.GetErrno() - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence))) e1 = syscall.GetErrno() diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index a29ffdd566..4037ccf7a9 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -1992,6 +1992,31 @@ var libc_select_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(attrBuf) > 0 { + _p1 = unsafe.Pointer(&attrBuf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_setattrlist_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Setegid(egid int) (err error) { _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { @@ -2123,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index 95fe4c0eb9..4baaed0bc1 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) +TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setattrlist(SB) +GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) + TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) @@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) - -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 2fd4590bb7..51d6f3fb25 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -1992,6 +1992,31 @@ var libc_select_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(attrBuf) > 0 { + _p1 = unsafe.Pointer(&attrBuf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_setattrlist_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Setegid(egid int) (err error) { _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { @@ -2123,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index efa5b4c987..c3b82c0379 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) +TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_setattrlist(SB) +GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 +DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) + TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) @@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) - -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 3b85134707..0eabac7ade 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -1410,16 +1410,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index 1129065624..ee313eb007 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 55f5abfe59..4c986e448e 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index d39651c2b5..555216944a 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go index ddb7408680..67a226fbf5 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go index 09a53a616c..f0b9ddaaa2 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go @@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 430cb24de7..da63d9d782 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -1346,16 +1346,6 @@ func PivotRoot(newroot string, putold string) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { - _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index c81b0ad477..07b549cc25 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -411,16 +411,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 2206bce7f4..5f481bf83f 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -334,16 +334,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index edf6b39f16..824cd52c7f 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -578,16 +578,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32)) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 190609f214..e77aecfe98 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -289,16 +289,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 5f984cbb1c..961a3afb7b 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index 46fc380a40..ed05005e91 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index cbd0d4dadb..d365b718f3 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 0c13d15f07..c3f1b8bbde 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go index e01432aed5..a6574cf98b 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go @@ -624,16 +624,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func setrlimit(resource int, rlim *rlimit32) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n)) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 13c7ee7baf..f40990264f 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 02d0c0fd61..9dfcc29974 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go index 9fee3b1d23..0b29239583 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go @@ -269,16 +269,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 647bbfecd6..6cde32237d 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -319,16 +319,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) n = int64(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go index ada057f891..5253d65bf1 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go @@ -329,16 +329,6 @@ func setfsuid(uid int) (prev int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(resource int, rlim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Shutdown(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index 8e1d9c8f66..cdb2af5ae0 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 21c6950400..9d25f76b0b 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index 298168f90a..d3f8035169 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go index 68b8bd492f..887188a529 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go @@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 0b0f910e1a..6699a783e1 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 087444250c..04f0de34b2 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 -DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 48ff5de75b..1e775fe057 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 5782cd1084..27b6f4df74 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 2452a641da..7f6427899a 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index cf310420c9..b797045fd2 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4 -DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 5e35600a60..756ef7b173 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index 484bb42e0a..a871266221 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index b04cef1a19..7bc2e24eb9 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index 55af27263a..05d4bffd79 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 47a07ee0c2..739be6217a 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 4028255b0d..74a25f8d64 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -687,12 +687,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - CALL libc_setrlimit(SB) - RET -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setrtable(SB) RET diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 573378fdb9..7d95a19780 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -var libc_setrlimit_trampoline_addr uintptr - -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index e1fbd4dfa8..990be24574 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) -TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0 - JMP libc_setrlimit(SB) -GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8 -DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB) - TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/common/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index 4873a1e5d3..609d1c598a 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -110,7 +110,6 @@ import ( //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" //go:cgo_import_dynamic libc_setregid setregid "libc.so" //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" -//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" //go:cgo_import_dynamic libc_setsid setsid "libc.so" //go:cgo_import_dynamic libc_setuid setuid "libc.so" //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so" @@ -250,7 +249,6 @@ import ( //go:linkname procSetpriority libc_setpriority //go:linkname procSetregid libc_setregid //go:linkname procSetreuid libc_setreuid -//go:linkname procSetrlimit libc_setrlimit //go:linkname procSetsid libc_setsid //go:linkname procSetuid libc_setuid //go:linkname procshutdown libc_shutdown @@ -391,7 +389,6 @@ var ( procSetpriority, procSetregid, procSetreuid, - procSetrlimit, procSetsid, procSetuid, procshutdown, @@ -646,7 +643,7 @@ func __minor(version int, dev uint64) (val uint) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) { +func ioctlRet(fd int, req int, arg uintptr) (ret int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) ret = int(r0) if e1 != 0 { @@ -657,7 +654,7 @@ func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) { +func ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) ret = int(r0) if e1 != 0 { @@ -1650,16 +1647,6 @@ func Setreuid(ruid int, euid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Setrlimit(which int, lim *Rlimit) (err error) { - _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) - if e1 != 0 { - err = e1 - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Setsid() (pid int, err error) { r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0) pid = int(r0) diff --git a/common/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/common/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go index 07bfe2ef9a..c31681743c 100644 --- a/common/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go +++ b/common/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go @@ -257,7 +257,7 @@ func munmap(addr uintptr, length uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctl(fd int, req uint, arg uintptr) (err error) { +func ioctl(fd int, req int, arg uintptr) (err error) { _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) @@ -267,7 +267,7 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { +func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) diff --git a/common/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/common/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index e2a64f0991..690cefc3d0 100644 --- a/common/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/common/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -151,6 +151,16 @@ type Dirent struct { _ [3]byte } +type Attrlist struct { + Bitmapcount uint16 + Reserved uint16 + Commonattr uint32 + Volattr uint32 + Dirattr uint32 + Fileattr uint32 + Forkattr uint32 +} + const ( PathMax = 0x400 ) @@ -610,6 +620,7 @@ const ( AT_REMOVEDIR = 0x80 AT_SYMLINK_FOLLOW = 0x40 AT_SYMLINK_NOFOLLOW = 0x20 + AT_EACCESS = 0x10 ) type PollFd struct { diff --git a/common/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/common/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 34aa775219..5bffc10eac 100644 --- a/common/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/common/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -151,6 +151,16 @@ type Dirent struct { _ [3]byte } +type Attrlist struct { + Bitmapcount uint16 + Reserved uint16 + Commonattr uint32 + Volattr uint32 + Dirattr uint32 + Fileattr uint32 + Forkattr uint32 +} + const ( PathMax = 0x400 ) @@ -610,6 +620,7 @@ const ( AT_REMOVEDIR = 0x80 AT_SYMLINK_FOLLOW = 0x40 AT_SYMLINK_NOFOLLOW = 0x20 + AT_EACCESS = 0x10 ) type PollFd struct { diff --git a/common/vendor/golang.org/x/sys/windows/types_windows.go b/common/vendor/golang.org/x/sys/windows/types_windows.go index 857acf1032..0dbb208411 100644 --- a/common/vendor/golang.org/x/sys/windows/types_windows.go +++ b/common/vendor/golang.org/x/sys/windows/types_windows.go @@ -2229,10 +2229,10 @@ const ( JobObjectExtendedLimitInformation = 9 JobObjectGroupInformation = 11 JobObjectGroupInformationEx = 14 - JobObjectLimitViolationInformation2 = 35 + JobObjectLimitViolationInformation2 = 34 JobObjectNetRateControlInformation = 32 JobObjectNotificationLimitInformation = 12 - JobObjectNotificationLimitInformation2 = 34 + JobObjectNotificationLimitInformation2 = 33 JobObjectSecurityLimitInformation = 5 ) diff --git a/common/vendor/modules.txt b/common/vendor/modules.txt index d40e5c683e..ca406c28b4 100644 --- a/common/vendor/modules.txt +++ b/common/vendor/modules.txt @@ -165,8 +165,8 @@ github.com/containers/ocicrypt/keywrap/pkcs7 github.com/containers/ocicrypt/spec github.com/containers/ocicrypt/utils github.com/containers/ocicrypt/utils/keyprovider -# github.com/containers/storage v1.45.5-0.20230326103843-b1216421c44b -## explicit; go 1.17 +# github.com/containers/storage v1.46.0 +## explicit; go 1.18 github.com/containers/storage github.com/containers/storage/drivers github.com/containers/storage/drivers/aufs @@ -482,7 +482,7 @@ github.com/opencontainers/go-digest ## explicit; go 1.17 github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1 -# github.com/opencontainers/runc v1.1.4 => github.com/opencontainers/runc v1.1.1-0.20220617142545-8b9452f75cbc +# github.com/opencontainers/runc v1.1.5 => github.com/opencontainers/runc v1.1.1-0.20220617142545-8b9452f75cbc ## explicit; go 1.17 github.com/opencontainers/runc/libcontainer/apparmor github.com/opencontainers/runc/libcontainer/cgroups @@ -580,7 +580,7 @@ github.com/ulikunitz/xz github.com/ulikunitz/xz/internal/hash github.com/ulikunitz/xz/internal/xlog github.com/ulikunitz/xz/lzma -# github.com/vbatts/tar-split v0.11.2 +# github.com/vbatts/tar-split v0.11.3 ## explicit; go 1.15 github.com/vbatts/tar-split/archive/tar github.com/vbatts/tar-split/tar/asm @@ -667,7 +667,7 @@ golang.org/x/net/trace ## explicit golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.6.0 +# golang.org/x/sys v0.7.0 ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/execabs