Skip to content

Commit

Permalink
use os/exec package
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim An <maksiman@microsoft.com>
  • Loading branch information
anmaxvl committed Apr 22, 2022
1 parent 9622f14 commit 9f020aa
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 109 deletions.
4 changes: 2 additions & 2 deletions internal/security/grantvmgroupaccess.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ const (
// include Grant ACE entries for the VM Group SID. This is a golang re-
// implementation of the same function in vmcompute, just not exported in
// RS5. Which kind of sucks. Sucks a lot :/
func GrantVmGroupAccess(name string) error { //nolint:stylecheck // ST1003
func GrantVmGroupAccess(name string) error { //nolint:stylecheck // ST1003
return GrantVmGroupAccessWithMask(name, accessMaskDesiredPermission)
}

// GrantVmGroupAccessWithMask sets the desired DACL for a specified file or
// directory.
func GrantVmGroupAccessWithMask(name string, access accessMask) error { //nolint:stylecheck // ST1003
func GrantVmGroupAccessWithMask(name string, access accessMask) error { //nolint:stylecheck // ST1003
if access == 0 || access<<4 != 0 {
return fmt.Errorf("invalid access mask: 0x%08x", access)
}
Expand Down
3 changes: 1 addition & 2 deletions internal/security/grantvmgroupaccess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package security
import (
"fmt"
"os"
"os/exec"
"path/filepath"
"regexp"
"testing"

exec "golang.org/x/sys/execabs"
)

const (
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 0 additions & 102 deletions vendor/golang.org/x/sys/execabs/execabs.go

This file was deleted.

1 change: 0 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ golang.org/x/net/trace
golang.org/x/sync/errgroup
# golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
## explicit; go 1.17
golang.org/x/sys/execabs
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
golang.org/x/sys/windows
Expand Down

0 comments on commit 9f020aa

Please sign in to comment.