Bug 5761 - open of mangled directory name results in "is a stream name"
Summary: open of mangled directory name results in "is a stream name"
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Nmbd (show other bugs)
Version: 3.2.2
Hardware: All All
: P3 minor
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
Depends on:
Reported: 2008-09-15 07:23 UTC by Regan Heath
Modified: 2008-09-16 11:54 UTC (History)
0 users

See Also:

Patch for 3.2.x (2.03 KB, patch)
2008-09-15 16:10 UTC, Jeremy Allison
no flags Details
Patch for 3.2.x (1.34 KB, patch)
2008-09-15 16:12 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regan Heath 2008-09-15 07:23:22 UTC
I work on a windows application which is scanning a SAMBA share from a windows PC.  

One of the operations it performs on the files and folders it finds is to obtain security information using the windows function GetNamedSecurityInfo.  When it does this on a folder containing a ':' character i.e. "col:dir" which has been mangled by SAMBA to "CODODK~Y" it fails with NOT_A_DIRECTORY.

The SAMBA log shows the error string "is a stream name".

I suspect the same thing occurs in windows explorer when you right-click the mangled folder and select properties, windows explorer seems unable to show security information for the folder.  It shows security information for other mangled folders (not containing :).

I realise that the ':' character on windows denotes an alternate data stream.

I assume that SAMBA should deny requests from windows machines to open the alterate data streams for files and directories because UNIX os's don't have this concept?

But, I think that in the case where the file or directory actually exists as named (containing the :), which also means the request contained a mangled name which had to be demangled, then samba should go ahead and open it.

Comment 1 Jeremy Allison 2008-09-15 14:57:06 UTC
Can you attach the debug level 10 log of the application attempting to open this directory please ?
I'll work on this asap to try and get it fixed for the forthcoming 3.2.4.

Comment 2 Jeremy Allison 2008-09-15 16:10:27 UTC
Created attachment 3583 [details]
Patch for 3.2.x

This fixes the problem for me, thanks !
Comment 3 Jeremy Allison 2008-09-15 16:12:05 UTC
Created attachment 3584 [details]
Patch for 3.2.x

Accidently included too much.
Comment 4 Regan Heath 2008-09-16 04:28:49 UTC
Comment 5 Jeremy Allison 2008-09-16 11:54:06 UTC
Fixed for 3.2.4