diff --git a/Gopkg.lock b/Gopkg.lock index 47f351e04..8bfc68aea 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -3,19 +3,19 @@ [[projects]] branch = "master" - digest = "1:b73fe282e350b3ef2c71d8ff08e929e0b9670b1bb5b7fde1d3c1b4cd6e6dc8b1" + digest = "1:a9d571cb07f008d5992d0ca174c4527824a5be1f386d00746c0ca24a8bea0456" name = "github.com/Sirupsen/logrus" packages = ["."] pruneopts = "" - revision = "dae0fa8d5b0c810a8ab733fbd5510c7cae84eca4" + revision = "9b3cdde74fbe9443d704467498a7dcb61a79de9b" [[projects]] branch = "master" - digest = "1:a5b446734aaae7f706e340647bd166788523ed5b334c3a9013beea523ab2bb08" + digest = "1:68d3ab0386bf31cb081165ebefa9bc1ef1049f3ac0b9da61d5b98d892b7105bf" name = "github.com/bitrise-io/envman" packages = ["models"] pruneopts = "" - revision = "c6683c3e097216a80eb72092bf857c8a9591195e" + revision = "dce389aa0508c35e26577e66970433e9e6750c14" [[projects]] branch = "master" @@ -49,19 +49,19 @@ [[projects]] branch = "master" - digest = "1:bd45be4bb8c60ad5be9db42477d813740bdf9625600309064e6ca8fb485686fe" - name = "github.com/bitrise-io/stepman" - packages = ["models"] + digest = "1:f3571d1392019a5ca17e0632f5374531f8b38994eeea456b85bfd5ccb86e081d" + name = "github.com/bitrise-io/gows" + packages = ["gows"] pruneopts = "" - revision = "f4f6ef946f83d9a4e823d3531e15287dec05fce1" + revision = "005d8a8baa6e3c6c76527554bb292061ef7d3af0" [[projects]] branch = "master" - digest = "1:f3571d1392019a5ca17e0632f5374531f8b38994eeea456b85bfd5ccb86e081d" - name = "github.com/bitrise-tools/gows" - packages = ["gows"] + digest = "1:bd0399b1f8cdc308663bc471e7f12e9678b0a775537b43d25a9ea2eb70d1de51" + name = "github.com/bitrise-io/stepman" + packages = ["models"] pruneopts = "" - revision = "005d8a8baa6e3c6c76527554bb292061ef7d3af0" + revision = "9b6ace540ad679bf57868e3429ff4df4e733bd69" [[projects]] digest = "1:0deddd908b6b4b768cfc272c16ee61e7088a60f7fe2f06c547bd3d8e1f8b8e77" @@ -124,30 +124,30 @@ [[projects]] branch = "master" - digest = "1:ab3e9a81a5ec54c5d1ed41d0d6898ba88c6799fa401b784b06bdee8e432d872b" + digest = "1:79c9390c9986545f84bdf2600e380c5938c7b27067290514e964367cd4102476" name = "golang.org/x/crypto" packages = ["ssh/terminal"] pruneopts = "" - revision = "a1f597ede03a7bef967a422b5b3a5bd08805a01e" + revision = "38d8ce5564a5b71b2e3a00553993f1b9a7ae852f" [[projects]] branch = "master" - digest = "1:9c1e747af61ab955fba74a79e87d5843a5d1d504e3ef86480f76e6a4e3a49136" + digest = "1:55c52474bb389797ed66db92966e2b9ddc98a25d9d05c8aa55787fe03d4d4084" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "" - revision = "fead79001313d15903fb4605b4a1b781532cd93e" + revision = "4b34438f7a67ee5f45cc6132e2bad873a20324e9" [[projects]] branch = "v2" - digest = "1:cedccf16b71e86db87a24f8d4c70b0a855872eb967cb906a66b95de56aefbd0d" + digest = "1:60ccede33d50c82c86e907255319a6f40dca4ac395e5ee143638176d3b871069" name = "gopkg.in/yaml.v2" packages = ["."] pruneopts = "" - revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" + revision = "7b8349ac747c6a24702b762d2c4fd9266cf4f1d6" [solve-meta] analyzer-name = "dep" @@ -168,8 +168,8 @@ "github.com/bitrise-io/go-utils/stringutil", "github.com/bitrise-io/go-utils/versions", "github.com/bitrise-io/goinp/goinp", + "github.com/bitrise-io/gows/gows", "github.com/bitrise-io/stepman/models", - "github.com/bitrise-tools/gows/gows", "github.com/hashicorp/go-version", "github.com/ryanuber/go-glob", "github.com/stretchr/testify/require", diff --git a/Gopkg.toml b/Gopkg.toml index 89b0881e8..d97910f28 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -19,7 +19,7 @@ branch = "master" [[constraint]] - name = "github.com/bitrise-tools/gows" + name = "github.com/bitrise-io/gows" branch = "master" [[constraint]] diff --git a/_tests/integration/version_test.go b/_tests/integration/version_test.go index eee74308c..111f62017 100644 --- a/_tests/integration/version_test.go +++ b/_tests/integration/version_test.go @@ -14,7 +14,7 @@ func Test_VersionOutput(t *testing.T) { { out, err := command.RunCommandAndReturnCombinedStdoutAndStderr(binPath(), "version") require.NoError(t, err) - require.Equal(t, "1.28.0", out) + require.Equal(t, "1.29.0", out) } t.Log("Version --full") @@ -23,7 +23,7 @@ func Test_VersionOutput(t *testing.T) { require.NoError(t, err) expectedOSVersion := fmt.Sprintf("%s (%s)", runtime.GOOS, runtime.GOARCH) - expectedVersionOut := fmt.Sprintf(`version: 1.28.0 + expectedVersionOut := fmt.Sprintf(`version: 1.29.0 format version: 7 os: %s go: %s diff --git a/bitrise/setup.go b/bitrise/setup.go index ec2c0cbdf..ec381b3f0 100644 --- a/bitrise/setup.go +++ b/bitrise/setup.go @@ -14,8 +14,8 @@ import ( ) const ( - minEnvmanVersion = "2.2.1" - minStepmanVersion = "0.11.2" + minEnvmanVersion = "2.2.2" + minStepmanVersion = "0.11.3" ) // PluginDependency .. @@ -27,20 +27,20 @@ type PluginDependency struct { // PluginDependencyMap ... var PluginDependencyMap = map[string]PluginDependency{ "init": PluginDependency{ - Source: "https://github.com/bitrise-core/bitrise-plugins-init.git", - MinVersion: "1.1.0", + Source: "https://github.com/bitrise-io/bitrise-plugins-init.git", + MinVersion: "1.1.1", }, "step": PluginDependency{ - Source: "https://github.com/bitrise-core/bitrise-plugins-step.git", - MinVersion: "0.9.8", + Source: "https://github.com/bitrise-io/bitrise-plugins-step.git", + MinVersion: "0.9.9", }, "workflow-editor": PluginDependency{ Source: "https://github.com/bitrise-io/bitrise-workflow-editor.git", - MinVersion: "1.1.50", + MinVersion: "1.1.52", }, "analytics": PluginDependency{ - Source: "https://github.com/bitrise-core/bitrise-plugins-analytics.git", - MinVersion: "0.9.15", + Source: "https://github.com/bitrise-io/bitrise-plugins-analytics.git", + MinVersion: "0.10.1", }, } diff --git a/plugins/install.go b/plugins/install.go index 401b50cd9..cbd447644 100644 --- a/plugins/install.go +++ b/plugins/install.go @@ -13,6 +13,7 @@ import ( "github.com/bitrise-io/go-utils/log" "github.com/bitrise-io/go-utils/pathutil" "github.com/bitrise-io/go-utils/progress" + "github.com/bitrise-io/go-utils/sliceutil" ver "github.com/hashicorp/go-version" ) @@ -97,6 +98,22 @@ func cleanupPlugin(name string) error { return DeletePluginRoute(name) } +// plugins from bitrise-core to bitrise-io GitHub org have been moved +// so it is better to not to detect this as a different plugin source +func isSourceURIChanged(installed, new string) bool { + if urlsForOrg := func(org string) []string { + return []string{ + "https://github.com/" + org + "/bitrise-plugins-init.git", + "https://github.com/" + org + "/bitrise-plugins-step.git", + "https://github.com/" + org + "/bitrise-plugins-analytics.git", + } + }; (installed == new) || (sliceutil.IsStringInSlice(installed, urlsForOrg("bitrise-core")) && + sliceutil.IsStringInSlice(new, urlsForOrg("bitrise-io"))) { + return false + } + return true +} + func installLocalPlugin(pluginSourceURI, pluginLocalPth string) (Plugin, error) { // Parse & validate plugin tmpPluginYMLPath := filepath.Join(pluginLocalPth, pluginDefinitionFileName) @@ -119,7 +136,7 @@ func installLocalPlugin(pluginSourceURI, pluginLocalPth string) (Plugin, error) if route, found, err := ReadPluginRoute(newPlugin.Name); err != nil { return Plugin{}, fmt.Errorf("failed to check if plugin already installed, error: %s", err) } else if found { - if route.Source != pluginSourceURI { + if isSourceURIChanged(route.Source, pluginSourceURI) { return Plugin{}, fmt.Errorf("plugin already installed with name (%s) from different source (%s)", route.Name, route.Source) } diff --git a/plugins/install_test.go b/plugins/install_test.go index 53833e9a0..c1d29a5ed 100644 --- a/plugins/install_test.go +++ b/plugins/install_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" ) -const examplePluginGitURL = "https://github.com/bitrise-core/bitrise-plugins-example.git" -const analyticsPluginBinURL = "https://github.com/bitrise-core/bitrise-plugins-analytics/releases/download/0.9.1/analytics-Darwin-x86_64" +const examplePluginGitURL = "https://github.com/bitrise-io/bitrise-plugins-example.git" +const analyticsPluginBinURL = "https://github.com/bitrise-io/bitrise-plugins-analytics/releases/download/0.9.1/analytics-Darwin-x86_64" func TestIsLocalURL(t *testing.T) { t.Log("local url - absolute") @@ -221,3 +221,25 @@ func TestDownloadPluginBin(t *testing.T) { require.Equal(t, true, exist) } } + +func Test_isSourceURIChanged(t *testing.T) { + for _, tt := range []struct { + installed string + new string + want bool + }{ + {installed: "https://github.com/bitrise-core/bitrise-plugins-analytics.git", new: "https://github.com/bitrise-core/bitrise-plugins-analytics.git", want: false}, + {installed: "https://github.com/bitrise-core/bitrise-plugins-analytics.git", new: "https://github.com/bitrise-io/bitrise-plugins-analytics.git", want: false}, + {installed: "https://github.com/bitrise-core/bitrise-plugins-analytics.git", new: "https://github.com/myorg/bitrise-plugins-analytics.git", want: true}, + {installed: "https://github.com/bitrise-core/bitrise-plugins-analytics.git", new: "https://github.com/bitrise-team/bitrise-plugins-analytics.git", want: true}, + {installed: "https://github.com/bitrise-custom-org/bitrise-plugins-analytics.git", new: "https://github.com/bitrise-core/bitrise-plugins-analytics.git", want: true}, + {installed: "https://github.com/bitrise-custom-org/bitrise-plugins-analytics.git", new: "https://github.com/bitrise-io/bitrise-plugins-analytics.git", want: true}, + } { + t.Run("", func(t *testing.T) { + if got := isSourceURIChanged(tt.installed, tt.new); got != tt.want { + t.Log(tt.installed, tt.new) + t.Errorf("isSourceURIChanged() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/toolkits/golang.go b/toolkits/golang.go index 837d5f34f..0cf493fce 100644 --- a/toolkits/golang.go +++ b/toolkits/golang.go @@ -20,8 +20,8 @@ import ( "github.com/bitrise-io/go-utils/progress" "github.com/bitrise-io/go-utils/retry" "github.com/bitrise-io/go-utils/versions" + "github.com/bitrise-io/gows/gows" stepmanModels "github.com/bitrise-io/stepman/models" - "github.com/bitrise-tools/gows/gows" ) const ( diff --git a/vendor/github.com/Sirupsen/logrus/.travis.yml b/vendor/github.com/Sirupsen/logrus/.travis.yml index a8f154515..7e54dc6e3 100644 --- a/vendor/github.com/Sirupsen/logrus/.travis.yml +++ b/vendor/github.com/Sirupsen/logrus/.travis.yml @@ -1,52 +1,21 @@ language: go go_import_path: github.com/sirupsen/logrus +git: + depth: 1 env: - - GOMAXPROCS=4 GORACE=halt_on_error=1 + - GO111MODULE=on + - GO111MODULE=off +go: [ 1.10.x, 1.11.x, 1.12.x ] +os: [ linux, osx, windows ] matrix: - include: - - go: 1.10.x - install: - - go get github.com/stretchr/testify/assert - - go get golang.org/x/crypto/ssh/terminal - - go get golang.org/x/sys/unix - - go get golang.org/x/sys/windows - script: - - go test -race -v ./... - - go: 1.11.x - env: GO111MODULE=on - install: - - go mod download - script: - - go test -race -v ./... - - go: 1.11.x - env: GO111MODULE=off - install: - - go get github.com/stretchr/testify/assert - - go get golang.org/x/crypto/ssh/terminal - - go get golang.org/x/sys/unix - - go get golang.org/x/sys/windows - script: - - go test -race -v ./... - - go: 1.10.x - install: - - go get github.com/stretchr/testify/assert - - go get golang.org/x/crypto/ssh/terminal - - go get golang.org/x/sys/unix - - go get golang.org/x/sys/windows - script: - - go test -race -v -tags appengine ./... - - go: 1.11.x - env: GO111MODULE=on - install: - - go mod download - script: - - go test -race -v -tags appengine ./... - - go: 1.11.x - env: GO111MODULE=off - install: - - go get github.com/stretchr/testify/assert - - go get golang.org/x/crypto/ssh/terminal - - go get golang.org/x/sys/unix - - go get golang.org/x/sys/windows - script: - - go test -race -v -tags appengine ./... + exclude: + - env: GO111MODULE=on + go: 1.10.x +install: + - if [[ "$GO111MODULE" == "on" ]]; then go mod download; fi + - if [[ "$GO111MODULE" == "off" ]]; then go get github.com/stretchr/testify/assert golang.org/x/sys/unix github.com/konsorten/go-windows-terminal-sequences; fi +script: + - export GOMAXPROCS=4 + - export GORACE=halt_on_error=1 + - go test -race -v ./... + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then go test -race -v -tags appengine ./... ; fi diff --git a/vendor/github.com/Sirupsen/logrus/CHANGELOG.md b/vendor/github.com/Sirupsen/logrus/CHANGELOG.md index 9978b415a..f62cbd24a 100644 --- a/vendor/github.com/Sirupsen/logrus/CHANGELOG.md +++ b/vendor/github.com/Sirupsen/logrus/CHANGELOG.md @@ -1,3 +1,11 @@ +# 1.4.1 +This new release introduces: + * Enhance TextFormatter to not print caller information when they are empty (#944) + * Remove dependency on golang.org/x/crypto (#932, #943) + +Fixes: + * Fix Entry.WithContext method to return a copy of the initial entry (#941) + # 1.4.0 This new release introduces: * Add `DeferExitHandler`, similar to `RegisterExitHandler` but prepending the handler to the list of handlers (semantically like `defer`) (#848). diff --git a/vendor/github.com/Sirupsen/logrus/entry.go b/vendor/github.com/Sirupsen/logrus/entry.go index 3d2c9e0fb..63e25583c 100644 --- a/vendor/github.com/Sirupsen/logrus/entry.go +++ b/vendor/github.com/Sirupsen/logrus/entry.go @@ -103,8 +103,7 @@ func (entry *Entry) WithError(err error) *Entry { // Add a context to the Entry. func (entry *Entry) WithContext(ctx context.Context) *Entry { - entry.Context = ctx - return entry + return &Entry{Logger: entry.Logger, Data: entry.Data, Time: entry.Time, err: entry.err, Context: ctx} } // Add a single field to the Entry. diff --git a/vendor/github.com/Sirupsen/logrus/go.mod b/vendor/github.com/Sirupsen/logrus/go.mod index 94574cc63..8261a2b3a 100644 --- a/vendor/github.com/Sirupsen/logrus/go.mod +++ b/vendor/github.com/Sirupsen/logrus/go.mod @@ -6,6 +6,5 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/objx v0.1.1 // indirect github.com/stretchr/testify v1.2.2 - golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 ) diff --git a/vendor/github.com/Sirupsen/logrus/go.sum b/vendor/github.com/Sirupsen/logrus/go.sum index 133d34ae1..2d787be60 100644 --- a/vendor/github.com/Sirupsen/logrus/go.sum +++ b/vendor/github.com/Sirupsen/logrus/go.sum @@ -9,7 +9,5 @@ github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 h1:u+LnwYTOOW7Ukr/fppxEb1Nwz0AtPflrblfvUudpo+I= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/Sirupsen/logrus/terminal_check_aix.go b/vendor/github.com/Sirupsen/logrus/terminal_check_aix.go deleted file mode 100644 index 04fdb7ba3..000000000 --- a/vendor/github.com/Sirupsen/logrus/terminal_check_aix.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build !appengine,!js,!windows,aix - -package logrus - -import "io" - -func checkIfTerminal(w io.Writer) bool { - return false -} diff --git a/vendor/github.com/Sirupsen/logrus/terminal_check_bsd.go b/vendor/github.com/Sirupsen/logrus/terminal_check_bsd.go new file mode 100644 index 000000000..3c4f43f91 --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/terminal_check_bsd.go @@ -0,0 +1,13 @@ +// +build darwin dragonfly freebsd netbsd openbsd + +package logrus + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TIOCGETA + +func isTerminal(fd int) bool { + _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + return err == nil +} + diff --git a/vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go index d46556509..7be2d87c5 100644 --- a/vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go +++ b/vendor/github.com/Sirupsen/logrus/terminal_check_notappengine.go @@ -1,18 +1,16 @@ -// +build !appengine,!js,!windows,!aix +// +build !appengine,!js,!windows package logrus import ( "io" "os" - - "golang.org/x/crypto/ssh/terminal" ) func checkIfTerminal(w io.Writer) bool { switch v := w.(type) { case *os.File: - return terminal.IsTerminal(int(v.Fd())) + return isTerminal(int(v.Fd())) default: return false } diff --git a/vendor/github.com/Sirupsen/logrus/terminal_check_solaris.go b/vendor/github.com/Sirupsen/logrus/terminal_check_solaris.go new file mode 100644 index 000000000..f6710b3bd --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/terminal_check_solaris.go @@ -0,0 +1,11 @@ +package logrus + +import ( + "golang.org/x/sys/unix" +) + +// IsTerminal returns true if the given file descriptor is a terminal. +func isTerminal(fd int) bool { + _, err := unix.IoctlGetTermio(fd, unix.TCGETA) + return err == nil +} diff --git a/vendor/github.com/Sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/Sirupsen/logrus/terminal_check_unix.go new file mode 100644 index 000000000..355dc966f --- /dev/null +++ b/vendor/github.com/Sirupsen/logrus/terminal_check_unix.go @@ -0,0 +1,13 @@ +// +build linux aix + +package logrus + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TCGETS + +func isTerminal(fd int) bool { + _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + return err == nil +} + diff --git a/vendor/github.com/Sirupsen/logrus/text_formatter.go b/vendor/github.com/Sirupsen/logrus/text_formatter.go index b3b1a30ca..1569161eb 100644 --- a/vendor/github.com/Sirupsen/logrus/text_formatter.go +++ b/vendor/github.com/Sirupsen/logrus/text_formatter.go @@ -73,9 +73,9 @@ type TextFormatter struct { FieldMap FieldMap // CallerPrettyfier can be set by the user to modify the content - // of the function and file keys in the json data when ReportCaller is + // of the function and file keys in the data when ReportCaller is // activated. If any of the returned value is the empty string the - // corresponding key will be removed from json fields. + // corresponding key will be removed from fields. CallerPrettyfier func(*runtime.Frame) (function string, file string) terminalInitOnce sync.Once @@ -133,14 +133,19 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLogrusError)) } if entry.HasCaller() { - fixedKeys = append(fixedKeys, - f.FieldMap.resolve(FieldKeyFunc), f.FieldMap.resolve(FieldKeyFile)) if f.CallerPrettyfier != nil { funcVal, fileVal = f.CallerPrettyfier(entry.Caller) } else { funcVal = entry.Caller.Function fileVal = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) } + + if funcVal != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFunc)) + } + if fileVal != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFile)) + } } if !f.DisableSorting { @@ -225,7 +230,6 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin entry.Message = strings.TrimSuffix(entry.Message, "\n") caller := "" - if entry.HasCaller() { funcVal := fmt.Sprintf("%s()", entry.Caller.Function) fileVal := fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) @@ -233,7 +237,14 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin if f.CallerPrettyfier != nil { funcVal, fileVal = f.CallerPrettyfier(entry.Caller) } - caller = fileVal + " " + funcVal + + if fileVal == "" { + caller = funcVal + } else if funcVal == "" { + caller = fileVal + } else { + caller = fileVal + " " + funcVal + } } if f.DisableTimestamp { diff --git a/vendor/github.com/bitrise-io/envman/Gopkg.lock b/vendor/github.com/bitrise-io/envman/Gopkg.lock index 72afa19c6..ae6859d4c 100644 --- a/vendor/github.com/bitrise-io/envman/Gopkg.lock +++ b/vendor/github.com/bitrise-io/envman/Gopkg.lock @@ -3,11 +3,11 @@ [[projects]] branch = "master" - digest = "1:e4c72127d910a96daf869a44f3dd563b86dbe6931a172863a0e99c5ff04b59e4" + digest = "1:cabe9ec8289704e71e45138c18ad90275bce25a8d61145c4130b55d9d9a6d6dc" name = "github.com/Sirupsen/logrus" packages = ["."] pruneopts = "UT" - revision = "dae0fa8d5b0c810a8ab733fbd5510c7cae84eca4" + revision = "9b3cdde74fbe9443d704467498a7dcb61a79de9b" [[projects]] branch = "master" @@ -77,30 +77,19 @@ [[projects]] branch = "master" - digest = "1:058e9504b9a79bfe86092974d05bb3298d2aa0c312d266d43148de289a5065d9" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - pruneopts = "UT" - revision = "a1f597ede03a7bef967a422b5b3a5bd08805a01e" - -[[projects]] - branch = "master" - digest = "1:944736317d4f2fb1c1015ef9ca05fd9313b4e19f1128901cc678f636435fa9b0" + digest = "1:cf353a5a9ffb2d6f850e9c773e25388a425a70c270546480427ed069e87b136a" name = "golang.org/x/sys" - packages = [ - "unix", - "windows", - ] + packages = ["unix"] pruneopts = "UT" - revision = "fead79001313d15903fb4605b4a1b781532cd93e" + revision = "4b34438f7a67ee5f45cc6132e2bad873a20324e9" [[projects]] branch = "v2" - digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" + digest = "1:2d56cd111a870bdf3ee37601877effe1fc79b8983645c147846f4769b6eb7051" name = "gopkg.in/yaml.v2" packages = ["."] pruneopts = "UT" - revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" + revision = "7b8349ac747c6a24702b762d2c4fd9266cf4f1d6" [solve-meta] analyzer-name = "dep" diff --git a/vendor/github.com/bitrise-io/envman/gows.yml b/vendor/github.com/bitrise-io/envman/gows.yml deleted file mode 100644 index 7fd863247..000000000 --- a/vendor/github.com/bitrise-io/envman/gows.yml +++ /dev/null @@ -1 +0,0 @@ -package_name: github.com/bitrise-io/envman diff --git a/vendor/github.com/bitrise-io/envman/version/version.go b/vendor/github.com/bitrise-io/envman/version/version.go index c243db154..f5dde3cd9 100644 --- a/vendor/github.com/bitrise-io/envman/version/version.go +++ b/vendor/github.com/bitrise-io/envman/version/version.go @@ -1,4 +1,4 @@ package version // VERSION ... -const VERSION = "2.2.1" +const VERSION = "2.2.2" diff --git a/vendor/github.com/bitrise-tools/gows/.gitignore b/vendor/github.com/bitrise-io/gows/.gitignore similarity index 100% rename from vendor/github.com/bitrise-tools/gows/.gitignore rename to vendor/github.com/bitrise-io/gows/.gitignore diff --git a/vendor/github.com/bitrise-tools/gows/Gopkg.lock b/vendor/github.com/bitrise-io/gows/Gopkg.lock similarity index 100% rename from vendor/github.com/bitrise-tools/gows/Gopkg.lock rename to vendor/github.com/bitrise-io/gows/Gopkg.lock diff --git a/vendor/github.com/bitrise-tools/gows/Gopkg.toml b/vendor/github.com/bitrise-io/gows/Gopkg.toml similarity index 100% rename from vendor/github.com/bitrise-tools/gows/Gopkg.toml rename to vendor/github.com/bitrise-io/gows/Gopkg.toml diff --git a/vendor/github.com/bitrise-tools/gows/LICENSE b/vendor/github.com/bitrise-io/gows/LICENSE similarity index 100% rename from vendor/github.com/bitrise-tools/gows/LICENSE rename to vendor/github.com/bitrise-io/gows/LICENSE diff --git a/vendor/github.com/bitrise-tools/gows/README.md b/vendor/github.com/bitrise-io/gows/README.md similarity index 100% rename from vendor/github.com/bitrise-tools/gows/README.md rename to vendor/github.com/bitrise-io/gows/README.md diff --git a/vendor/github.com/bitrise-tools/gows/bitrise.yml b/vendor/github.com/bitrise-io/gows/bitrise.yml similarity index 100% rename from vendor/github.com/bitrise-tools/gows/bitrise.yml rename to vendor/github.com/bitrise-io/gows/bitrise.yml diff --git a/vendor/github.com/bitrise-tools/gows/cmd/clear.go b/vendor/github.com/bitrise-io/gows/cmd/clear.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/clear.go rename to vendor/github.com/bitrise-io/gows/cmd/clear.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/common.go b/vendor/github.com/bitrise-io/gows/cmd/common.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/common.go rename to vendor/github.com/bitrise-io/gows/cmd/common.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/common_test.go b/vendor/github.com/bitrise-io/gows/cmd/common_test.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/common_test.go rename to vendor/github.com/bitrise-io/gows/cmd/common_test.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/init.go b/vendor/github.com/bitrise-io/gows/cmd/init.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/init.go rename to vendor/github.com/bitrise-io/gows/cmd/init.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/init_test.go b/vendor/github.com/bitrise-io/gows/cmd/init_test.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/init_test.go rename to vendor/github.com/bitrise-io/gows/cmd/init_test.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/root.go b/vendor/github.com/bitrise-io/gows/cmd/root.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/root.go rename to vendor/github.com/bitrise-io/gows/cmd/root.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/version.go b/vendor/github.com/bitrise-io/gows/cmd/version.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/version.go rename to vendor/github.com/bitrise-io/gows/cmd/version.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/workspaces.go b/vendor/github.com/bitrise-io/gows/cmd/workspaces.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/workspaces.go rename to vendor/github.com/bitrise-io/gows/cmd/workspaces.go diff --git a/vendor/github.com/bitrise-tools/gows/cmd/wspath.go b/vendor/github.com/bitrise-io/gows/cmd/wspath.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/cmd/wspath.go rename to vendor/github.com/bitrise-io/gows/cmd/wspath.go diff --git a/vendor/github.com/bitrise-tools/gows/config/gows.go b/vendor/github.com/bitrise-io/gows/config/gows.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/config/gows.go rename to vendor/github.com/bitrise-io/gows/config/gows.go diff --git a/vendor/github.com/bitrise-tools/gows/config/gows_test.go b/vendor/github.com/bitrise-io/gows/config/gows_test.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/config/gows_test.go rename to vendor/github.com/bitrise-io/gows/config/gows_test.go diff --git a/vendor/github.com/bitrise-tools/gows/config/project.go b/vendor/github.com/bitrise-io/gows/config/project.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/config/project.go rename to vendor/github.com/bitrise-io/gows/config/project.go diff --git a/vendor/github.com/bitrise-tools/gows/config/project_test.go b/vendor/github.com/bitrise-io/gows/config/project_test.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/config/project_test.go rename to vendor/github.com/bitrise-io/gows/config/project_test.go diff --git a/vendor/github.com/bitrise-tools/gows/config/user.go b/vendor/github.com/bitrise-io/gows/config/user.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/config/user.go rename to vendor/github.com/bitrise-io/gows/config/user.go diff --git a/vendor/github.com/bitrise-tools/gows/config/user_test.go b/vendor/github.com/bitrise-io/gows/config/user_test.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/config/user_test.go rename to vendor/github.com/bitrise-io/gows/config/user_test.go diff --git a/vendor/github.com/bitrise-tools/gows/goutil/goutil.go b/vendor/github.com/bitrise-io/gows/goutil/goutil.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/goutil/goutil.go rename to vendor/github.com/bitrise-io/gows/goutil/goutil.go diff --git a/vendor/github.com/bitrise-tools/gows/goutil/goutil_test.go b/vendor/github.com/bitrise-io/gows/goutil/goutil_test.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/goutil/goutil_test.go rename to vendor/github.com/bitrise-io/gows/goutil/goutil_test.go diff --git a/vendor/github.com/bitrise-tools/gows/gows.yml b/vendor/github.com/bitrise-io/gows/gows.yml similarity index 100% rename from vendor/github.com/bitrise-tools/gows/gows.yml rename to vendor/github.com/bitrise-io/gows/gows.yml diff --git a/vendor/github.com/bitrise-tools/gows/gows/gows.go b/vendor/github.com/bitrise-io/gows/gows/gows.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/gows/gows.go rename to vendor/github.com/bitrise-io/gows/gows/gows.go diff --git a/vendor/github.com/bitrise-tools/gows/gows/gows_test.go b/vendor/github.com/bitrise-io/gows/gows/gows_test.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/gows/gows_test.go rename to vendor/github.com/bitrise-io/gows/gows/gows_test.go diff --git a/vendor/github.com/bitrise-tools/gows/main.go b/vendor/github.com/bitrise-io/gows/main.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/main.go rename to vendor/github.com/bitrise-io/gows/main.go diff --git a/vendor/github.com/bitrise-tools/gows/version/version.go b/vendor/github.com/bitrise-io/gows/version/version.go similarity index 100% rename from vendor/github.com/bitrise-tools/gows/version/version.go rename to vendor/github.com/bitrise-io/gows/version/version.go diff --git a/vendor/github.com/bitrise-io/stepman/Gopkg.lock b/vendor/github.com/bitrise-io/stepman/Gopkg.lock index 3a79ab94f..79eed4a0e 100644 --- a/vendor/github.com/bitrise-io/stepman/Gopkg.lock +++ b/vendor/github.com/bitrise-io/stepman/Gopkg.lock @@ -3,11 +3,19 @@ [[projects]] branch = "master" - digest = "1:e4c72127d910a96daf869a44f3dd563b86dbe6931a172863a0e99c5ff04b59e4" + digest = "1:cabe9ec8289704e71e45138c18ad90275bce25a8d61145c4130b55d9d9a6d6dc" name = "github.com/Sirupsen/logrus" packages = ["."] pruneopts = "UT" - revision = "dae0fa8d5b0c810a8ab733fbd5510c7cae84eca4" + revision = "9b3cdde74fbe9443d704467498a7dcb61a79de9b" + +[[projects]] + branch = "master" + digest = "1:eda2296387e3dae410b4ceb25e4db754d6bb552666584ef93ca1d98aa12920df" + name = "github.com/bitrise-io/colorstring" + packages = ["."] + pruneopts = "UT" + revision = "a8cd701151924e6beffb74a34a556b320e0cfcf7" [[projects]] branch = "master" @@ -15,7 +23,7 @@ name = "github.com/bitrise-io/envman" packages = ["models"] pruneopts = "UT" - revision = "12f91a1a8324162e408416161b6919306402d979" + revision = "c6683c3e097216a80eb72092bf857c8a9591195e" [[projects]] branch = "master" @@ -47,14 +55,6 @@ pruneopts = "UT" revision = "f451b19ba4d087d8272d411ad91af5f4218fd517" -[[projects]] - branch = "master" - digest = "1:eda2296387e3dae410b4ceb25e4db754d6bb552666584ef93ca1d98aa12920df" - name = "github.com/bitrise-tools/colorstring" - packages = ["."] - pruneopts = "UT" - revision = "a8cd701151924e6beffb74a34a556b320e0cfcf7" - [[projects]] digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" @@ -100,36 +100,26 @@ [[projects]] branch = "master" - digest = "1:058e9504b9a79bfe86092974d05bb3298d2aa0c312d266d43148de289a5065d9" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - pruneopts = "UT" - revision = "a1f597ede03a7bef967a422b5b3a5bd08805a01e" - -[[projects]] - branch = "master" - digest = "1:944736317d4f2fb1c1015ef9ca05fd9313b4e19f1128901cc678f636435fa9b0" + digest = "1:cf353a5a9ffb2d6f850e9c773e25388a425a70c270546480427ed069e87b136a" name = "golang.org/x/sys" - packages = [ - "unix", - "windows", - ] + packages = ["unix"] pruneopts = "UT" - revision = "fead79001313d15903fb4605b4a1b781532cd93e" + revision = "4b34438f7a67ee5f45cc6132e2bad873a20324e9" [[projects]] branch = "v2" - digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" + digest = "1:2d56cd111a870bdf3ee37601877effe1fc79b8983645c147846f4769b6eb7051" name = "gopkg.in/yaml.v2" packages = ["."] pruneopts = "UT" - revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" + revision = "7b8349ac747c6a24702b762d2c4fd9266cf4f1d6" [solve-meta] analyzer-name = "dep" analyzer-version = 1 input-imports = [ "github.com/Sirupsen/logrus", + "github.com/bitrise-io/colorstring", "github.com/bitrise-io/envman/models", "github.com/bitrise-io/go-utils/colorstring", "github.com/bitrise-io/go-utils/command", @@ -143,7 +133,6 @@ "github.com/bitrise-io/go-utils/urlutil", "github.com/bitrise-io/go-utils/versions", "github.com/bitrise-io/goinp/goinp", - "github.com/bitrise-tools/colorstring", "github.com/stretchr/testify/require", "github.com/urfave/cli", "gopkg.in/yaml.v2", diff --git a/vendor/github.com/bitrise-io/stepman/_tests/integration/version_test.go b/vendor/github.com/bitrise-io/stepman/_tests/integration/version_test.go index 698407dbe..a1d49ed05 100644 --- a/vendor/github.com/bitrise-io/stepman/_tests/integration/version_test.go +++ b/vendor/github.com/bitrise-io/stepman/_tests/integration/version_test.go @@ -14,7 +14,7 @@ func Test_VersionOutput(t *testing.T) { { out, err := command.RunCommandAndReturnCombinedStdoutAndStderr(binPath(), "version") require.NoError(t, err, out) - require.Equal(t, "0.11.2", out) + require.Equal(t, "0.11.3", out) } t.Log("Version --full") @@ -23,7 +23,7 @@ func Test_VersionOutput(t *testing.T) { require.NoError(t, err, out) expectedOSVersion := fmt.Sprintf("%s (%s)", runtime.GOOS, runtime.GOARCH) - expectedVersionOut := fmt.Sprintf(`version: 0.11.2 + expectedVersionOut := fmt.Sprintf(`version: 0.11.3 os: %s go: %s build_number: diff --git a/vendor/github.com/bitrise-io/stepman/bitrise.yml b/vendor/github.com/bitrise-io/stepman/bitrise.yml index e0c6e4123..efbcb3277 100644 --- a/vendor/github.com/bitrise-io/stepman/bitrise.yml +++ b/vendor/github.com/bitrise-io/stepman/bitrise.yml @@ -1,4 +1,4 @@ -format_version: "5" +format_version: "7" default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: other diff --git a/vendor/github.com/bitrise-io/stepman/cli/share.go b/vendor/github.com/bitrise-io/stepman/cli/share.go index 4f07daf2c..99ec5ca4a 100644 --- a/vendor/github.com/bitrise-io/stepman/cli/share.go +++ b/vendor/github.com/bitrise-io/stepman/cli/share.go @@ -6,12 +6,12 @@ import ( "fmt" "path" + "github.com/bitrise-io/colorstring" "github.com/bitrise-io/go-utils/command" "github.com/bitrise-io/go-utils/fileutil" "github.com/bitrise-io/go-utils/log" "github.com/bitrise-io/go-utils/pathutil" "github.com/bitrise-io/stepman/stepman" - "github.com/bitrise-tools/colorstring" "github.com/urfave/cli" ) diff --git a/vendor/github.com/bitrise-io/stepman/cli/share_audit.go b/vendor/github.com/bitrise-io/stepman/cli/share_audit.go index 74a6d4e65..84f009d10 100644 --- a/vendor/github.com/bitrise-io/stepman/cli/share_audit.go +++ b/vendor/github.com/bitrise-io/stepman/cli/share_audit.go @@ -3,9 +3,9 @@ package cli import ( "fmt" + "github.com/bitrise-io/colorstring" "github.com/bitrise-io/go-utils/log" "github.com/bitrise-io/stepman/stepman" - "github.com/bitrise-tools/colorstring" "github.com/urfave/cli" ) diff --git a/vendor/github.com/bitrise-io/stepman/cli/share_finish.go b/vendor/github.com/bitrise-io/stepman/cli/share_finish.go index 4ab2bc967..d98bb2863 100644 --- a/vendor/github.com/bitrise-io/stepman/cli/share_finish.go +++ b/vendor/github.com/bitrise-io/stepman/cli/share_finish.go @@ -3,10 +3,10 @@ package cli import ( "fmt" + "github.com/bitrise-io/colorstring" "github.com/bitrise-io/go-utils/command/git" "github.com/bitrise-io/go-utils/log" "github.com/bitrise-io/stepman/stepman" - "github.com/bitrise-tools/colorstring" "github.com/urfave/cli" ) diff --git a/vendor/github.com/bitrise-io/stepman/gows.yml b/vendor/github.com/bitrise-io/stepman/gows.yml deleted file mode 100644 index 58b5ed7d2..000000000 --- a/vendor/github.com/bitrise-io/stepman/gows.yml +++ /dev/null @@ -1 +0,0 @@ -package_name: github.com/bitrise-io/stepman diff --git a/vendor/github.com/bitrise-io/stepman/version/version.go b/vendor/github.com/bitrise-io/stepman/version/version.go index db8b9cf04..59ba36630 100644 --- a/vendor/github.com/bitrise-io/stepman/version/version.go +++ b/vendor/github.com/bitrise-io/stepman/version/version.go @@ -1,4 +1,4 @@ package version // VERSION ... -const VERSION = "0.11.2" +const VERSION = "0.11.3" diff --git a/vendor/golang.org/x/crypto/go.mod b/vendor/golang.org/x/crypto/go.mod index 3a8a43e5f..d2b06cac5 100644 --- a/vendor/golang.org/x/crypto/go.mod +++ b/vendor/golang.org/x/crypto/go.mod @@ -1,3 +1,3 @@ module golang.org/x/crypto -require golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a +require golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e diff --git a/vendor/golang.org/x/crypto/go.sum b/vendor/golang.org/x/crypto/go.sum index 193685177..be205598d 100644 --- a/vendor/golang.org/x/crypto/go.sum +++ b/vendor/golang.org/x/crypto/go.sum @@ -1,2 +1,2 @@ -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e h1:nFYrTHrdrAOpShe27kaFHjsqYSEQ0KWqdWLu3xuZJts= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go index f9269c384..656e8df94 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go @@ -6,10 +6,9 @@ package salsa -// This function is implemented in salsa2020_amd64.s. - //go:noescape +// salsa2020XORKeyStream is implemented in salsa20_amd64.s. func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) // XORKeyStream crypts bytes from in to out using the given key and counters. diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s similarity index 99% rename from vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s rename to vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s index 22afbdcad..18085d2e8 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s @@ -99,30 +99,24 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment MOVL 36 (SP),CX MOVL DX,288(SP) MOVL CX,304(SP) - ADDQ $1,DX SHLQ $32,CX ADDQ CX,DX + ADDQ $1,DX MOVQ DX,CX SHRQ $32,CX MOVL DX, 292 (SP) MOVL CX, 308 (SP) ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX MOVQ DX,CX SHRQ $32,CX MOVL DX, 296 (SP) MOVL CX, 312 (SP) ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX MOVQ DX,CX SHRQ $32,CX MOVL DX, 300 (SP) MOVL CX, 316 (SP) ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX MOVQ DX,CX SHRQ $32,CX MOVL DX,16(SP) diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64_test.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64_test.go new file mode 100644 index 000000000..d4e779cd0 --- /dev/null +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64_test.go @@ -0,0 +1,31 @@ +// Copyright 2019 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. + +// +build amd64,!appengine,!gccgo + +package salsa + +import ( + "bytes" + "testing" +) + +func TestCounterOverflow(t *testing.T) { + in := make([]byte, 4096) + key := &[32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2} + for n, counter := range []*[16]byte{ + &[16]byte{0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0}, // zero counter + &[16]byte{0, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff}, // counter about to overflow 32 bits + &[16]byte{0, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 0xff, 0xff, 0xff, 0xff}, // counter above 32 bits + } { + out := make([]byte, 4096) + XORKeyStream(out, in, counter, key) + outGeneric := make([]byte, 4096) + genericXORKeyStream(outGeneric, in, counter, key) + if !bytes.Equal(out, outGeneric) { + t.Errorf("%d: assembly and go implementations disagree", n) + } + } +} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go new file mode 100644 index 000000000..8a46bd2b3 --- /dev/null +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go @@ -0,0 +1,14 @@ +// Copyright 2019 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. + +// +build !amd64 appengine gccgo + +package salsa + +// XORKeyStream crypts bytes from in to out using the given key and counters. +// In and out must overlap entirely or not at all. Counter +// contains the raw salsa20 counter bytes (both nonce and block counter). +func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { + genericXORKeyStream(out, in, counter, key) +} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go index 22126d17c..68169c6d6 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64 appengine gccgo - package salsa const rounds = 20 @@ -202,10 +200,9 @@ func core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) { out[63] = byte(x15 >> 24) } -// XORKeyStream crypts bytes from in to out using the given key and counters. -// In and out must overlap entirely or not at all. Counter -// contains the raw salsa20 counter bytes (both nonce and block counter). -func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { +// genericXORKeyStream is the generic implementation of XORKeyStream to be used +// when no assembly implementation is available. +func genericXORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { var block [64]byte var counterCopy [16]byte copy(counterCopy[:], counter[:]) diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go index 9d666ffcf..2f04ee5b5 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go @@ -7,6 +7,7 @@ package terminal import ( "bytes" "io" + "strconv" "sync" "unicode/utf8" ) @@ -271,34 +272,44 @@ func (t *Terminal) moveCursorToPos(pos int) { } func (t *Terminal) move(up, down, left, right int) { - movement := make([]rune, 3*(up+down+left+right)) - m := movement - for i := 0; i < up; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'A' - m = m[3:] - } - for i := 0; i < down; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'B' - m = m[3:] - } - for i := 0; i < left; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'D' - m = m[3:] - } - for i := 0; i < right; i++ { - m[0] = keyEscape - m[1] = '[' - m[2] = 'C' - m = m[3:] - } - - t.queue(movement) + m := []rune{} + + // 1 unit up can be expressed as ^[[A or ^[A + // 5 units up can be expressed as ^[[5A + + if up == 1 { + m = append(m, keyEscape, '[', 'A') + } else if up > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(up))...) + m = append(m, 'A') + } + + if down == 1 { + m = append(m, keyEscape, '[', 'B') + } else if down > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(down))...) + m = append(m, 'B') + } + + if right == 1 { + m = append(m, keyEscape, '[', 'C') + } else if right > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(right))...) + m = append(m, 'C') + } + + if left == 1 { + m = append(m, keyEscape, '[', 'D') + } else if left > 1 { + m = append(m, keyEscape, '[') + m = append(m, []rune(strconv.Itoa(left))...) + m = append(m, 'D') + } + + t.queue(m) } func (t *Terminal) clearLineToRight() { diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go index 3ae911616..4e7a0c658 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go @@ -237,6 +237,49 @@ func TestKeyPresses(t *testing.T) { } } +var renderTests = []struct { + in string + received string + err error +}{ + { + // Cursor move after keyHome (left 4) then enter (right 4, newline) + in: "abcd\x1b[H\r", + received: "> abcd\x1b[4D\x1b[4C\r\n", + }, + { + // Write, home, prepend, enter. Prepends rewrites the line. + in: "cdef\x1b[Hab\r", + received: "> cdef" + // Initial input + "\x1b[4Da" + // Move cursor back, insert first char + "cdef" + // Copy over original string + "\x1b[4Dbcdef" + // Repeat for second char with copy + "\x1b[4D" + // Put cursor back in position to insert again + "\x1b[4C\r\n", // Put cursor at the end of the line and newline. + }, +} + +func TestRender(t *testing.T) { + for i, test := range renderTests { + for j := 1; j < len(test.in); j++ { + c := &MockTerminal{ + toSend: []byte(test.in), + bytesPerRead: j, + } + ss := NewTerminal(c, "> ") + _, err := ss.ReadLine() + if err != test.err { + t.Errorf("Error resulting from test %d (%d bytes per read) was '%v', expected '%v'", i, j, err, test.err) + break + } + if test.received != string(c.received) { + t.Errorf("Results rendered from test %d (%d bytes per read) was '%s', expected '%s'", i, j, c.received, test.received) + break + } + } + } +} + func TestPasswordNotSaved(t *testing.T) { c := &MockTerminal{ toSend: []byte("password\r\x1b[A\r"), diff --git a/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go b/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go index 091e48cc1..a0eba3869 100644 --- a/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go +++ b/vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !windows +// +build !windows,!solaris,!aix package test diff --git a/vendor/golang.org/x/crypto/ssh/test/session_test.go b/vendor/golang.org/x/crypto/ssh/test/session_test.go index 4eb7afde8..7de7d14ab 100644 --- a/vendor/golang.org/x/crypto/ssh/test/session_test.go +++ b/vendor/golang.org/x/crypto/ssh/test/session_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !windows +// +build !windows,!solaris,!aix package test diff --git a/vendor/golang.org/x/sys/unix/mksyscall.go b/vendor/golang.org/x/sys/unix/mksyscall.go index bed93d489..e4af9424e 100644 --- a/vendor/golang.org/x/sys/unix/mksyscall.go +++ b/vendor/golang.org/x/sys/unix/mksyscall.go @@ -153,6 +153,11 @@ func main() { } funct, inps, outps, sysname := f[2], f[3], f[4], f[5] + // ClockGettime doesn't have a syscall number on Darwin, only generate libc wrappers. + if goos == "darwin" && !libc && funct == "ClockGettime" { + continue + } + // Split argument lists on comma. in := parseParamList(inps) out := parseParamList(outps) diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index a2e368882..212009189 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -144,6 +144,23 @@ func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) ( //sys getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) +func SysctlClockinfo(name string) (*Clockinfo, error) { + mib, err := sysctlmib(name) + if err != nil { + return nil, err + } + + n := uintptr(SizeofClockinfo) + var ci Clockinfo + if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { + return nil, err + } + if n != SizeofClockinfo { + return nil, EIO + } + return &ci, nil +} + //sysnb pipe() (r int, w int, err error) func Pipe(p []int) (err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_test.go b/vendor/golang.org/x/sys/unix/syscall_darwin_test.go index 7faa295fc..a8a5d4e19 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_test.go @@ -61,3 +61,12 @@ func TestUtimesNanoAt(t *testing.T) { t.Errorf("UtimesNanoAt: wrong mtime: got %v, expected %v", st.Mtimespec, expected) } } + +func TestSysctlClockinfo(t *testing.T) { + ci, err := unix.SysctlClockinfo("kern.clockrate") + if err != nil { + t.Fatal(err) + } + t.Logf("tick = %v, tickadj = %v, hz = %v, profhz = %v, stathz = %v", + ci.Tick, ci.Tickadj, ci.Hz, ci.Profhz, ci.Stathz) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 687999549..c8648ec02 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -43,6 +43,23 @@ func nametomib(name string) (mib []_C_int, err error) { return nil, EINVAL } +func SysctlClockinfo(name string) (*Clockinfo, error) { + mib, err := sysctlmib(name) + if err != nil { + return nil, err + } + + n := uintptr(SizeofClockinfo) + var ci Clockinfo + if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { + return nil, err + } + if n != SizeofClockinfo { + return nil, EIO + } + return &ci, nil +} + func SysctlUvmexp(name string) (*Uvmexp, error) { mib, err := sysctlmib(name) if err != nil { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go index b95f334e1..7bf75eede 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_test.go @@ -40,6 +40,15 @@ func TestPpoll(t *testing.T) { } } +func TestSysctlClockinfo(t *testing.T) { + ci, err := unix.SysctlClockinfo("kern.clockrate") + if err != nil { + t.Fatal(err) + } + t.Logf("tick = %v, tickadj = %v, hz = %v, profhz = %v, stathz = %v", + ci.Tick, ci.Tickadj, ci.Hz, ci.Profhz, ci.Stathz) +} + func TestSysctlUvmexp(t *testing.T) { uvm, err := unix.SysctlUvmexp("vm.uvmexp") if err != nil { diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index ae59fba0c..3de37566c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -294,6 +294,13 @@ func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) { return &tv, err } +func GetsockoptUint64(fd, level, opt int) (value uint64, err error) { + var n uint64 + vallen := _Socklen(8) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return n, err +} + func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny @@ -344,13 +351,21 @@ func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) { } func SetsockoptString(fd, level, opt int, s string) (err error) { - return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s))) + var p unsafe.Pointer + if len(s) > 0 { + p = unsafe.Pointer(&[]byte(s)[0]) + } + return setsockopt(fd, level, opt, p, uintptr(len(s))) } func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) { return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv)) } +func SetsockoptUint64(fd, level, opt int, value uint64) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8) +} + func Socket(domain, typ, proto int) (fd int, err error) { if domain == AF_INET6 && SocketDisableIPv6 { return -1, EAFNOSUPPORT diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_test.go b/vendor/golang.org/x/sys/unix/syscall_unix_test.go index 264305f2c..14d25ca7d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_test.go @@ -403,6 +403,14 @@ func TestSeekFailure(t *testing.T) { } } +func TestSetsockoptString(t *testing.T) { + // should not panic on empty string, see issue #31277 + err := unix.SetsockoptString(-1, 0, 0, "") + if err == nil { + t.Fatalf("SetsockoptString: did not fail") + } +} + func TestDup(t *testing.T) { file, err := ioutil.TempFile("", "TestDup") if err != nil { diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go index 9fd2aaa6a..155c2e692 100644 --- a/vendor/golang.org/x/sys/unix/types_darwin.go +++ b/vendor/golang.org/x/sys/unix/types_darwin.go @@ -275,3 +275,9 @@ const ( // uname type Utsname C.struct_utsname + +// Clockinfo + +const SizeofClockinfo = C.sizeof_struct_clockinfo + +type Clockinfo C.struct_clockinfo diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go index 4e5e57f9a..8aafbe446 100644 --- a/vendor/golang.org/x/sys/unix/types_openbsd.go +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go @@ -274,3 +274,9 @@ type Utsname C.struct_utsname const SizeofUvmexp = C.sizeof_struct_uvmexp type Uvmexp C.struct_uvmexp + +// Clockinfo + +const SizeofClockinfo = C.sizeof_struct_clockinfo + +type Clockinfo C.struct_clockinfo diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go index 2aeb52a88..cefe2f8ea 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go @@ -487,3 +487,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 0d0d9f2cc..c6bb883c3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -497,3 +497,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go index 04e344b78..94c23bc2d 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go @@ -488,3 +488,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 9fec185c1..c82a930cd 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -497,3 +497,13 @@ type Utsname struct { Version [256]byte Machine [256]byte } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index 8b37d8399..900fb4462 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -558,3 +558,13 @@ type Uvmexp struct { Fpswtch int32 Kmapent int32 } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index 6efea4635..028fa78d7 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -558,3 +558,13 @@ type Uvmexp struct { Fpswtch int32 Kmapent int32 } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go index 510efc3ea..b45d5eedf 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -559,3 +559,13 @@ type Uvmexp struct { Fpswtch int32 Kmapent int32 } + +const SizeofClockinfo = 0x14 + +type Clockinfo struct { + Hz int32 + Tick int32 + Tickadj int32 + Stathz int32 + Profhz int32 +} diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index f5f2d8bd6..da06406c4 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -169,6 +169,7 @@ const ( //sys GetLengthSid(sid *SID) (len uint32) = advapi32.GetLengthSid //sys CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) = advapi32.CopySid //sys AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) = advapi32.AllocateAndInitializeSid +//sys createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) = advapi32.CreateWellKnownSid //sys FreeSid(sid *SID) (err error) [failretval!=0] = advapi32.FreeSid //sys EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) = advapi32.EqualSid @@ -286,6 +287,158 @@ func (sid *SID) LookupAccount(system string) (account, domain string, accType ui } } +// Various types of pre-specified sids that can be synthesized at runtime. +type WELL_KNOWN_SID_TYPE uint32 + +const ( + WinNullSid = 0 + WinWorldSid = 1 + WinLocalSid = 2 + WinCreatorOwnerSid = 3 + WinCreatorGroupSid = 4 + WinCreatorOwnerServerSid = 5 + WinCreatorGroupServerSid = 6 + WinNtAuthoritySid = 7 + WinDialupSid = 8 + WinNetworkSid = 9 + WinBatchSid = 10 + WinInteractiveSid = 11 + WinServiceSid = 12 + WinAnonymousSid = 13 + WinProxySid = 14 + WinEnterpriseControllersSid = 15 + WinSelfSid = 16 + WinAuthenticatedUserSid = 17 + WinRestrictedCodeSid = 18 + WinTerminalServerSid = 19 + WinRemoteLogonIdSid = 20 + WinLogonIdsSid = 21 + WinLocalSystemSid = 22 + WinLocalServiceSid = 23 + WinNetworkServiceSid = 24 + WinBuiltinDomainSid = 25 + WinBuiltinAdministratorsSid = 26 + WinBuiltinUsersSid = 27 + WinBuiltinGuestsSid = 28 + WinBuiltinPowerUsersSid = 29 + WinBuiltinAccountOperatorsSid = 30 + WinBuiltinSystemOperatorsSid = 31 + WinBuiltinPrintOperatorsSid = 32 + WinBuiltinBackupOperatorsSid = 33 + WinBuiltinReplicatorSid = 34 + WinBuiltinPreWindows2000CompatibleAccessSid = 35 + WinBuiltinRemoteDesktopUsersSid = 36 + WinBuiltinNetworkConfigurationOperatorsSid = 37 + WinAccountAdministratorSid = 38 + WinAccountGuestSid = 39 + WinAccountKrbtgtSid = 40 + WinAccountDomainAdminsSid = 41 + WinAccountDomainUsersSid = 42 + WinAccountDomainGuestsSid = 43 + WinAccountComputersSid = 44 + WinAccountControllersSid = 45 + WinAccountCertAdminsSid = 46 + WinAccountSchemaAdminsSid = 47 + WinAccountEnterpriseAdminsSid = 48 + WinAccountPolicyAdminsSid = 49 + WinAccountRasAndIasServersSid = 50 + WinNTLMAuthenticationSid = 51 + WinDigestAuthenticationSid = 52 + WinSChannelAuthenticationSid = 53 + WinThisOrganizationSid = 54 + WinOtherOrganizationSid = 55 + WinBuiltinIncomingForestTrustBuildersSid = 56 + WinBuiltinPerfMonitoringUsersSid = 57 + WinBuiltinPerfLoggingUsersSid = 58 + WinBuiltinAuthorizationAccessSid = 59 + WinBuiltinTerminalServerLicenseServersSid = 60 + WinBuiltinDCOMUsersSid = 61 + WinBuiltinIUsersSid = 62 + WinIUserSid = 63 + WinBuiltinCryptoOperatorsSid = 64 + WinUntrustedLabelSid = 65 + WinLowLabelSid = 66 + WinMediumLabelSid = 67 + WinHighLabelSid = 68 + WinSystemLabelSid = 69 + WinWriteRestrictedCodeSid = 70 + WinCreatorOwnerRightsSid = 71 + WinCacheablePrincipalsGroupSid = 72 + WinNonCacheablePrincipalsGroupSid = 73 + WinEnterpriseReadonlyControllersSid = 74 + WinAccountReadonlyControllersSid = 75 + WinBuiltinEventLogReadersGroup = 76 + WinNewEnterpriseReadonlyControllersSid = 77 + WinBuiltinCertSvcDComAccessGroup = 78 + WinMediumPlusLabelSid = 79 + WinLocalLogonSid = 80 + WinConsoleLogonSid = 81 + WinThisOrganizationCertificateSid = 82 + WinApplicationPackageAuthoritySid = 83 + WinBuiltinAnyPackageSid = 84 + WinCapabilityInternetClientSid = 85 + WinCapabilityInternetClientServerSid = 86 + WinCapabilityPrivateNetworkClientServerSid = 87 + WinCapabilityPicturesLibrarySid = 88 + WinCapabilityVideosLibrarySid = 89 + WinCapabilityMusicLibrarySid = 90 + WinCapabilityDocumentsLibrarySid = 91 + WinCapabilitySharedUserCertificatesSid = 92 + WinCapabilityEnterpriseAuthenticationSid = 93 + WinCapabilityRemovableStorageSid = 94 + WinBuiltinRDSRemoteAccessServersSid = 95 + WinBuiltinRDSEndpointServersSid = 96 + WinBuiltinRDSManagementServersSid = 97 + WinUserModeDriversSid = 98 + WinBuiltinHyperVAdminsSid = 99 + WinAccountCloneableControllersSid = 100 + WinBuiltinAccessControlAssistanceOperatorsSid = 101 + WinBuiltinRemoteManagementUsersSid = 102 + WinAuthenticationAuthorityAssertedSid = 103 + WinAuthenticationServiceAssertedSid = 104 + WinLocalAccountSid = 105 + WinLocalAccountAndAdministratorSid = 106 + WinAccountProtectedUsersSid = 107 + WinCapabilityAppointmentsSid = 108 + WinCapabilityContactsSid = 109 + WinAccountDefaultSystemManagedSid = 110 + WinBuiltinDefaultSystemManagedGroupSid = 111 + WinBuiltinStorageReplicaAdminsSid = 112 + WinAccountKeyAdminsSid = 113 + WinAccountEnterpriseKeyAdminsSid = 114 + WinAuthenticationKeyTrustSid = 115 + WinAuthenticationKeyPropertyMFASid = 116 + WinAuthenticationKeyPropertyAttestationSid = 117 + WinAuthenticationFreshKeyAuthSid = 118 + WinBuiltinDeviceOwnersSid = 119 +) + +// Creates a sid for a well-known predefined alias, generally using the constants of the form +// Win*Sid, for the local machine. +func CreateWellKnownSid(sidType WELL_KNOWN_SID_TYPE) (*SID, error) { + return CreateWellKnownDomainSid(sidType, nil) +} + +// Creates a sid for a well-known predefined alias, generally using the constants of the form +// Win*Sid, for the domain specified by the domainSid parameter. +func CreateWellKnownDomainSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID) (*SID, error) { + n := uint32(50) + for { + b := make([]byte, n) + sid := (*SID)(unsafe.Pointer(&b[0])) + err := createWellKnownSid(sidType, domainSid, sid, &n) + if err == nil { + return sid, nil + } + if err != ERROR_INSUFFICIENT_BUFFER { + return nil, err + } + if n <= uint32(len(b)) { + return nil, err + } + } +} + const ( // do not reorder TOKEN_ASSIGN_PRIMARY = 1 << iota diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index f72fa55f3..7aff0d022 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -137,6 +137,7 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW //sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) //sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) +//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) //sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff] //sys CloseHandle(handle Handle) (err error) //sys GetStdHandle(stdhandle uint32) (handle Handle, err error) [failretval==InvalidHandle] diff --git a/vendor/golang.org/x/sys/windows/syscall_windows_test.go b/vendor/golang.org/x/sys/windows/syscall_windows_test.go index 539dda241..f2f449cdf 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows_test.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows_test.go @@ -90,3 +90,17 @@ func TestTOKEN_ALL_ACCESS(t *testing.T) { t.Errorf("TOKEN_ALL_ACCESS = %x, want 0xF01FF", windows.TOKEN_ALL_ACCESS) } } + +func TestCreateWellKnownSid(t *testing.T) { + sid, err := windows.CreateWellKnownSid(windows.WinBuiltinAdministratorsSid) + if err != nil { + t.Fatalf("Unable to create well known sid for administrators: %v", err) + } + sidStr, err := sid.String() + if err != nil { + t.Fatalf("Unable to convert sid into string: %v", err) + } + if sidStr != "S-1-5-32-544" { + t.Fatalf("Expecting administrators to be S-1-5-32-544, but found %s instead", sidStr) + } +} diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index 141ca81bd..bbf19f0dc 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -126,9 +126,19 @@ const ( OPEN_ALWAYS = 4 TRUNCATE_EXISTING = 5 - FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000 - FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 - FILE_FLAG_OVERLAPPED = 0x40000000 + FILE_FLAG_OPEN_REQUIRING_OPLOCK = 0x00040000 + FILE_FLAG_FIRST_PIPE_INSTANCE = 0x00080000 + FILE_FLAG_OPEN_NO_RECALL = 0x00100000 + FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000 + FILE_FLAG_SESSION_AWARE = 0x00800000 + FILE_FLAG_POSIX_SEMANTICS = 0x01000000 + FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 + FILE_FLAG_DELETE_ON_CLOSE = 0x04000000 + FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000 + FILE_FLAG_RANDOM_ACCESS = 0x10000000 + FILE_FLAG_NO_BUFFERING = 0x20000000 + FILE_FLAG_OVERLAPPED = 0x40000000 + FILE_FLAG_WRITE_THROUGH = 0x80000000 HANDLE_FLAG_INHERIT = 0x00000001 STARTF_USESTDHANDLES = 0x00000100 diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 308c97eec..eb9f06296 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -77,6 +77,7 @@ var ( procCreateFileW = modkernel32.NewProc("CreateFileW") procReadFile = modkernel32.NewProc("ReadFile") procWriteFile = modkernel32.NewProc("WriteFile") + procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult") procSetFilePointer = modkernel32.NewProc("SetFilePointer") procCloseHandle = modkernel32.NewProc("CloseHandle") procGetStdHandle = modkernel32.NewProc("GetStdHandle") @@ -246,6 +247,7 @@ var ( procGetLengthSid = modadvapi32.NewProc("GetLengthSid") procCopySid = modadvapi32.NewProc("CopySid") procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid") + procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid") procFreeSid = modadvapi32.NewProc("FreeSid") procEqualSid = modadvapi32.NewProc("EqualSid") procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership") @@ -653,6 +655,24 @@ func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) return } +func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) { + var _p0 uint32 + if wait { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) { r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0) newlowoffset = uint32(r0) @@ -2654,6 +2674,18 @@ func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, s return } +func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func FreeSid(sid *SID) (err error) { r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) if r1 != 0 { diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go index b05c466e0..5feaf601c 100644 --- a/vendor/gopkg.in/yaml.v2/decode_test.go +++ b/vendor/gopkg.in/yaml.v2/decode_test.go @@ -691,13 +691,13 @@ var unmarshalTests = []struct { M{"ñoño": "very yes 🟔"}, }, - // YAML Float regex shouldn't match this + // This *is* in fact a float number, per the spec. #171 was a mistake. { "a: 123456e1\n", - M{"a": "123456e1"}, + M{"a": 123456e1}, }, { "a: 123456E1\n", - M{"a": "123456E1"}, + M{"a": 123456E1}, }, // yaml-test-suite 3GZX: Spec Example 7.1. Alias Nodes { diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go index 6c151db6f..4120e0c91 100644 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ b/vendor/gopkg.in/yaml.v2/resolve.go @@ -81,7 +81,7 @@ func resolvableTag(tag string) bool { return false } -var yamlStyleFloat = regexp.MustCompile(`^[-+]?[0-9]*\.?[0-9]+([eE][-+][0-9]+)?$`) +var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) func resolve(tag string, in string) (rtag string, out interface{}) { if !resolvableTag(tag) { diff --git a/version/version.go b/version/version.go index a9d20ad07..3e1447e8b 100644 --- a/version/version.go +++ b/version/version.go @@ -1,4 +1,4 @@ package version // VERSION ... -const VERSION = "1.28.0" +const VERSION = "1.29.0"