diff options
author | msapiro <> | 2007-02-15 19:06:18 +0000 |
---|---|---|
committer | msapiro <> | 2007-02-15 19:06:18 +0000 |
commit | 329a23cb28d87ed14627bf7a59b64e57ac594666 (patch) | |
tree | 1b18241a299a32ab2d2c9e66e77469375bb88df6 | |
parent | 6f95cfd79a3d69b9bd1f4ab74c467e2434300ed4 (diff) | |
download | mailman2-329a23cb28d87ed14627bf7a59b64e57ac594666.tar.gz mailman2-329a23cb28d87ed14627bf7a59b64e57ac594666.tar.xz mailman2-329a23cb28d87ed14627bf7a59b64e57ac594666.zip |
Fixed bug # 1660666.
-rw-r--r-- | contrib/check_perms_grsecurity.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/check_perms_grsecurity.py b/contrib/check_perms_grsecurity.py index 3abe55d4..3d0b66e1 100644 --- a/contrib/check_perms_grsecurity.py +++ b/contrib/check_perms_grsecurity.py @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Fixes for running Mailman under the `secure-linux' patch or grsecurity. @@ -102,9 +103,9 @@ import grp, pwd from Mailman.mm_cfg import MAILMAN_USER, MAILMAN_GROUP class CheckFixUid: + uid = pwd.getpwnam(MAILMAN_USER)[2] + gid = grp.getgrnam(MAILMAN_GROUP)[2] if os.geteuid() == 0: - uid = pwd.getpwnam(MAILMAN_USER)[2] - gid = grp.getgrnam(MAILMAN_GROUP)[2] os.setgid(gid) os.setuid(uid) if os.geteuid() != uid: |