summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRezrov Frotz <rezrov.frotz@gmail.com>2014-06-30 12:06:29 -0400
committerJoel Rosdahl <joel@rosdahl.net>2014-07-31 15:35:12 +0200
commit31c0cf9a9fed97e14be80f2c7cae9a654e156549 (patch)
tree533353ca6ce56f6fb3e6a80cb10f3d2e4f9bd421
parentc85ce6a6a6f3cb13d331e7c29283ba6733580c4c (diff)
downloadminiircd-31c0cf9a9fed97e14be80f2c7cae9a654e156549.tar.gz
miniircd-31c0cf9a9fed97e14be80f2c7cae9a654e156549.zip
Allow mixed case in user/group names
-rwxr-xr-xminiircd3
1 files changed, 2 insertions, 1 deletions
diff --git a/miniircd b/miniircd
index c47a275..d8d0017 100755
--- a/miniircd
+++ b/miniircd
@@ -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))