From b78439babec340f02d457a40760b041b90cc4ce2 Mon Sep 17 00:00:00 2001 From: Jordan Tucker Date: Tue, 24 Oct 2017 21:54:33 -0500 Subject: Require os.name == "posix" to attempt using os.getuid/getgid --- miniircd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniircd b/miniircd index d25c001..0cbf260 100755 --- a/miniircd +++ b/miniircd @@ -1044,7 +1044,7 @@ def main(argv): else: op.error("Specify a user, or user and group separated by a colon," " e.g. --setuid daemon, --setuid nobody:nobody") - if (os.getuid() == 0 or os.getgid() == 0) and not options.setuid: + if os.name == "posix" and ((os.getuid() == 0 or os.getgid() == 0) and not options.setuid): op.error("Running this service as root is not recommended. Use the" " --setuid option to switch to an unprivileged account after" " startup. If you really intend to run as root, use" -- cgit v1.2.3