summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Tucker <jordantucker@gmail.com>2017-10-24 21:54:33 -0500
committerJoel Rosdahl <joel@rosdahl.net>2017-11-02 22:44:02 +0100
commitb78439babec340f02d457a40760b041b90cc4ce2 (patch)
tree129617517845dd56860b5897b12d4c660eeb2e03
parentb2b737c13ea1cb2f05583835f15a528572b04c16 (diff)
downloadminiircd-b78439babec340f02d457a40760b041b90cc4ce2.tar.gz
miniircd-b78439babec340f02d457a40760b041b90cc4ce2.zip
Require os.name == "posix" to attempt using os.getuid/getgid
-rwxr-xr-xminiircd2
1 files changed, 1 insertions, 1 deletions
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"