mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:05:31 +02:00
Added check to make sure script is running as root
This commit is contained in:
@@ -239,6 +239,11 @@ def authenticate():
|
||||
TODO: This should be turned into a class...
|
||||
"""
|
||||
global server, names, csr, privkey
|
||||
|
||||
# Check if root
|
||||
if not os.geteuid()==0:
|
||||
sys.exit("\nOnly root can run trustify\n")
|
||||
|
||||
if "CHOCOLATESERVER" in os.environ:
|
||||
server = os.environ["CHOCOLATESERVER"]
|
||||
if not server:
|
||||
|
||||
Reference in New Issue
Block a user