The Samba-Bugzilla – Bug 5761
open of mangled directory name results in "is a stream name"
Last modified: 2008-09-16 11:54:06 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.
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.
Created attachment 3583 [details]
Patch for 3.2.x
This fixes the problem for me, thanks !
Created attachment 3584 [details]
Patch for 3.2.x
Accidently included too much.
Fixed for 3.2.4