[106640] trunk/base/src

jmr at macports.org jmr at macports.org
Sun Jun 2 23:39:48 PDT 2013


Revision: 106640
          https://trac.macports.org/changeset/106640
Author:   jmr at macports.org
Date:     2013-06-02 23:39:48 -0700 (Sun, 02 Jun 2013)
Log Message:
-----------
add (but don't advertise) a config option to disable sandboxing, just in case

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl
    trunk/base/src/pextlib1.0/system.c
    trunk/base/src/port1.0/portsandbox.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2013-06-03 05:36:00 UTC (rev 106639)
+++ trunk/base/src/macports1.0/macports.tcl	2013-06-03 06:39:48 UTC (rev 106640)
@@ -50,7 +50,7 @@
         macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \
         master_site_local patch_site_local archive_site_local buildfromsource \
         revupgrade_autorun revupgrade_mode revupgrade_check_id_loadcmds \
-        host_blacklist preferred_hosts\
+        host_blacklist preferred_hosts sandbox_enable \
         packagemaker_path default_compilers pkg_post_unarchive_deletions"
     variable user_options ""
     variable portinterp_options "\
@@ -61,7 +61,7 @@
         configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
         applications_dir current_phase frameworks_dir developer_dir universal_archs build_arch \
         os_arch os_endian os_version os_major os_platform macosx_version macosx_deployment_target \
-        packagemaker_path default_compilers \
+        packagemaker_path default_compilers sandbox_enable \
         pkg_post_unarchive_deletions $user_options"
 
     # deferred options are only computed when needed.
@@ -967,6 +967,10 @@
         set temp_options(ports_rev-upgrade_id-loadcmd-check) ${macports::revupgrade_check_id_loadcmds}
     }
 
+    if {![info exists macports::sandbox_enable]} {
+        set macports::sandbox_enable yes
+    }
+
     # make tools we run operate in UTF-8 mode
     set env(LANG) en_US.UTF-8
 

Modified: trunk/base/src/pextlib1.0/system.c
===================================================================
--- trunk/base/src/pextlib1.0/system.c	2013-06-03 05:36:00 UTC (rev 106639)
+++ trunk/base/src/pextlib1.0/system.c	2013-06-03 06:39:48 UTC (rev 106640)
@@ -80,11 +80,11 @@
 static int check_sandboxing(Tcl_Interp *interp, char **sandbox_exec_path, char **profilestr)
 {
     Tcl_Obj *tcl_result;
-    int supported;
+    int active;
     int len;
 
-    tcl_result = Tcl_GetVar2Ex(interp, "portsandbox_supported", NULL, TCL_GLOBAL_ONLY);
-    if (!tcl_result || Tcl_GetBooleanFromObj(interp, tcl_result, &supported) != TCL_OK || !supported) {
+    tcl_result = Tcl_GetVar2Ex(interp, "portsandbox_active", NULL, TCL_GLOBAL_ONLY);
+    if (!tcl_result || Tcl_GetBooleanFromObj(interp, tcl_result, &active) != TCL_OK || !active) {
         return 0;
     }
 

Modified: trunk/base/src/port1.0/portsandbox.tcl
===================================================================
--- trunk/base/src/port1.0/portsandbox.tcl	2013-06-03 05:36:00 UTC (rev 106639)
+++ trunk/base/src/port1.0/portsandbox.tcl	2013-06-03 06:39:48 UTC (rev 106640)
@@ -33,8 +33,9 @@
 namespace eval portsandbox {
 }
 
-options portsandbox_supported portsandbox_profile
+options portsandbox_supported portsandbox_active portsandbox_profile
 default portsandbox_supported {[file executable $portutil::autoconf::sandbox_exec_path]}
+default portsandbox_active {[expr $portsandbox_supported && $sandbox_enable]}
 default portsandbox_profile {}
 
 # set up a suitable profile to pass to sandbox-exec, based on the target
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130602/7be6cf48/attachment.html>


More information about the macports-changes mailing list