diff options
author | Rezrov Frotz <rezrov.frotz@gmail.com> | 2014-06-13 17:53:31 -0400 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2014-06-23 21:58:01 +0200 |
commit | ba41efa59f5f7143c5431d001ed80d76108de988 (patch) | |
tree | e24df5afeede985814c0dd7ea6b411f09d28ed0b /miniircd | |
parent | 5cc528c55d27d0e671f7ae99424c0fefb594bf3e (diff) | |
download | miniircd-ba41efa59f5f7143c5431d001ed80d76108de988.tar.gz miniircd-ba41efa59f5f7143c5431d001ed80d76108de988.zip |
fixed setids/setuid bug
Diffstat (limited to 'miniircd')
-rwxr-xr-x | miniircd | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 = [] |