Bug 235492 - [dstore] Cannot create file with special character \ in the name on dstore-linux
Summary: [dstore] Cannot create file with special character \ in the name on dstore-linux
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 160103 199448
  Show dependency tree
 
Reported: 2008-06-03 19:28 EDT by Martin Oberhuber CLA
Modified: 2009-08-06 17:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-06-03 19:28:05 EDT
Found by running unit test FileServiceTest#testCreateFile() on dstore-linux:

Testcase fails with RemoteFileSecurityException, but SSH  and ftpLinux can properly run the test (and create the file with the odd name).


-----------Enter bugs above this line-----------
TM 3.0RC2 testing
installation : eclipse-SDK-3.4RC3 (I20080530-1730), cdt-5.0RC2 (200805231539), 
     DSF-1.0rc2 (20080527), emf-2.4.0rc2, Findbugs-1.3.3, Releng.Tools-3.4RC3, 
     RSE-3.0RC2, RXTX-2.1-7r3b, Subversive-0.7.0.v20080517, FTP_WebDav-3.2.2
     org.tigris.MemMonitor, WR-Retriever-3.0.v20070604,
RSE install  : RSE 3.0RC2 in workspace, TM-terminal, TM-discovery
java.runtime : Sun 1.6.0_05-b13 -Xmx512m -XX:MaxPermSize=128m
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
systemtype   : Dstore-linux
targetos     : Red Hat Enterprise Linux WS release 4 (Nahant Update 3)
targetuname  : Linux parser 2.6.9-34.EL #1 i686 athlon i386 GNU/Linux
targetvm     : Sun Java HotSpot(TM) Client VM (build 1.4.2_12-b03, mixed mode)
------------------------------------------------
Comment 1 David McKnight CLA 2008-06-04 12:55:14 EDT
Aside from what dstore is doing, I've also noticed that the file name validators for RSE file creation (for ssh, ftp, dstore, etc) wont' let you create a file with the following name:

"a !@#${a}\"\' fi\tle\b\\%^&*()?_ =[]~+-'`;:,.|<>"

I think RSE is using the workspace's name validator, but when the client is windows and the host is unix, we're invalidating stuff that should be valid.
Comment 2 Martin Oberhuber CLA 2008-06-04 13:13:31 EDT
I believe that what you describe in comment #1 is essentially bug 160103 (which is assigned 3.0 and you should reassign it).

This bug is about the Service Level only, and given that SSH and FTP can create this file properly, dstore should also be able to do it. Naturally, this is a prerequisite for bug 160103.

Bug 199394 and bug 199448 are similar, related issues.
Comment 3 Martin Oberhuber CLA 2009-08-06 17:04:21 EDT
Just by chance, I found out that only the "\" character leads to problems, because 

   org.eclipse.rse.services.clientserver.PathUtility#normalizeUnix()

converts \ into / characters for dstore. This is now being tracked in bug 199448, so I modified the testcase to no longer test "\" characters against dstore -- the problem with test cases is thus fixed.