From af222a945a8a30f43fbec3fc7294f7f1f5e69a86 Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Thu, 12 May 2016 07:22:00 -0400 Subject: [PATCH] Fix mount tune bounds checking --- vault/logical_system_helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vault/logical_system_helpers.go b/vault/logical_system_helpers.go index a3fb94579..bcda207f4 100644 --- a/vault/logical_system_helpers.go +++ b/vault/logical_system_helpers.go @@ -44,7 +44,7 @@ func (b *SystemBackend) tuneMountTTLs(path string, meConfig *MountConfig, newDef int(newDefault.Seconds()), int(b.Core.maxLeaseTTL.Seconds())) } } else { - if meConfig.MaxLeaseTTL < *newDefault { + if newMax == nil && *newDefault > meConfig.MaxLeaseTTL { return fmt.Errorf("new backend default lease TTL of %d greater than backend max lease TTL of %d", int(newDefault.Seconds()), int(meConfig.MaxLeaseTTL.Seconds())) }