diff options
author | enahum <nahumhbl@gmail.com> | 2016-07-05 15:49:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-05 15:49:00 -0400 |
commit | 5f04dc4f45b9657d46380499f92ae6e5c1bf5506 (patch) | |
tree | 86670cb20e038f9716eca3ab9dcb7f2f71263286 /vendor/github.com/kardianos/osext/osext_windows.go | |
parent | f91b9d4a654ff27777580651d853b6372a425af6 (diff) | |
download | chat-5f04dc4f45b9657d46380499f92ae6e5c1bf5506.tar.gz chat-5f04dc4f45b9657d46380499f92ae6e5c1bf5506.tar.bz2 chat-5f04dc4f45b9657d46380499f92ae6e5c1bf5506.zip |
SAML support (#3494)
* PLT-3073: Implement SAML/Okta Server side (EE) (#3422)
* PLT-3137 Support for SAML configuration
* PLT-3410 SAML Database Store
* PLT-3411 CLI to add Identity Provider Certificate and Service Provider Private Key
* PLT-3409 SAML Interface for EE
* PLT-3139 Handle SAML authentication server side
* Add localization messages
* PLT-3443 SAML Obtain SP metadata
* PLT-3142 Login & Switch to/from SAML
* Remove Certs for Database & Clean SAML Request
* Make required Username, FirstName and LastName
* PLT-3140 Add SAML to System Console (#3476)
* PLT-3140 Add SAML to System Console
* Move web_client functions to client.jsx
* Fix issues found by PM
* update package.json mattermost driver
* Fix text messages for SAML
Diffstat (limited to 'vendor/github.com/kardianos/osext/osext_windows.go')
-rw-r--r-- | vendor/github.com/kardianos/osext/osext_windows.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/github.com/kardianos/osext/osext_windows.go b/vendor/github.com/kardianos/osext/osext_windows.go new file mode 100644 index 000000000..72d282cf8 --- /dev/null +++ b/vendor/github.com/kardianos/osext/osext_windows.go @@ -0,0 +1,34 @@ +// Copyright 2012 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. + +package osext + +import ( + "syscall" + "unicode/utf16" + "unsafe" +) + +var ( + kernel = syscall.MustLoadDLL("kernel32.dll") + getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW") +) + +// GetModuleFileName() with hModule = NULL +func executable() (exePath string, err error) { + return getModuleFileName() +} + +func getModuleFileName() (string, error) { + var n uint32 + b := make([]uint16, syscall.MAX_PATH) + size := uint32(len(b)) + + r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size)) + n = uint32(r0) + if n == 0 { + return "", e1 + } + return string(utf16.Decode(b[0:n])), nil +} |