This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running GCC as root (was Re: [PATCH - ping] Don't unlink /dev/null on darwin)

On Feb 14, 2005, at 11:03 AM, Zack Weinberg wrote:

On Mon, Feb 14, 2005 at 09:59:36AM -0800, Zack Weinberg wrote:
The second patch is a possible general stopgap to prevent this sort of
scenario from causing damage in the future. It is a very big hammer,
and I recognize that it may break stuff, but I am nonetheless deadly
serious about proposing it.

Daniel Jacobowitz <> writes:
I think that forbidding gcc from running as root is a hideously bad
idea. That's site policy. And it will break everyone else's make
install that runs gcc. And it will break lots of Debian package builds
because fakeroot will trigger it.

Paul Brook <> writes:
Because it will break every [arguably buggy] install/make script
which ends up running the compiler. I know running gcc as root is
bad practice, but I can think of semi-legitimate reasons for doing
so, especially on sandbox systems.  Even more so for the

I guess I'd be a bit happier with a -frun-as-root option to override
the check.

Where I'm coming from is, this (running gcc as root) *was* just bad practice, and/or a matter of site policy, up till someone found a scenario where a legitimate invocation caused breakage when run as root -- and not breakage that we have any way of fixing, since it boils down to a bug in a vendor assembler. At that point it becomes something that should be disallowed, IMO.

This would break Apple's build process badly. Many of our builds are run as root, and it would be difficult to change that.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]