[61583] branches/release_1_8
jmr at macports.org
jmr at macports.org
Tue Dec 15 10:33:39 PST 2009
Revision: 61583
http://trac.macports.org/changeset/61583
Author: jmr at macports.org
Date: 2009-12-15 10:33:37 -0800 (Tue, 15 Dec 2009)
Log Message:
-----------
merge r59597 from trunk:
don't try to set owner and group in reinplace when not root (#20896)
Revision Links:
--------------
http://trac.macports.org/changeset/59597
Modified Paths:
--------------
branches/release_1_8/base/src/port1.0/portutil.tcl
Property Changed:
----------------
branches/release_1_8/
branches/release_1_8/base/
Property changes on: branches/release_1_8
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,56147,56160,56162,56435,56448,57026,57255,57436,57441,57784,57801,57871,57974,58445,59318,59585,60259-60260,60798,61302,61385
+ /trunk:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,56147,56160,56162,56435,56448,57026,57255,57436,57441,57784,57801,57871,57974,58445,59318,59585,59597,60259-60260,60798,61302,61385
Property changes on: branches/release_1_8/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,55825,56147,56160,56162,56435,56448,56472-56474,56666,56889,57026,57048,57055,57131,57255,57436,57441,57784,57801,57820,57871,57974,57979,57982,58093,58445,59318,59585,60259-60260,60798,61302,61385
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:55268,55279,55281,55285,55317,55385,55417,55591,55594,55679,55767,55793,55825,56147,56160,56162,56435,56448,56472-56474,56666,56889,57026,57048,57055,57131,57255,57436,57441,57784,57801,57820,57871,57974,57979,57982,58093,58445,59318,59585,59597,60259-60260,60798,61302,61385
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/release_1_8/base/src/port1.0/portutil.tcl
===================================================================
--- branches/release_1_8/base/src/port1.0/portutil.tcl 2009-12-15 17:54:56 UTC (rev 61582)
+++ branches/release_1_8/base/src/port1.0/portutil.tcl 2009-12-15 18:33:37 UTC (rev 61583)
@@ -2325,16 +2325,22 @@
# @param attributes the attributes for the file
proc fileAttrsAsRoot {file attributes} {
global euid macportsuser
- if {[getuid] == 0 && [geteuid] != 0} {
- # Started as root, but not root now
- seteuid $euid
- ui_debug "euid changed to: [geteuid]"
- ui_debug "setting attributes on $file"
- eval file attributes {$file} $attributes
- seteuid [name_to_uid "$macportsuser"]
- ui_debug "euid changed to: [geteuid]"
+ if {[getuid] == 0} {
+ if {[geteuid] != 0} {
+ # Started as root, but not root now
+ seteuid $euid
+ ui_debug "euid changed to: [geteuid]"
+ ui_debug "setting attributes on $file"
+ eval file attributes {$file} $attributes
+ seteuid [name_to_uid "$macportsuser"]
+ ui_debug "euid changed to: [geteuid]"
+ } else {
+ eval file attributes {$file} $attributes
+ }
} else {
- eval file attributes {$file} $attributes
+ # not root, so can't set owner/group
+ set permissions [lindex $attributes [expr [lsearch $attributes "-permissions"] + 1]]
+ file attributes $file -permissions $permissions
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091215/7c323df1/attachment.html>
More information about the macports-changes
mailing list