]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
add O_APPEND 10760/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 28 Sep 2021 08:24:06 +0000 (10:24 +0200)
committerGitHub <noreply@github.com>
Tue, 28 Sep 2021 08:24:06 +0000 (10:24 +0200)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/libssl.cc

index 1f67eabb57c016fb592f07b1f3b64f223cff715e..3e262331fd3947ffbd7dfe9e59ca0b56640dcbfc 100644 (file)
@@ -782,7 +782,7 @@ static void libssl_key_log_file_callback(const SSL* ssl, const char* line)
 std::unique_ptr<FILE, int(*)(FILE*)> libssl_set_key_log_file(std::unique_ptr<SSL_CTX, void(*)(SSL_CTX*)>& 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 + "'");
   }