From c533cd318037244749def1d8ed866e95f79eb182 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 28 Sep 2021 10:24:06 +0200 Subject: [PATCH] add O_APPEND Co-authored-by: Remi Gacogne --- pdns/libssl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 + "'"); } -- 2.47.2