compiling as root?

paul beard paulbeard at gmail.com
Sat Nov 24 08:10:40 PST 2007


On 11/24/07, Michael Thon <mike.thon at gmail.com> wrote:
>
> Linux people generally recommend that you do not compile source code
> with a user that has superuser privileges, which I assume is a guard
> against possibly malicious commands that may be in the compile
> scripts.  When I install packages with macports (sudo port install
> xyz)  they're compiled by the root user.  I assume that the developers
> have thought about this and decided that it is not a security
> problem.  But I am curious, is it ok or not ok to compile source code
> as root?
> cheers
>

you can compile as any user, so long as you have permissions to write to
where you're doing it. It's the installation step that might require root.
This, I suspect, is part of the reason why MacPorts uses the /opt/local
sandbox and doesn't write to the other parts of the system.
-- 
Paul Beard / www.paulbeard.org/
<paulbeard at gmail.com/paulbeard at mac.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20071124/ca646e48/attachment.html


More information about the macports-users mailing list