gcov: create folders with 0777.

Message ID 70ea9d1d-b61e-123a-c4bf-af2a948c78f5@suse.cz
State New
Headers show
Series
  • gcov: create folders with 0777.
Related show

Commit Message

Martin Liška July 10, 2020, 8:58 a.m.
As mention in the PR, we should leave rights to umask.

I'm going to install the patch if there are no comments.
Martin

libgcc/ChangeLog:

	PR gcov-profile/96035
	* libgcov-driver-system.c: Create gcov folders with 0777
	so that it respects a system umask.
---
  libgcc/libgcov-driver-system.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.27.0

Patch

diff --git a/libgcc/libgcov-driver-system.c b/libgcc/libgcov-driver-system.c
index 031f057e318..216992afa8a 100644
--- a/libgcc/libgcov-driver-system.c
+++ b/libgcc/libgcov-driver-system.c
@@ -115,7 +115,7 @@  create_file_directory (char *filename)
          /* Try to make directory if it doesn't already exist.  */
          if (access (filename, F_OK) == -1
  #ifdef TARGET_POSIX_IO
-            && mkdir (filename, 0755) == -1
+	    && mkdir (filename, 0777) == -1
  #else
  #ifdef mkdir
  #undef mkdir