Blame SOURCES/0092-ccpp-open-file-for-dump_fd_info-with-O_EXCL.patch

8ec399
From d6e2f6f128cef4c21cb80941ae674c9842681aa7 Mon Sep 17 00:00:00 2001
8ec399
From: Jakub Filak <jfilak@redhat.com>
8ec399
Date: Wed, 15 Apr 2015 14:01:37 +0200
8ec399
Subject: [ABRT PATCH] ccpp: open file for dump_fd_info with O_EXCL
8ec399
8ec399
To avoid possible races.
8ec399
8ec399
Related: #1211835
8ec399
8ec399
Signed-off-by: Jakub Filak <jfilak@redhat.com>
8ec399
---
8ec399
 src/hooks/abrt-hook-ccpp.c | 2 +-
8ec399
 1 file changed, 1 insertion(+), 1 deletion(-)
8ec399
8ec399
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
8ec399
index 0606519..ece1ece 100644
8ec399
--- a/src/hooks/abrt-hook-ccpp.c
8ec399
+++ b/src/hooks/abrt-hook-ccpp.c
8ec399
@@ -399,7 +399,7 @@ static int open_user_core(uid_t uid, uid_t fsuid, pid_t pid, char **percent_valu
8ec399
 
8ec399
 static bool dump_fd_info(const char *dest_filename, char *source_filename, int source_base_ofs, uid_t uid, gid_t gid)
8ec399
 {
8ec399
-    FILE *fp = fopen(dest_filename, "w");
8ec399
+    FILE *fp = fopen(dest_filename, "wx");
8ec399
     if (!fp)
8ec399
         return false;
8ec399
 
8ec399
-- 
8ec399
1.8.3.1
8ec399