From: Otto Moerbeek Date: Tue, 28 Sep 2021 08:24:06 +0000 (+0200) Subject: add O_APPEND X-Git-Tag: auth-4.6.0-alpha1~21^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10760%2Fhead;p=thirdparty%2Fpdns.git add O_APPEND Co-authored-by: Remi Gacogne --- diff --git a/pdns/libssl.cc b/pdns/libssl.cc index 1f67eabb57..3e262331fd 100644 --- a/pdns/libssl.cc +++ b/pdns/libssl.cc @@ -782,7 +782,7 @@ static void libssl_key_log_file_callback(const SSL* ssl, const char* line) std::unique_ptr libssl_set_key_log_file(std::unique_ptr& ctx, const std::string& logFile) { #ifdef HAVE_SSL_CTX_SET_KEYLOG_CALLBACK - int fd = open(logFile.c_str(), O_WRONLY | O_CREAT, 0600); + int fd = open(logFile.c_str(), O_WRONLY | O_CREAT | O_APPEND, 0600); if (fd == -1) { unixDie("Error opening TLS log file '" + logFile + "'"); }