find_first2 lookup behaviour on Samba with a case Insensitive FS

James Peach jorgar at gmail.com
Thu May 29 06:07:22 GMT 2008


2008/5/28 Jeremy Allison <jra at samba.org>:
> On Wed, May 28, 2008 at 09:09:32PM -0700, James Peach wrote:
>>
>> Yes this causes problems for OSX 10.5. You need to return the
>> canonical on-disk case in all cases. There is a patch in the Apple
>> tree to do this for Darwin.
>>
>> <http://www.opensource.apple.com/darwinsource/10.5.2/samba-187.4/patches/vfs-add-get-preserved-name-operation>
>> <http://www.opensource.apple.com/darwinsource/10.5.2/samba-187.4/patches/support-case-perserving-filenames>
>
> For SMB_VFS_GET_PRESERVED_NAME, this really needs to take
> a char ** that is allocated on return. Remember pstrings no
> longer exist in 3.2.

yep, this patch is against 3.0.28.

> What does the underlying interface into the OS look like ?

<http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/getattrlist.2.html>

You use getattrlist(2) to get the ATTR_CMN_NAME attribute, which gives
you the on-disk file name.

> Does it allocate, or do you pass in a max length ?

You pass a buffer os size NAME_MAX (255 bytes).

-- 
James Peach | jorgar at gmail.com


More information about the samba-technical mailing list