summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-01-12 16:57:01 (GMT)
committerBrad King <brad.king@kitware.com>2010-01-12 16:57:01 (GMT)
commit8d0161c8ffbe656ec1634da62319a869df01d85d (patch)
tree908531c739b50da4165b4f02594be4dd1c8db38d /Source/cmFileCommand.cxx
parent6c1e24276f97112c914065dff772246b0d73ec06 (diff)
downloadCMake-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/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index bce4137..c2e90b6 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -189,9 +189,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
#elif defined( __BORLANDC__ )
S_IRUSR | S_IWUSR
#else
- S_IRUSR | S_IWUSR |
- S_IRGRP |
- S_IROTH
+ 0666
#endif
;
@@ -202,7 +200,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
#if defined( _MSC_VER ) || defined( __MINGW32__ )
S_IREAD | S_IWRITE
#else
- S_IRUSR | S_IWUSR
+ 0666
#endif
);
}