Commit bc5712ba authored by akshya96's avatar akshya96 Committed by akshya96
Browse files

add changes

parent f9d8c7f4
Branches unavailable
No related merge requests found
Showing with 22 additions and 2 deletions
+22 -2
......@@ -12,13 +12,13 @@ import (
"strconv"
"strings"
"sync"
"syscall"
"time"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-secure-stdlib/gatedwriter"
"github.com/hashicorp/go-secure-stdlib/strutil"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/helper/osutil"
"github.com/hashicorp/vault/sdk/helper/logging"
"github.com/hashicorp/vault/sdk/version"
"github.com/mholt/archiver"
......@@ -903,7 +903,7 @@ func (c *DebugCommand) persistCollection(collection []map[string]interface{}, ou
func (c *DebugCommand) compress(dst string) error {
if runtime.GOOS != "windows" {
defer syscall.Umask(syscall.Umask(0o077))
defer osutil.Umask(osutil.Umask(0o077))
}
tgz := archiver.NewTarGz()
......
//go:build !windows
package osutil
import (
"syscall"
)
// Sets new umask and returns old umask
func Umask(newmask int) int {
return syscall.Umask(newmask)
}
//go:build windows
package osutil
// Umask does nothing for windows for now
func Umask(newmask int) int {
return 0
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment