Bug 390723 - make xtree dump files world wide readable, similar to log files
Summary: make xtree dump files world wide readable, similar to log files
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.14 SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Ivo Raisr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-19 09:23 UTC by Ivo Raisr
Modified: 2018-02-20 11:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivo Raisr 2018-02-19 09:23:57 UTC
There is no reason why xtree dump files should not be world wide readable, similar to log files.
Users can always set the corresponding umask to tighten the permissions.


diff --git a/coregrind/m_xtree.c b/coregrind/m_xtree.c
index 7d5766222..217cad9da 100644
--- a/coregrind/m_xtree.c
+++ b/coregrind/m_xtree.c
@@ -377,7 +377,7 @@ static VgFile* xt_open (const HChar* outfilename)
    VgFile* fp;
 
    fp = VG_(fopen)(outfilename, VKI_O_CREAT|VKI_O_WRONLY|VKI_O_TRUNC,
-                   VKI_S_IRUSR|VKI_S_IWUSR);
+                   VKI_S_IRUSR|VKI_S_IWUSR|VKI_S_IRGRP|VKI_S_IROTH);
    if (fp == NULL) {
       VG_(message)(Vg_UserMsg,
                    "Error: can not open xtree output file `%s'\n",
Comment 1 Ivo Raisr 2018-02-20 11:32:48 UTC
Fixed in commit c014c2c43669106b4e2aeb6203a2fbe9e3e4ff48.

https://sourceware.org/git/?p=valgrind.git;a=commitdiff;h=c014c2c43669106b4e2aeb6203a2fbe9e3e4ff48