summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorMartin Maney <maney@two14.net>2014-07-17 11:14:39 -0500
committerJoel Rosdahl <joel@rosdahl.net>2014-07-31 15:29:09 +0200
commitc85ce6a6a6f3cb13d331e7c29283ba6733580c4c (patch)
tree9350b4eac1425bbbfc848b01f48382baf7edca19 /miniircd
parent7bfd66ac79992792930fc37f5f600150a871d028 (diff)
downloadminiircd-c85ce6a6a6f3cb13d331e7c29283ba6733580c4c.tar.gz
miniircd-c85ce6a6a6f3cb13d331e7c29283ba6733580c4c.zip
Removed needless setres[gu]id to allow --setuid to work with Python 2.7.
Please refer to the OS syscall documentation: when used by root, set[gu]id does exactly the same thing that the more verbose setres[gu]id was thought necessary for. It wasn't.
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd4
1 files changed, 2 insertions, 2 deletions
diff --git a/miniircd b/miniircd
index c08fee8..c47a275 100755
--- a/miniircd
+++ b/miniircd
@@ -757,8 +757,8 @@ class Server(object):
os.chroot(self.chroot)
self.print_info("Changed root directory to %s" % self.chroot)
if self.setuid:
- os.setresgid(self.setuid[1], self.setuid[1], self.setuid[1])
- os.setresuid(self.setuid[0], self.setuid[0], self.setuid[0])
+ os.setgid(self.setuid[1])
+ os.setuid(self.setuid[0])
self.print_info("Setting uid:gid to %s:%s"
% (self.setuid[0], self.setuid[1]))
last_aliveness_check = time.time()