diff options
| author | Jordan Tucker <jordantucker@gmail.com> | 2017-10-24 21:54:33 -0500 | 
|---|---|---|
| committer | Joel Rosdahl <joel@rosdahl.net> | 2017-11-02 22:44:02 +0100 | 
| commit | b78439babec340f02d457a40760b041b90cc4ce2 (patch) | |
| tree | 129617517845dd56860b5897b12d4c660eeb2e03 | |
| parent | b2b737c13ea1cb2f05583835f15a528572b04c16 (diff) | |
| download | miniircd-b78439babec340f02d457a40760b041b90cc4ce2.tar.gz miniircd-b78439babec340f02d457a40760b041b90cc4ce2.zip  | |
Require os.name == "posix" to attempt using os.getuid/getgid
| -rwxr-xr-x | miniircd | 2 | 
1 files changed, 1 insertions, 1 deletions
@@ -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"  | 
