diff options
author | Rezrov Frotz <rezrov.frotz@gmail.com> | 2014-06-18 14:01:35 -0400 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2014-06-23 21:58:01 +0200 |
commit | 01440bc95a204321f9a0878945efa1d35f41b266 (patch) | |
tree | 5ad5b882bcf780a9aaa7265c9f5f7247c6287d7c /miniircd | |
parent | ba41efa59f5f7143c5431d001ed80d76108de988 (diff) | |
download | miniircd-01440bc95a204321f9a0878945efa1d35f41b266.tar.gz miniircd-01440bc95a204321f9a0878945efa1d35f41b266.zip |
Added warning if running as root, added make jail, updated README.
Diffstat (limited to 'miniircd')
-rwxr-xr-x | miniircd | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -880,6 +880,9 @@ def main(argv): options.setuid = (int(getpwnam(match[0]).pw_uid),int(getpwnam(match[0]).pw_gid)) else: op.error("Specify a user, or user and group separated by a semicolon, e.g. --setuid daemon, --setuid nobody:nobody") + if (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 '--setuid root'.") + ports = [] for port in re.split(r"[,\s]+", options.ports): try: |