diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-02-15 13:52:31 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-02-15 13:53:17 +0100 |
commit | d8ef7eac7e6cbc6576ea23393144583069190206 (patch) | |
tree | b6c06b05a46f4d24e40737db7fe59ab41dda3c9d | |
parent | dcc6a2376ec4238205d3fb351d9357587886b6c5 (diff) |
Abort if running as root or under fakeroot.
Running as root is unsafe and we invoke fakeroot ourselfes.
-rw-r--r-- | make-sgpkg.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/make-sgpkg.py b/make-sgpkg.py index c363eb3..3ad32c0 100644 --- a/make-sgpkg.py +++ b/make-sgpkg.py @@ -181,6 +181,10 @@ def main(argv): verbose = options.verbose + if os.getuid() == 0: + print >>sys.stderr, "Don't run %s as root." % argv[0] + sys.exit(1) + if os.path.exists(os.path.expanduser(properties)): print >>sys.stderr, "%s exists - this can cause problems. Please remove the file first." % properties sys.exit(1) |