mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-28 14:11:10 +01:00
Unconditionally warn on systems w/o mlock support
If someone begins using Vault on Windows in dev mode, always hint so that this isn't a surprise when they get to production.
This commit is contained in:
parent
4b13bfde1d
commit
a199547ffc
@ -124,13 +124,12 @@ func (c *ServerCommand) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// If mlock isn't supported, show a warning. We disable this in
|
||||
// dev because it is quite scary to see when first using Vault.
|
||||
if !dev && !mlock.Supported() {
|
||||
// If mlockall(2) isn't supported, show a warning (even in dev mode).
|
||||
if !mlock.Supported() {
|
||||
c.Ui.Output("==> WARNING: mlock not supported on this system!\n")
|
||||
c.Ui.Output(" The `mlock` syscall to prevent memory from being swapped to")
|
||||
c.Ui.Output(" disk is not supported on this system. Enabling mlock or")
|
||||
c.Ui.Output(" running Vault on a system with mlock is much more secure.\n")
|
||||
c.Ui.Output(" An `mlockall(2)`-like syscall to prevent memory from being")
|
||||
c.Ui.Output(" swapped to disk is not supported on this system. Running")
|
||||
c.Ui.Output(" Vault on an mlockall(2) enabled system is much more secure.\n")
|
||||
}
|
||||
|
||||
// Create a logger. We wrap it in a gated writer so that it doesn't
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user