vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 7030de32d5ed1396e06bb863b943c966331b8e5a
parent b67c5b77be725f6d71abff47498c6211ba1a9d30
Author: pjsier <pjsier@gmail.com>
Date:   Wed, 28 Dec 2022 18:30:25 -0600

Log message to stderr if LOG_FILE is not writable

Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>

Diffstat:
Msrc/config.rs | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/config.rs b/src/config.rs @@ -684,6 +684,12 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { } } + if let Some(log_file) = &cfg.log_file { + if std::fs::OpenOptions::new().append(true).create(true).open(log_file).is_err() { + err!("Unable to write to log file", log_file); + } + } + let dom = cfg.domain.to_lowercase(); if !dom.starts_with("http://") && !dom.starts_with("https://") { err!(