docx problems

Julian Field MailScanner at ecs.soton.ac.uk
Fri May 28 09:11:16 IST 2010


I've got good news and bad news.

The bad news is that I still can't reproduce this problem, it just works 
fine for me. :-(
The good news is that I haven't written you a fix anyway. :-)

Apply this patch to /usr/lib/MailScanner/MailScanner/Message.pm
-----START-----
--- Message.pm.old    2010-05-28 08:56:37.000000000 +0100
+++ Message.pm    2010-05-28 09:09:26.000000000 +0100
@@ -2504,8 +2504,8 @@
    # Set the owner and group on all the extracted files
    # JKF 20100211 chown $workarea->{uid}, $workarea->{gid}, map { 
m/(.*)/ } grep { -f } glob "$explodeinto/* $explodeinto/.*"
    # JKF 20100211  if $workarea->{changeowner};
+  my($tmplist1, at tmplist);
    if ($workarea->{changeowner}) {
-    my($tmplist1, at tmplist);
      foreach $tmplist1 (glob "$explodeinto/* $explodeinto/.*") {
        $tmplist1 =~ /(.*)/;
        $tmplist1 = $1;
@@ -2513,6 +2513,12 @@
      }
      chown $workarea->{uid}, $workarea->{gid}, @tmplist if @tmplist;
    }
+  # JKF 20100528 Now set the perms on all the extracted files
+  my $workperms = MailScanner::Config::Value('workperms') || '0600';
+  # Make it octal with a leading zero if necessary
+  $workperms = sprintf "0%lo", $workperms unless $workperms =~ /^0/;
+  $workperms = oct($workperms); # and back to decimal for chmod
+  chmod $workperms, @tmplist if @tmplist;
  }

  sub ListLeafEntities {
-----END-----

Please let me know if this fixes the problem, it should do.

Jules.


On 27/05/2010 21:38, John Wilcock wrote:
> Le 27/05/2010 22:17, PSI Mailbag a écrit :
>> This appears to only affect zip files created by a Linux or Unix
>> variant (at least in my case). Window's zips work fine.
>
> That tallies with what I discovered while attempting to create a test 
> case (as discussed with Julian off-list). In my case MacOSX zips were 
> problematic but WinZip zips of the same file were fine; Julian tested 
> the same and other MacOSX zips on his setup and everything worked 
> perfectly.
>
> There must be something else common to your setup and mine but not to 
> Julian's test box. Obvious culprits would seem to be perl itself (I 
> have 5.8.8) and the Archive::Zip module (I have 1.30).
>
> John.
>

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM and twitter.com/MailScanner


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list