Message69937
| Author |
cbrannon |
| Recipients |
cbrannon, swarren |
| Date |
2008年07月18日.06:15:58 |
| SpamBayes Score |
0.010951703 |
| Marked as misclassified |
No |
| Message-id |
<878wvzraia.fsf@cox.net> |
| In-reply-to |
<1216353457.17.0.719403197404.issue3394@psf.upfronthosting.co.za> (Stephen Warren's message of "Fri,円 18 Jul 2008 03\:57\:37 +0000") |
| Content |
Here is a patch containing code and a unit test. I set external_attr
to 0600, for the following reason.
When I extract with Infozip, my umask is ignored when setting permissions of
extracted entries. They have the permissions assigned to them when archived.
tar does respect umask, but it's not pertinent.
The following shell script demonstrates Infozip's behavior:
=====begin=====
#!/bin/sh
mkdir ziptest_dir
echo hello > ziptest_dir/foo.txt
chmod 666 ziptest_dir/foo.txt
zip -r ziptest_file.zip ziptest_dir/
rm -rf ziptest_dir
umask 077
unzip ziptest_file.zip
=====end=====
Setting permissions to 0600 seems like the safest course.
I'm not sure if this patch should be accompanied by some documentation,
since the zipfile docs don't say much about external_attr or permissions.
PS. My earlier comments about timestamps were incorrect and spurious! |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年07月18日 06:16:00 | cbrannon | set | spambayes_score: 0.0109517 -> 0.010951703 recipients:
+ cbrannon, swarren |
| 2008年07月18日 06:15:58 | cbrannon | link | issue3394 messages |
| 2008年07月18日 06:15:58 | cbrannon | create |
|