From 65bef4014d65532ea32bcebee66f14313cf4cf8c Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Fri, 11 Mar 2016 21:27:43 -0500 Subject: [PATCH] Remove redundant variables --- audit/hashstructure.go | 9 +++------ website/source/docs/audit/file.html.md | 6 +++--- website/source/docs/audit/index.html.md | 3 ++- website/source/docs/audit/syslog.html.md | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/audit/hashstructure.go b/audit/hashstructure.go index 56b1dc05c0..8ab9951c59 100644 --- a/audit/hashstructure.go +++ b/audit/hashstructure.go @@ -29,12 +29,10 @@ func Hash(salter *salt.Salt, raw interface{}) error { return nil } if s.ClientToken != "" { - token := fn(s.ClientToken) - s.ClientToken = token + s.ClientToken = fn(s.ClientToken) } if s.Accessor != "" { - accessor := fn(s.Accessor) - s.Accessor = accessor + s.Accessor = fn(s.Accessor) } case *logical.Request: @@ -48,8 +46,7 @@ func Hash(salter *salt.Salt, raw interface{}) error { } if s.ClientToken != "" { - token := fn(s.ClientToken) - s.ClientToken = token + s.ClientToken = fn(s.ClientToken) } data, err := HashStructure(s.Data, fn) diff --git a/website/source/docs/audit/file.html.md b/website/source/docs/audit/file.html.md index 1f34bb04e7..bc068b3bde 100644 --- a/website/source/docs/audit/file.html.md +++ b/website/source/docs/audit/file.html.md @@ -15,8 +15,8 @@ backend: it appends logs to a file. It does not currently assist with any log ro Each line in the audit log is a JSON object. The `type` field specifies what type of object it is. Currently, only two types exist: `request` and `response`. The line contains -all of the information for any given request and response. All the sensitive information -is first hashed before logging in the audit logs, by default. +all of the information for any given request and response. By default, all the sensitive +information is first hashed before logging in the audit logs. ## Enabling @@ -31,7 +31,7 @@ $ vault audit-enable file path=/var/log/vault_audit.log Any number of `file` audit logs can be created by enabling it with different `id`s. ``` -$ vault audit-enable -id="file_backend" file path=/home/user/vault_audit.log +$ vault audit-enable -id="vault_audit_1" file path=/home/user/vault_audit.log ``` Note the difference between `audit-enable` command options and the `file` backend diff --git a/website/source/docs/audit/index.html.md b/website/source/docs/audit/index.html.md index a7d550df22..4e91209b99 100644 --- a/website/source/docs/audit/index.html.md +++ b/website/source/docs/audit/index.html.md @@ -86,7 +86,7 @@ block. diff --git a/website/source/docs/audit/syslog.html.md b/website/source/docs/audit/syslog.html.md index 808717da16..923a4f756a 100644 --- a/website/source/docs/audit/syslog.html.md +++ b/website/source/docs/audit/syslog.html.md @@ -18,8 +18,8 @@ and should not be enabled if any standby Vault instances do not support it. Each line in the audit log is a JSON object. The `type` field specifies what type of object it is. Currently, only two types exist: `request` and `response`. The line contains -all of the information for any given request and response. All the sensitive information -is first hashed before logging in the audit logs, by default. +all of the information for any given request and response. By default, all the sensitive +information is first hashed before logging in the audit logs. ## Enabling