Kevin Parsons
2aa35e1d77
Merge pull request #195 from thaJeztah/better_exec
...
Use golang.org/x/sys/execabs instead of os/exec
2021-02-10 00:38:31 -08:00
Sebastiaan van Stijn
f2a56450f4
Use golang.org/x/sys/execabs instead of os/exec
...
On Windows, the os/exec.{Command,CommandContext,LookPath} functions resolve command
names that have neither path separators nor file extension (e.g., "git") by first
looking in the current working directory before looking in the PATH environment
variable.
Go maintainers intended to match cmd.exe's historical behavior.
However, this is pretty much never the intended behavior and as an abundance of
precaution this patch prevents that when executing commands.
This patch was prompted by the [Go 1.15.7 security fixes](https://blog.golang.org/path-security ).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2021-02-10 09:21:40 +01:00
Kathryn Baldauf
a38e1dc8bb
Merge pull request #188 from TBBle/correct-GetVolumeInformation-return-handling
...
Correct GetVolumeInformation return type handling
2021-02-09 18:46:35 -08:00
Kathryn Baldauf
90a22c612d
Merge pull request #194 from thaJeztah/bump_deps
...
go.mod: sirupsen/logrus v1.7.0, golang.org/x/sys
2021-02-09 18:38:52 -08:00
Danny Canter
644af44635
Merge pull request #189 from dcantah/attach-v1
...
Remove error if ATTACH_VIRTUAL_DISK_PARAMETERS wasn't version 2
2021-02-09 17:46:10 -08:00
Danny Canter
69491f048a
Merge pull request #196 from katiewasnothere/add_codeowners
...
Add codeowners file so containerplat is auto added as reviewers
2021-02-09 15:35:45 -08:00
Kathryn Baldauf
ea4a03d185
Add codeowners file so containerplat is auto added as reviewers
...
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com >
2021-02-09 15:18:39 -08:00
Sebastiaan van Stijn
6734ca5406
go.mod: sirupsen/logrus v1.7.0, golang.org/x/sys
...
full diff: https://github.com/sirupsen/logrus/compare/v1.4.2...v1.7.0
logrus v1.7.0 removes dependency on github.com/konsorten/go-windows-terminal-sequences
Features:
* a new buffer pool management API has been added
* a set of `<LogLevel>Fn()` functions have been added
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2021-02-09 11:02:59 +01:00
Kevin Parsons
ac908d2e8e
Merge pull request #192 from kylewo/add-provider-group
...
Add ability to set provider group
2021-01-27 14:52:50 -08:00
Kyle Wojtaszek
652abba813
Removing unneeded NewProviderWithGroup function
2021-01-27 14:43:00 -08:00
Kyle Wojtaszek
30844eed75
Add ability to set provider group
2021-01-27 13:12:37 -08:00
Daniel Canter
83fd17628f
Remove error if ATTACH_VIRTUAL_DISK_PARAMETERS wasn't version 2
...
* Version 2 didn't exist in RS5 so it's a bit silly to error out in this case.
Signed-off-by: Daniel Canter <dcanter@microsoft.com >
2021-01-18 02:50:23 -08:00
Paul "TBBle" Hampson
0966e1ad56
Correct GetVolumeInformation return type handling
...
The _docs_ say it returns 0 for failure, non-zero for success.
This implementation is looking for <0 as HRESULT failure, and deriving
an Errno from that.
The new tests fail with GetFileSystemType as it was defined, e.g.,
```
--- FAIL: TestGetFSTypeOfValidButAbsentDrive (0.00s)
fs_windows_test.go:41: GetFileSystemType a:\ unexpectedly succeeded
```
when I definitely do not have an A:\ drive.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com >
2021-01-16 17:11:37 +11:00
Danny Canter
d1ffc52c73
Merge pull request #179 from dcantah/virtdisk
...
Add new virtdisk calls/refactor vhd package
2020-11-30 08:25:21 -08:00
Daniel Canter
e9604c63ae
Add new virtdisk calls/refactor vhd package
...
This change adds bindings for AttachVirtualDisk and GetVirtualDiskPhysicalPath, some helper functions including
one to create a differencing vhd, exports the create and open parameters, exports the create flags and adds a couple
of missing flags. This will be used mainly to go hand in hand with the new computestorage calls added to hcsshim as all of the
vhd creation and setup needs to be done manually for these calls. https://github.com/microsoft/hcsshim/pull/881 .
Signed-off-by: Daniel Canter <dcanter@microsoft.com >
2020-11-30 08:23:06 -08:00
Kevin Parsons
f314918fc7
Merge pull request #181 from gbbr/spellfix
...
Correct spelling in PipeConfig {Input,Output}BufferSize doc.
2020-11-23 13:18:15 -08:00
Gabriel Aszalos
68390cf0c2
Correct spelling in PipeConfig {Input,Output}BufferSize doc.
...
Signed-off-by: Gabriel Aszalos <gabriel.aszalos@gmail.com >
2020-11-23 23:01:29 +02:00
Kevin Parsons
a6ab492b63
Merge pull request #182 from thaJeztah/bump_pkg_errors
...
go.mod: github.com/pkg/errors v0.9.1
2020-11-23 12:59:39 -08:00
Sebastiaan van Stijn
00446faf93
go.mod: github.com/pkg/errors v0.9.1
...
update to pkg/errors v0.9.1 for compatibility with Go 1.13
error (un)wrapping.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2020-11-23 21:09:12 +01:00
Kevin Parsons
5b44b70ab3
Merge pull request #175 from TBBle/defork_achive_tar
...
Replace archive/tar fork with use of archive/tar
2020-09-08 11:26:39 -07:00
Paul "TBBle" Hampson
cb5cf8987b
Replace archive/tar fork with use of archive/tar
...
Since Go 1.6, archive/tar has gained public support for custom PAX
Records, so there's no need to maintain a fork of this library anymore.
We do end up with a fork of the PAX timestamp parsing/formatting
functions, but they are much less likely to change.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com >
2020-07-17 00:45:58 +10:00
Justin
3fe6c52628
Merge pull request #168 from maxifom/duration_inconsistency
...
Duration order consistency when multiplying number by time unit
2020-01-13 09:10:25 -08:00
Maxim Fominykh
06bcafdc24
Duration order consistency when multiplying number by time unit
2020-01-11 05:26:35 +05:00
Justin
1f03480c53
Merge pull request #166 from paruizfi/master
...
Expose pipe access level to caller
2019-12-19 07:30:15 -08:00
Pablo Ruiz Fischer Bennetts
3886dbb163
Expanded dial to allow to provide access level
...
Enable anonymous access
Remove non-context overload
Remove error being rethrown
2019-12-04 10:15:56 -08:00
Kevin Parsons
fc70bd9a86
Merge pull request #160 from kevpar/pkg-process
...
Add new process package
2019-09-18 19:51:22 -07:00
Kevin Parsons
f272bf30b3
Add new process package
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-09-18 18:03:14 -07:00
Justin
6c72808b55
Merge pull request #157 from jterry75/fix_detachvhd
...
Fix regression in DetachVhd
2019-08-06 12:59:04 -07:00
Justin Terry (VM)
5adf6781fa
Fix regression in DetachVhd
...
When opening a disk it for deatch using 'Version == 2' parameters it is
required that the'accessMask == VirtualDiskAccessNone'. Also updates the
virtual disk 'flag' parameter to match the set specified by the product when
activating the layer.
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com >
2019-08-06 11:28:36 -07:00
Justin
a969fb018b
Merge pull request #153 from microsoft/guid
...
guid package improvements
2019-07-19 05:48:51 -07:00
Kevin Parsons
c20fb68775
etw: Add test for provider name to GUID conversion
...
Also simplified the name to GUID conversion code, and improved the
comments.
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-07-10 15:12:20 -07:00
Kevin Parsons
177d2ec7ea
guid: Add V5 GUID support
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-07-10 15:08:22 -07:00
Kevin Parsons
c5294c98c0
guid: Improve version and variant handling
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-07-10 15:03:44 -07:00
Justin
881e3d4642
Merge pull request #152 from ehotinger/ehotinger/fs
...
Updates the error message in GetFileSystemType
2019-07-02 11:31:43 -07:00
Eric Hotinger
28396ed851
Updates the error message in GetFileSystemType to match the function's
...
casing and exports the error.
Signed-off-by: Eric Hotinger <ehotinger@gmail.com >
2019-07-01 14:25:30 -07:00
Justin
7cdfd71a95
Merge pull request #146 from microsoft/fix-makeopenfile
...
Fix interface-wrapped nil returned by MakeOpenFile
2019-06-28 11:17:19 -07:00
Justin
69f028c26d
Merge pull request #150 from ehotinger/ehotinger/fs
...
Adds a file system helper file for determining the file system type.
2019-06-25 13:50:08 -07:00
Eric Hotinger
9fe4f5c769
Adds a file system helper file for determining the file system type.
...
Signed-off-by: Eric Hotinger <ehotinger@gmail.com >
2019-06-25 13:42:09 -07:00
Justin
d2ef9cfdac
Merge pull request #149 from microsoft/etw-logrus-time
...
etwlogrus: Pass through entry time as ETW field
2019-06-25 10:40:15 -07:00
Kevin Parsons
09baa54393
etwlogrus: Pass through entry time as ETW field
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-06-25 10:36:45 -07:00
Justin
c2fe1c3f36
Merge pull request #148 from microsoft/etw-logrus-levels
...
Replace ETW Logrus hook levels with AllLevels
2019-06-25 10:35:04 -07:00
Kevin Parsons
2ae559ad19
Replace ETW Logrus hook levels with AllLevels
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-06-25 10:32:12 -07:00
Kevin Parsons
f208b3299c
Fix interface-wrapped nil returned by MakeOpenFile
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-05-31 17:09:52 -07:00
John Starks
12afdbf8b8
Merge pull request #86 from azdagron/file-handle-access
...
provide access to underlying file handle
2019-05-16 09:56:58 -07:00
Kevin Parsons
72445fa384
Merge pull request #145 from microsoft/guid
...
pkg/guid: Various improvements
2019-05-14 11:46:02 -07:00
Kevin Parsons
3dac69f6ea
pkg/guid: Switch from json.Marshaler to encoding.TextMarshaler
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-05-13 14:31:21 -07:00
Kevin Parsons
b940a6f7ae
pkg/guid: Improve error messages
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-05-13 14:30:09 -07:00
Kevin Parsons
2dc6637e2c
pkg/guid: Support big-endian and Windows encodings
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-05-13 14:28:49 -07:00
Kevin Parsons
6dd84a2574
pkg/guid: Add helper functions to tests
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-05-13 14:25:53 -07:00
Kevin Parsons
1197d54849
pkg/guid: Add variant and version support
...
Signed-off-by: Kevin Parsons <kevpar@microsoft.com >
2019-05-13 14:22:42 -07:00