backport of commit 88fb88e3db (#23609)

Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
This commit is contained in:
hc-github-team-secure-vault-core
2023-10-11 12:08:56 -04:00
committed by GitHub
parent efc95ff3d7
commit 82642c4683
2 changed files with 31 additions and 16 deletions

View File

@@ -391,6 +391,17 @@ func (b *Backend) open() error {
}
func (b *Backend) Reload(_ context.Context) error {
// When there are nodes created in the map, use the eventlogger behavior.
if len(b.nodeMap) > 0 {
for _, n := range b.nodeMap {
if n.Type() == eventlogger.NodeTypeSink {
return n.Reopen()
}
}
return nil
} else {
// old non-eventlogger behavior
switch b.path {
case stdout, discard:
return nil
@@ -412,6 +423,7 @@ func (b *Backend) Reload(_ context.Context) error {
}
return b.open()
}
}
func (b *Backend) Invalidate(_ context.Context) {

3
changelog/23598.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
audit: Fix bug reopening 'file' audit devices on SIGHUP.
```