summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRezrov Frotz <rezrov.frotz@gmail.com>2014-06-13 17:53:31 -0400
committerJoel Rosdahl <joel@rosdahl.net>2014-06-23 21:58:01 +0200
commitba41efa59f5f7143c5431d001ed80d76108de988 (patch)
treee24df5afeede985814c0dd7ea6b411f09d28ed0b
parent5cc528c55d27d0e671f7ae99424c0fefb594bf3e (diff)
downloadminiircd-ba41efa59f5f7143c5431d001ed80d76108de988.tar.gz
miniircd-ba41efa59f5f7143c5431d001ed80d76108de988.zip
fixed setids/setuid bug
-rwxr-xr-xminiircd8
1 files 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 = []