Re: [Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] (no title)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Mark, thanks for fixing this. Just a couple of quick comments... On Jun 28, 2007, at 1:27 PM, [EMAIL PROTECTED] wrote: @@ -100,20 +101,25 @@ os.chown(path, -1, MAILMAN_GID) else: print -# All directories must be at least rwxrwsr-x. Don't check the private -# archive directory or database directory themselves since these are -# checked in checkarchives() and checkarchivedbs() below. +# Most directories must be at least rwxrwsr-x. +# The private archive directory and database directory must be at +# least rwxrws---. Their 'other' permissions are checked in +# checkarchives() and checkarchivedbs() below. Their 'user' and +# 'group' permissions are checked here. +# The directories under qfiles should be rwxrws---. Their 'user' and +# 'group' permissions are checked here. Their 'other' permissions +# aren't checked. private = config.PRIVATE_ARCHIVE_FILE_DIR -if path == private or (os.path.commonprefix((path, private)) == private - and os.path.split(path)[1] == 'database'): -continue -# The directories under qfiles should have a more limited permission -if os.path.commonprefix((path, config.QUEUE_DIR)) == config.QUEUE_DIR: +if path == private or \ + (os.path.commonprefix((path, private)) == private + and os.path.split(path)[1] == 'database'): This is probably better style: if path == private or ( os.path.commonprefix((path, private)) == private and os.path.split(path)[1] == 'database'): # then... targetperms = PRIVATEPERMS It eliminates a backslash (always ugly ;) though it kind of begs for the 'then...' comment because of the way the columns line up. +targetperms = PRIVATEPERMS +elif os.path.commonprefix((path, config.QUEUE_DIR)) \ + == config.QUEUE_DIR: targetperms = QFILEPERMS Similarly, this removes the need for a backslash: elif (os.path.commonprefix((path, config.QUEUE_DIR)) == config.QUEUE_DIR): targetperms = QFILEPERMS You probably can't do much better without storing config.QUEUE_DIR in a local variable. Cheers, - -Barry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) iQCVAwUBRoP6mHEjvBPtnXfVAQL8qQP9GZzd1T5xdGGmcWvGR+lpZPUpZPGWJhCq 7yH54o8E45pBisH6LVVJR3KoS7/xfJGevj3t/tQ6gLgiOsdeiLaTWQJ05UBBiHAr r8+7FWWgUrc84o7EvkhgXXsqCVT/iFTW1yVWmlsVGLm0ezdl6oOPTcrpJ2biA63S 3Hn//tQKi2o= =rA0r -END PGP SIGNATURE- ___ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org
Re: [Mailman-checkins] [Mailman-Developers] [Branch ~mailman-coders/mailman/3.0] (no title)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jun 28, 2007, at 2:30 PM, Mark Sapiro wrote: Thanks Barry, I thought about this a bit, but clearly didn't think it through. I'll clean it up. /Mark Thanks Mark! - -Barry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) iQCVAwUBRoQAkXEjvBPtnXfVAQLbSwP+IKkeaLWQ08+tR61ZRAJ3HBghGcIclQiB xUjVlrS4KZ+eljtxRD55VCFGgvZ0SzOUlC9MZQBR3k7Dy901dGj24Pm1ZJE0fCYN FmEvhf/Oaw0JMebYY8itI9AxBuIFGOcWcd1qfdiZ29Gg1yxB2ri7Ah6S4zKwCO0N asw3oOfLWwo= =t8Tv -END PGP SIGNATURE- ___ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org
Re: [Mailman-checkins] [Mailman-Developers] [Branch ~mailman-coders/mailman/3.0] (no title)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barry Warsaw wrote: Hi Mark, thanks for fixing this. Just a couple of quick comments... private = config.PRIVATE_ARCHIVE_FILE_DIR -if path == private or (os.path.commonprefix((path, private)) == private - and os.path.split(path)[1] == 'database'): -continue -# The directories under qfiles should have a more limited permission -if os.path.commonprefix((path, config.QUEUE_DIR)) == config.QUEUE_DIR: +if path == private or \ + (os.path.commonprefix((path, private)) == private + and os.path.split(path)[1] == 'database'): This is probably better style: if path == private or ( os.path.commonprefix((path, private)) == private and os.path.split(path)[1] == 'database'): # then... targetperms = PRIVATEPERMS It eliminates a backslash (always ugly ;) though it kind of begs for the 'then...' comment because of the way the columns line up. +targetperms = PRIVATEPERMS +elif os.path.commonprefix((path, config.QUEUE_DIR)) \ + == config.QUEUE_DIR: targetperms = QFILEPERMS Similarly, this removes the need for a backslash: elif (os.path.commonprefix((path, config.QUEUE_DIR)) == config.QUEUE_DIR): targetperms = QFILEPERMS You probably can't do much better without storing config.QUEUE_DIR in a local variable. Thanks Barry, I thought about this a bit, but clearly didn't think it through. I'll clean it up. /Mark - -- Mark Sapiro [EMAIL PROTECTED] The highway is for gamblers, San Francisco Bay Area, Californiabetter use your sense - B. Dylan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) iD8DBQFGg/5NVVuXXpU7hpMRAguhAJ9X9PpO8yhZqQ40vi5cfjCKCnmodQCg7/Ph GQxqjG/MfwJWFZYflqvaTnI= =EWWb -END PGP SIGNATURE- ___ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org
[Mailman-checkins] [Branch ~mailman-coders/mailman/2.1] (no title)
revno: 983 committer: Mark Sapiro [EMAIL PROTECTED] branch nick: 2.1 timestamp: Thu 2007-06-28 12:20:50 -0700 message: Cleaned up a couple of style issues. No actual code changes. modified: bin/check_perms === modified file 'bin/check_perms' --- a/bin/check_perms 2007-06-28 17:26:13 + +++ b/bin/check_perms 2007-06-28 19:20:50 + @@ -135,12 +135,13 @@ # 'group' permissions are checked here. Their 'other' permissions # aren't checked. private = mm_cfg.PRIVATE_ARCHIVE_FILE_DIR -if path == private or \ - (os.path.commonprefix((path, private)) == private - and os.path.split(path)[1] == 'database'): +if path == private or ( +os.path.commonprefix((path, private)) == private +and os.path.split(path)[1] == 'database'): +# then... targetperms = PRIVATEPERMS -elif os.path.commonprefix((path, mm_cfg.QUEUE_DIR)) \ - == mm_cfg.QUEUE_DIR: +elif (os.path.commonprefix((path, mm_cfg.QUEUE_DIR)) + == mm_cfg.QUEUE_DIR): targetperms = QFILEPERMS else: targetperms = DIRPERMS -- (no title) https://code.launchpad.net/~mailman-coders/mailman/2.1 You are receiving this branch notification because you are subscribed to it. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins. ___ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org
[Mailman-checkins] [Branch ~mailman-coders/mailman/3.0] (no title)
revno: 6516 committer: Mark Sapiro [EMAIL PROTECTED] branch nick: 3.0 timestamp: Thu 2007-06-28 12:23:25 -0700 message: Cleaned up a couple of style issues. No actual code changes. modified: Mailman/bin/check_perms.py === modified file 'Mailman/bin/check_perms.py' --- a/Mailman/bin/check_perms.py2007-06-28 17:23:27 + +++ b/Mailman/bin/check_perms.py2007-06-28 19:23:25 + @@ -110,12 +110,13 @@ # 'group' permissions are checked here. Their 'other' permissions # aren't checked. private = config.PRIVATE_ARCHIVE_FILE_DIR -if path == private or \ - (os.path.commonprefix((path, private)) == private - and os.path.split(path)[1] == 'database'): +if path == private or ( +os.path.commonprefix((path, private)) == private +and os.path.split(path)[1] == 'database'): +# then... targetperms = PRIVATEPERMS -elif os.path.commonprefix((path, config.QUEUE_DIR)) \ - == config.QUEUE_DIR: +elif (os.path.commonprefix((path, config.QUEUE_DIR)) + == config.QUEUE_DIR): targetperms = QFILEPERMS else: targetperms = DIRPERMS @@ -402,7 +403,7 @@ else: print _('Problems found:'), STATE.ERRORS print _('Re-run as $MAILMAN_USER (or root) with -f flag to fix') - + if __name__ == '__main__': main() -- (no title) https://code.launchpad.net/~mailman-coders/mailman/3.0 You are receiving this branch notification because you are subscribed to it. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/3.0/+subscription/mailman-checkins. ___ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org