Skip to content

Commit

Permalink
ccpp: open file for dump_fd_info with O_EXCL
Browse files Browse the repository at this point in the history
To avoid possible races.

Related: #1211835

Signed-off-by: Jakub Filak <jfilak@redhat.com>
  • Loading branch information
Jakub Filak committed Apr 28, 2015
1 parent 4f2c1dd commit d6e2f6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/abrt-hook-ccpp.c
Expand Up @@ -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;

Expand Down

0 comments on commit d6e2f6f

Please sign in to comment.