Blob Blame History Raw
commit e322e98dc264bc5911d6fe1d371e55ac9f95a71e
Author: Christine Caulfield <ccaulfie@redhat.com>
Date:   Tue Mar 12 10:15:41 2019 +0000

    ipc: use O_EXCL on SHM files, and randomize the names
    
    Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>

diff --git a/lib/log_blackbox.c b/lib/log_blackbox.c
index 1cba422..2947162 100644
--- a/lib/log_blackbox.c
+++ b/lib/log_blackbox.c
@@ -166,6 +166,6 @@ qb_log_blackbox_write_to_file(const char *filename)
 	ssize_t written_size = 0;
 	struct qb_log_target *t;
-	int fd = open(filename, O_CREAT | O_RDWR, 0700);
+	int fd = open(filename, O_CREAT | O_RDWR | O_EXCL, 0700);
 
 	if (fd < 0) {
 		return -errno;