Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Vault
Commits
bc5712ba
Commit
bc5712ba
authored
3 years ago
by
akshya96
Committed by
akshya96
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
add changes
parent
f9d8c7f4
Branches unavailable
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
command/debug.go
+2
-2
command/debug.go
helper/osutil/fileinfo_unix.go
+12
-0
helper/osutil/fileinfo_unix.go
helper/osutil/fileinfo_windows.go
+8
-0
helper/osutil/fileinfo_windows.go
with
22 additions
and
2 deletions
+22
-2
command/debug.go
+
2
-
2
View file @
bc5712ba
...
...
@@ -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
syscal
l
.
Umask
(
syscal
l
.
Umask
(
0
o077
))
defer
osuti
l
.
Umask
(
osuti
l
.
Umask
(
0
o077
))
}
tgz
:=
archiver
.
NewTarGz
()
...
...
This diff is collapsed.
Click to expand it.
helper/osutil/fileinfo_unix.go
0 → 100644
+
12
-
0
View file @
bc5712ba
//go:build !windows
package
osutil
import
(
"syscall"
)
// Sets new umask and returns old umask
func
Umask
(
newmask
int
)
int
{
return
syscall
.
Umask
(
newmask
)
}
This diff is collapsed.
Click to expand it.
helper/osutil/fileinfo_windows.go
0 → 100644
+
8
-
0
View file @
bc5712ba
//go:build windows
package
osutil
// Umask does nothing for windows for now
func
Umask
(
newmask
int
)
int
{
return
0
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help