[25098] trunk/base/src/darwinports1.0/darwinports.tcl

source_changes at macosforge.org source_changes at macosforge.org
Sun May 13 17:20:28 PDT 2007


Revision: 25098
          http://trac.macosforge.org/projects/macports/changeset/25098
Author:   jberry at macports.org
Date:     2007-05-13 17:20:27 -0700 (Sun, 13 May 2007)

Log Message:
-----------
If we need to create ~/.macports, create it as 600, with ownership of the enclosing directory.

Modified Paths:
--------------
    trunk/base/src/darwinports1.0/darwinports.tcl

Modified: trunk/base/src/darwinports1.0/darwinports.tcl
===================================================================
--- trunk/base/src/darwinports1.0/darwinports.tcl	2007-05-14 00:09:58 UTC (rev 25097)
+++ trunk/base/src/darwinports1.0/darwinports.tcl	2007-05-14 00:20:27 UTC (rev 25098)
@@ -224,6 +224,7 @@
 	}
 }
 
+
 proc dportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
 	if {$up_ui_options eq ""} {
 		array set ui_options {}
@@ -269,7 +270,12 @@
    	
     # Ensure that the macports user directory exists
     set darwinports::macports_user_dir [file normalize $darwinports::autoconf::macports_user_dir]
-    file mkdir $macports_user_dir
+    if { ![file exists $macports_user_dir] } {
+    	# If not, create it with ownership of the enclosing directory, rw by the user only
+		file mkdir $macports_user_dir 
+		file attributes $macports_user_dir -permissions u=rw,go=
+		file attributes $macports_user_dir -owner [file attributes "$macports_user_dir/.." -owner]
+    }
     
    	# Configure the search path for configuration files
    	set conf_files ""

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070513/e4c41eef/attachment.html


More information about the macports-changes mailing list