diff options
author | Ivan Stakhov <50211739+LeftTry@users.noreply.github.com> | 2024-07-30 16:40:29 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-30 16:40:29 +0500 |
commit | 6dae6c424d310c53331678da94e84c47f06b1e50 (patch) | |
tree | 880db342ac58b9e9b9b44ddd84792ca5296d6a1c /src/libserver | |
parent | 74a302d1e9581d336ba7b8c23f235e49d5600637 (diff) | |
parent | 0b547ff8e801979b2f1ea42b1b686476f10341cf (diff) | |
download | rspamd-6dae6c424d310c53331678da94e84c47f06b1e50.tar.gz rspamd-6dae6c424d310c53331678da94e84c47f06b1e50.zip |
Merge branch 'rspamd:master' into master
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/cfg_rcl.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libserver/cfg_rcl.cxx b/src/libserver/cfg_rcl.cxx index ce3df4010..8a479fa6d 100644 --- a/src/libserver/cfg_rcl.cxx +++ b/src/libserver/cfg_rcl.cxx @@ -3623,7 +3623,8 @@ rspamd_config_parse_ucl(struct rspamd_config *cfg, auto &cfg_file = cfg_file_maybe.value(); /* Try to load keyfile if available */ - rspamd::util::raii_file::open(fmt::format("{}.key", filename), O_RDONLY).map([&](const auto &keyfile) { + auto keyfile_name = fmt::format("{}.key", filename); + rspamd::util::raii_file::open(keyfile_name, O_RDONLY).map([&](const auto &keyfile) { auto *kp_parser = ucl_parser_new(0); if (ucl_parser_add_fd(kp_parser, keyfile.get_fd())) { auto *kp_obj = ucl_parser_get_object(kp_parser); @@ -3632,8 +3633,8 @@ rspamd_config_parse_ucl(struct rspamd_config *cfg, decrypt_keypair = rspamd_keypair_from_ucl(kp_obj); if (decrypt_keypair == nullptr) { - msg_err_config_forced("cannot load keypair from %s.key: invalid keypair", - filename); + msg_err_config_forced("cannot load keypair from %s: invalid keypair", + keyfile_name.c_str()); } else { /* Add decryption support to UCL */ @@ -3645,8 +3646,8 @@ rspamd_config_parse_ucl(struct rspamd_config *cfg, ucl_object_unref(kp_obj); } else { - msg_err_config_forced("cannot load keypair from %s.key: %s", - filename, ucl_parser_get_error(kp_parser)); + msg_err_config_forced("cannot load keypair from %s: %s", + keyfile_name.c_str(), ucl_parser_get_error(kp_parser)); } ucl_parser_free(kp_parser); }); |