aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-09-01 17:10:17 -0700
committerMark Sapiro <mark@msapiro.net>2015-09-01 17:10:17 -0700
commit8fe23fa982192c2e1236ee86eb6cad612ace504c (patch)
treef73a11558be2cdffb40075cfcb02a789b6cca8e6
parentc0d1e251988b357752eb35f5b14319cfa4cb46b6 (diff)
downloadmailman2-8fe23fa982192c2e1236ee86eb6cad612ace504c.tar.gz
mailman2-8fe23fa982192c2e1236ee86eb6cad612ace504c.tar.xz
mailman2-8fe23fa982192c2e1236ee86eb6cad612ace504c.zip
Fixed bin/mailmanctl to check its effective rather than real uid.
-rwxr-xr-xNEWS3
-rw-r--r--bin/mailmanctl2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 980b3c2c..e01d76df 100755
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,9 @@ Here is a history of user visible changes to Mailman.
Bug fixes and other patches
+ - Fixed bin/mailmanctl to check its effective rather than real uid.
+ (LP: #1491187)
+
- Fixed cron/gate_news to catch EOFError on opening the newsgroup.
(LP: #1486263)
diff --git a/bin/mailmanctl b/bin/mailmanctl
index fa14a2cd..2c482221 100644
--- a/bin/mailmanctl
+++ b/bin/mailmanctl
@@ -288,7 +288,7 @@ def check_privs():
# the uid/gid.
gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
uid = pwd.getpwnam(mm_cfg.MAILMAN_USER)[2]
- myuid = os.getuid()
+ myuid = os.geteuid()
if myuid == 0:
# Set the process's supplimental groups.
groups = [x[2] for x in grp.getgrall() if mm_cfg.MAILMAN_USER in x[3]]