Bug 390723

Summary: make xtree dump files world wide readable, similar to log files
Product: [Developer tools] valgrind Reporter: Ivo Raisr <ivosh>
Component: generalAssignee: Ivo Raisr <ivosh>
Status: RESOLVED FIXED    
Severity: normal CC: ivosh
Priority: NOR    
Version: 3.14 SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

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