summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xminiircd8
1 files changed, 4 insertions, 4 deletions
diff --git a/miniircd b/miniircd
index 0cbf260..51f9747 100755
--- a/miniircd
+++ b/miniircd
@@ -1026,9 +1026,8 @@ def main(argv):
options.ports = "6667"
else:
options.ports = "6697"
- if options.chroot:
- if os.getuid() != 0:
- op.error("Must be root to use --chroot")
+ if options.chroot and os.getuid() != 0:
+ op.error("Must be root to use --chroot")
if options.setuid:
from pwd import getpwnam
from grp import getgrnam
@@ -1044,7 +1043,8 @@ 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.name == "posix" and ((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"