diff options
author | Rezrov Frotz <rezrov.frotz@gmail.com> | 2014-06-30 12:06:29 -0400 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2014-07-31 15:35:12 +0200 |
commit | 31c0cf9a9fed97e14be80f2c7cae9a654e156549 (patch) | |
tree | 533353ca6ce56f6fb3e6a80cb10f3d2e4f9bd421 /miniircd | |
parent | c85ce6a6a6f3cb13d331e7c29283ba6733580c4c (diff) | |
download | miniircd-31c0cf9a9fed97e14be80f2c7cae9a654e156549.tar.gz miniircd-31c0cf9a9fed97e14be80f2c7cae9a654e156549.zip |
Allow mixed case in user/group names
Diffstat (limited to 'miniircd')
-rwxr-xr-x | miniircd | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -883,7 +883,8 @@ def main(argv): from grp import getgrnam if os.getuid() != 0: op.error("Must be root to use --setuid") - match = re.findall(r"([a-z_][a-z0-9_-]*\$?)", options.setuid) + match = re.findall(r"([a-z_][a-z0-9_-]*\$?)", options.setuid, + flags=re.IGNORECASE) if len(match) > 1: options.setuid = (int(getpwnam(match[0]).pw_uid), int(getgrnam(match[1]).gr_gid)) |