diff options
author | Brad King <brad.king@kitware.com> | 2010-01-12 16:57:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-01-12 16:57:01 (GMT) |
commit | 8d0161c8ffbe656ec1634da62319a869df01d85d (patch) | |
tree | 908531c739b50da4165b4f02594be4dd1c8db38d /Source/kwsys/ProcessUNIX.c | |
parent | 6c1e24276f97112c914065dff772246b0d73ec06 (diff) | |
download | CMake-8d0161c8ffbe656ec1634da62319a869df01d85d.zip CMake-8d0161c8ffbe656ec1634da62319a869df01d85d.tar.gz CMake-8d0161c8ffbe656ec1634da62319a869df01d85d.tar.bz2 |
Trust umask for file permissions
Open output files with mode 0666 so that permissions are not more strict
than umask permits. See issue #10126.
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 79716a1..373e906 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -1875,9 +1875,8 @@ static int kwsysProcessSetupOutputPipeFile(int* p, const char* name) /* Close the existing descriptor. */ kwsysProcessCleanupDescriptor(p); - /* Open a file for the pipe to write (permissions 644). */ - if((fout = open(name, O_WRONLY | O_CREAT | O_TRUNC, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) + /* Open a file for the pipe to write. */ + if((fout = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) { return 0; } |