Skip to content
Browse files

ccpp: open file for dump_fd_info with O_EXCL

To avoid possible races.

Related: #1211835

Signed-off-by: Jakub Filak <>
  • Loading branch information...
Jakub Filak
Jakub Filak committed Apr 15, 2015
1 parent 4f2c1dd commit d6e2f6f128cef4c21cb80941ae674c9842681aa7
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hooks/abrt-hook-ccpp.c
@@ -399,7 +399,7 @@ static int open_user_core(uid_t uid, uid_t fsuid, pid_t pid, char **percent_valu

static bool dump_fd_info(const char *dest_filename, char *source_filename, int source_base_ofs, uid_t uid, gid_t gid)
FILE *fp = fopen(dest_filename, "w");
FILE *fp = fopen(dest_filename, "wx");
if (!fp)
return false;

0 comments on commit d6e2f6f

Please sign in to comment.
You can’t perform that action at this time.