[MacPorts] #30749: TMP_DIR in root login foils building ports

MacPorts noreply at macports.org
Sat Aug 13 12:22:46 PDT 2011


#30749: TMP_DIR in root login foils building ports
--------------------------------------------+-------------------------------
 Reporter:  merlyn.macports@…               |       Owner:  macports-tickets@…                   
     Type:  defect                          |      Status:  new                                  
 Priority:  Low                             |   Milestone:                                       
Component:  base                            |     Version:  2.0.1                                
 Keywords:  TMP_DIR                         |        Port:                                       
--------------------------------------------+-------------------------------
 I know, every single doc says you should "sudo port blah blah".  But if
 you're already logged in as root, the "sudo" step seems redundant.

 However, ports fail to build! The login process sets up a TMP_DIR
 environment variable pointing at a directory owned by root. When "port"
 drops privileges to finish the build, the less-privileged user cannot
 write into TMP_DIR, and fails.

 Using "sudo" takes care of erasing most of the environment, so this isn't
 normally a problem.

 However, if the "port" command could also deliberately remove TMP_DIR from
 the environment, that would allow direct execution of "port" by root,
 without worrying about TMP_DIR problems.

-- 
Ticket URL: <https://trac.macports.org/ticket/30749>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list