[118604] branches/release_2_3/base
cal at macports.org
cal at macports.org
Sat Apr 5 13:14:06 PDT 2014
Revision: 118604
https://trac.macports.org/changeset/118604
Author: cal at macports.org
Date: 2014-04-05 13:14:06 -0700 (Sat, 05 Apr 2014)
Log Message:
-----------
merge r118602, r118603 from trunk to fix tracemode test
Revision Links:
--------------
https://trac.macports.org/changeset/118602
https://trac.macports.org/changeset/118603
Modified Paths:
--------------
branches/release_2_3/base/tests/test/trace/test.tcl
Property Changed:
----------------
branches/release_2_3/base/
Property changes on: branches/release_2_3/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/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:118038-118039,118056,118598-118599
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/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:118038-118039,118056,118598-118599,118602-118603
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/release_2_3/base/tests/test/trace/test.tcl
===================================================================
--- branches/release_2_3/base/tests/test/trace/test.tcl 2014-04-05 20:10:48 UTC (rev 118603)
+++ branches/release_2_3/base/tests/test/trace/test.tcl 2014-04-05 20:14:06 UTC (rev 118604)
@@ -1,4 +1,8 @@
package require tcltest 2
+
+# need pextlib to drop privs
+package require Pextlib 1.0
+
namespace import tcltest::*
source [file dirname $argv0]/../library.tcl
@@ -19,19 +23,29 @@
port_index
port_clean $path
-
- makeDirectory ../tracetesttmp
- file attributes ../tracetesttmp -owner $user
- exec sudo -u $user touch ../tracetesttmp/delete-trace
- exec sudo -u $user touch ../tracetesttmp/rename-trace
- exec sudo -u $user mkdir ../tracetesttmp/rmdir-trace
file delete -force /tmp/hello-trace
+ file delete -force /tmp/link-trace2
file link -symbolic /tmp/link-trace2 /usr/include/unistd.h
- exec chown -h $user /tmp/link-trace2
+ makeDirectory ../tracetesttmp
+ if {[getuid] == 0} {
+ file attributes ../tracetesttmp -owner $user
+ exec chown -h $user /tmp/link-trace2
+ }
+
+ if {[getuid] == 0} {
+ seteuid [name_to_uid $user]
+ }
+ exec touch ../tracetesttmp/delete-trace
+ exec touch ../tracetesttmp/rename-trace
+ exec mkdir ../tracetesttmp/rmdir-trace
+ if {[getuid] == 0} {
+ seteuid 0
+ }
+
port_trace $path
-
- #file delete -force /tmp/link-trace2
+
+ file delete -force /tmp/link-trace2
file delete -force /tmp/hello-trace
set err "error*"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140405/58e3969d/attachment.html>
More information about the macports-changes
mailing list