Home  |  Linux  | Mysql  | PHP  | XML
From:Bram Date:Tue Jun  3 15:19:40 2008
Subject:[PATCH] Re: Error with sync via ftp removing smoke files?
Citeren Bram <daily-build@perl.wizbit.be>:

> Quoting Abe Timmerman <abeltje@test-smoke.org>:
>
>> Bram wrote:
>>> Ran into a problem setting up smoking on one machine...
>>>
>>> Configured the smoke to download sources via ftp.
>>> The machine is behind a firewall which doesn't seem to be    
>>> configured properly for ftp.
>>> It was able to connect but all other operations timed out.
>>>
>>> When I ran:
>>>
>>> cd /tmp
>>> /opt/perl/libs/local/bin/smokecurrent.sh -Dcc="ccache /opt/gcc/bin/gcc430"
>>>
>>> everything in /opt/perl/libs/local/bin got removed.
>>
>> That is not good. I am so sorry!
>>
>> I am looking into this matter, but cannot reproduce.
>

Patch that fixes this attached.
(No tests for it are added - can't come up with a good test case)

The problem was the cleanup part in FTPClient.pm.

The cleanup routine checks what files are in . and deletes them.

This works fine if at least one file is transfered (since that code  
does a chdir) but if no files were transfered things gi boom, since .  
is not the same as the ddir/localdir.


If you want to reproduce this then you need to establish a control  
channel to an FTP server (port 21) but refuse a data channel (port 20).

I used:

iptables -A INPUT --proto tcp --sport ! 21 --source 204.244.102.6 -j REJECT
iptables -A OUTPUT --proto tcp --dport ! 21 --destination  
204.244.102.6 -j REJECT

Where 204.244.102.6 is the address of the Activestate ftp server that  
I used to sync with.


Kind regards,

Bram


Attachment: [text/x-patch] patch_smoke
Navigate in group perl.daily-build at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants