[jcifs] Re: Crazy Copy Tests

Michael B Allen mba2000 at ioplex.com
Mon Aug 15 18:15:41 GMT 2005


On Mon, 15 Aug 2005 04:05:05 +0200
Thomas Bley <thomas.bley at simple-groupware.de> wrote:

> Hi Mike, hi all,
> 
> I am doing some crazy tests at the moment:
> 1)
>          SmbFile from = new SmbFile( 
> "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/" );
>          SmbFile to = new SmbFile( 
> "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/" );
>          from.copyTo( to );
> 
> This code sets all files in asd2 to 0kb size.
> 
> 2)
>          SmbFile from = new SmbFile( 
> "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/" );
>          SmbFile to = new SmbFile( 
> "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/existingdir/" 
> );
>          from.copyTo( to );
> 
> This causes a big recursion with many "existingdir" copied into each 
> other, e.g. you get asd2/existingdir/existingdir/existingdir/ ...
> On a windows or samba server this is no problem, the path length has a 
> maximum of ~500 characters, samba has ~1000 characters, but NetApp has 
> no limit ...
> 
> Do you think these cases should be stopped by jCIFS or the rather the 
> program that uses the library like my webdisk ?

I think I can block these. Pls check the next release to see if my
modifications are satisfactory.

Mike


More information about the jcifs mailing list