From ba41efa59f5f7143c5431d001ed80d76108de988 Mon Sep 17 00:00:00 2001 From: Rezrov Frotz Date: Fri, 13 Jun 2014 17:53:31 -0400 Subject: fixed setids/setuid bug --- miniircd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miniircd b/miniircd index 9c66e4a..fd793ee 100755 --- a/miniircd +++ b/miniircd @@ -869,15 +869,15 @@ def main(argv): if options.chroot: if os.getuid() != 0: op.error("Must be root to use --chroot") - if options.setids: + if options.setuid: if os.getuid() != 0: op.error("Must be root to use --setuid") - match = re.findall(r"([a-z_][a-z0-9_-]*[\$]?)", options.setids) + match = re.findall(r"([a-z_][a-z0-9_-]*[\$]?)", options.setuid) if len(match) > 1: - options.setids = (int(getpwnam(match[0]).pw_uid),int(getgrnam(match[1]).gr_gid)) + options.setuid = (int(getpwnam(match[0]).pw_uid),int(getgrnam(match[1]).gr_gid)) elif len(match) == 1: - options.setids = (int(getpwnam(match[0]).pw_uid),int(getpwnam(match[0]).pw_gid)) + 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") ports = [] -- cgit v1.2.3