On 04/21/2013 12:53 PM, Greg Czajkowski wrote:
> For some reason recent valgrind versions are removing the group read 
> permission from the valgrind log. But other log files created by the process 
> under valgrind create log files with the correct default permissions.
> 
> -rw------- 1 myuserid mygroup 28303 Mar  2 13:52 valgrind_2381.log.gz
> -rw-r----- 1 myuserid mygroup  6725 Mar  2 13:52 other.log.gz
> 
> Where in valgrind source code can we remove the code which is removing group 
> permissions. This is making it more difficult to share valgrind logs with our 
> teammates. We don't want to have to change all our valgrind integrations to 
> include additional perl glue which fixes the permissions back.

Those bits aren't getting set in the first place.
Here's how I found out.  [I bet you could do this, too!]

$ strace -i -o /tmp/strace.out valgrind --log-file=/tmp/valgrind.log /bin/date

----- /tmp/strace.out
[        3806bbb9] open("/tmp/valgrind.log", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 3
-----

$ grep -sr O_WRONLY valgrind-3.8.1
  ...

----- coregrind/m_main.c
static
void main_process_cmd_line_options ( /*OUT*/Bool* logging_to_fd,
  ...
         sres = VG_(open)(logfilename,
                          VKI_O_CREAT|VKI_O_WRONLY|VKI_O_TRUNC,
                          VKI_S_IRUSR|VKI_S_IWUSR);
-----

-- 


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to