[llvm-commits] [llvm] r134430 -	/llvm/trunk/lib/Support/Unix/Path.inc
    Chad Rosier 
    mcrosier at apple.com
       
    Tue Jul  5 11:55:31 PDT 2011
    
    
  
Author: mcrosier
Date: Tue Jul  5 13:55:31 2011
New Revision: 134430
URL: http://llvm.org/viewvc/llvm-project?rev=134430&view=rev
Log:
By default mkstemp() creates a temporary file with mode 0600, but the mode
used for open is 0666.  Therefore, add the necessary permission bits for
consistency.
rdar://8621462
Modified:
    llvm/trunk/lib/Support/Unix/Path.inc
Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=134430&r1=134429&r2=134430&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Tue Jul  5 13:55:31 2011
@@ -842,6 +842,9 @@
 
   // Save the name
   path = FNBuffer;
+
+  // By default mkstemp sets the mode to 0600, so update mode bits now.
+  AddPermissionBits (*this, 0666);
 #elif defined(HAVE_MKTEMP)
   // If we don't have mkstemp, use the old and obsolete mktemp function.
   if (mktemp(FNBuffer) == 0)
    
    
More information about the llvm-commits
mailing list